ionoscloud_container_registry_token
Creates and manages IONOS CLOUD Container Registry Token.
Manages an Container Registry Token on IONOS CLOUD.
Example Usage
resource "ionoscloud_container_registry" "example" {
garbage_collection_schedule {
days = ["Monday", "Tuesday"]
time = "05:19:00+00:00"
}
location = "de/fra"
name = "container-registry-example"
}
resource "ionoscloud_container_registry_token" "example" {
expiry_date = "2023-01-13 16:27:42Z"
name = "container-registry-token-example"
scopes {
actions = ["push"]
name = "Scope1"
type = "repository"
}
status = "enabled"
registry_id = ionoscloud_container_registry.example.id
save_password_to_file = "pass.txt"
}Argument Reference
The following arguments are supported:
registry_id- (Required)[string] The ID of the container registryname- (Required)[string] The name of the container registry token. Immutable, update forces re-creation of the resource.expiry-date- (Optional)[string] The value must be supplied as ISO 8601 timestampcredentials- (Computed)[map]username- (Computed)[string] The username of the container registry tokenpassword- (Computed)[string] The password/token of the container registry token which will also be saved to a file ifsave_password_to_fileis set
scopes- (Optional)(Computed) [map]actions- (Required)[string] Example: ["pull", "push", "delete"]name- (Required)[string]type- (Required)[string]
status- (Optional)[string] Must have one of the values:enabled,disabledsave_password_to_file- (Optional)[string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path
⚠ WARNING
save_password_to_filemust be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.
Import
Resource Container Registry Token can be imported using the container registry id and resource id, e.g.
Last updated
Was this helpful?