文档

alicloud_cr_endpoint_acl_policy

更新时间:
一键部署

Provides a CR Endpoint Acl Policy resource.

For information about CR Endpoint Acl Policy and how to use it, see What is Endpoint Acl Policy.

-> NOTE: Available since v1.139.0.

Example Usage

Basic Usage

variable "name" {
  default = "tf-example"
}
resource "alicloud_cr_ee_instance" "default" {
  payment_type   = "Subscription"
  period         = 1
  renewal_status = "ManualRenewal"
  instance_type  = "Advanced"
  instance_name  = var.name
}

data "alicloud_cr_endpoint_acl_service" "default" {
  endpoint_type = "internet"
  enable        = true
  instance_id   = alicloud_cr_ee_instance.default.id
  module_name   = "Registry"
}

resource "alicloud_cr_endpoint_acl_policy" "default" {
  instance_id   = data.alicloud_cr_endpoint_acl_service.default.instance_id
  entry         = "192.168.1.0/24"
  description   = var.name
  module_name   = "Registry"
  endpoint_type = "internet"
}

Argument Reference

The following arguments are supported:

  • description - (Optional, ForceNew) The description of the entry.
  • endpoint_type - (Required, ForceNew) The type of endpoint. Valid values: internet.
  • entry - (Required, ForceNew) The IP segment that allowed to access.
  • instance_id - (Required, ForceNew) The ID of the CR Instance.
  • module_name - (Optional, ForceNew) The module that needs to set the access policy. Valid values: Registry.

Attributes Reference

The following attributes are exported:

  • id - The resource ID of Endpoint Acl Policy. The value formats as <instance_id>:<endpoint_type>:<entry>.

Timeouts

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

  • create - (Defaults to 10 mins) Used when create the Acl Policy.
  • delete - (Defaults to 10 mins) Used when delete the Acl Policy.

Import

CR Endpoint Acl Policy can be imported using the id, e.g.

$ terraform import alicloud_cr_endpoint_acl_policy.example <instance_id>:<endpoint_type>:<entry>

  • 本页导读 (0)
文档反馈