alicloud_cr_ee_instance

更新时间:
复制 MD 格式

Provides a CR Instance resource.

For information about Container Registry Instance and how to use it, see What is Container Registry.

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

-> NOTE: Available since v1.124.0.

-> NOTE: International site only support Basic and Advance instance types.

Example Usage

Basic Usage


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

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

resource "alicloud_cr_ee_instance" "default" {
  payment_type   = "Subscription"
  period         = 1
  renew_period   = 1
  renewal_status = "AutoRenewal"
  instance_type  = "Advanced"
  instance_name  = "${var.name}-${random_integer.default.result}"
  tags = {
    Created = "TF"
    For     = "Test"
  }
}

Need more examples? VIEW MORE EXAMPLES

Argument Reference

The following arguments are supported:

  • custom_oss_bucket - (Optional) Custom OSS Bucket name

    -> NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

  • default_oss_bucket - (Optional, Available since v1.235.0) Whether to use the default OSS Bucket. Value:

    • true: Use the default OSS Bucket.
    • false: Use a custom OSS Bucket.

    -> NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

  • image_scanner - (Optional, Available since v1.235.0) The security scan engine used by the Enterprise Edition of Container Image Service. Value:

    • ACR: Uses the Trivy scan engine provided by default.
    • SAS: uses the enhanced cloud security scan engine.
    • DISABLE: Disables the image security scan engine.

    -> NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

  • instance_name - (Required, ForceNew) InstanceName

  • instance_type - (Required) The Value configuration of the Group 1 attribute of Container Mirror Service Enterprise Edition. Valid values:

    • Basic: Basic instance
    • Standard: Standard instance
    • Advanced: Advanced Edition Instance
    • Economy: Economy instance

    -> NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

  • namespace_quota - (Optional, Int, Available since v1.268.0) The number of additional namespaces to purchase. The value is an integral multiple of 5.

    -> NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

  • password - (Optional) Login password, 8-32 digits, must contain at least two letters, symbols, or numbers

  • payment_type - (Required, ForceNew) Payment type, value:

    • Subscription: Prepaid.
  • period - (Optional, Int) Prepaid cycle. The unit is Monthly, please enter an integer multiple of 12 for annual paid products.

    -> NOTE: must be set when creating a prepaid instance.

    -> NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

  • renew_period - (Optional, ForceNew, Int) Automatic renewal cycle, in months.

    -> NOTE: When RenewalStatus is set to AutoRenewal, it must be set.

  • renewal_status - (Optional, ForceNew, Computed) Automatic renewal status, value:

    • AutoRenewal: automatic renewal.
    • ManualRenewal: manual renewal.

    Default ManualRenewal.

  • repo_quota - (Optional, Int, Available since v1.268.0) The number of additional repositories to purchase. The value is an integral multiple of 1000.

    -> NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

  • resource_group_id - (Optional, Computed, Available since v1.235.0) The ID of the resource group

  • tags - (Optional, Map, Available since v1.288.0) A mapping of tags to assign to the resource.

  • vpc_quota - (Optional, Int, Available since v1.268.0) The number of VPC access controls.

    -> NOTE: The parameter is immutable after resource creation. It only applies during resource creation and has no effect when modified post-creation.

The following arguments will be discarded. Please use new fields as soon as possible:

  • created_time - (Deprecated since v1.235.0). Field 'created_time' has been deprecated from provider version 1.235.0. New field 'create_time' instead.
  • kms_encrypted_password - (Optional, Available since v1.132.0) An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored.
  • kms_encryption_context - (Optional, MapString, Available since v1.132.0) An KMS encryption context used to decrypt kms_encrypted_password before creating or updating instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.
  • create_time - The creation time of the resource
  • end_time - Expiration Time
  • instance_endpoints - (Available since v1.240.0) Instance Network Access Endpoint List
    • domains - Domain List
      • domain - Domain
      • type - Domain Type
    • enable - enable
    • endpoint_type - Network Access Endpoint Type
  • region_id - RegionId
  • status - Instance Status

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 6 mins) Used when create the Instance.
  • delete - (Defaults to 5 mins) Used when delete the Instance.
  • update - (Defaults to 5 mins) Used when update the Instance.

Import

CR Instance can be imported using the id, e.g.

$ terraform import alicloud_cr_ee_instance.example <id>