This resource will help you to manager Container Registry namespaces, see What is Namespace.
Basic Usage
variable "name" {
default = "terraform-example"
}
resource "alicloud_cr_namespace" "example" {
name = var.name
auto_create = false
default_visibility = "PUBLIC"
}
The following arguments are supported:
name
- (Required, ForceNew) Name of Container Registry namespace.auto_create
- (Required) Boolean, when it set to true, repositories are automatically created when pushing new images. If it set to false, you create repository for images before pushing.default_visibility
- (Required) PUBLIC
or PRIVATE
, default repository visibility in this namespace.The following attributes are exported:
id
- The id of Container Registry namespace. The value is same as its name.Container Registry namespace can be imported using the namespace, e.g.
$ terraform import alicloud_cr_namespace.default my-namespace