alicloud_cr_chart_namespace

更新时间:

Provides a CR Chart Namespace resource.

For information about CR Chart Namespace and how to use it, see What is Chart Namespace.

-> NOTE: Available since v1.149.0.

Example Usage

Basic Usage


variable "name" {
  default = "terraform-example"
}

resource "random_integer" "default" {
  min = 10000000
  max = 99999999
}

resource "alicloud_cr_ee_instance" "example" {
  payment_type   = "Subscription"
  period         = 1
  renew_period   = 0
  renewal_status = "ManualRenewal"
  instance_type  = "Advanced"
  instance_name  = "${var.name}-${random_integer.default.result}"
}

resource "alicloud_cr_chart_namespace" "example" {
  instance_id    = alicloud_cr_ee_instance.example.id
  namespace_name = "${var.name}-${random_integer.default.result}"
}

Argument Reference

The following arguments are supported:

  • auto_create_repo - (Optional) Specifies whether to automatically create repositories in the namespace. Valid values:
    • true - automatically creates repositories in the namespace.
    • false - does not automatically create repositories in the namespace.
  • default_repo_type - (Optional) DefaultRepoType. Valid values: PRIVATE, PUBLIC.
  • instance_id - (Required, ForceNew) The ID of the Container Registry instance.
  • namespace_name - (Required, ForceNew) The name of the namespace that you want to create.

Attributes Reference

The following attributes are exported:

  • id - The resource ID of Chart Namespace. The value formats as <instance_id>:<namespace_name>.

Import

CR Chart Namespace can be imported using the id, e.g.

$ terraform import alicloud_cr_chart_namespace.example <instance_id>:<namespace_name>