alicloud_vpc_network_acl_attachment

Provides a VPC Network Acl Attachment resource. Resources associated with network Acl.

For information about VPC Network Acl Attachment and how to use it, see What is Network Acl Attachment.

Example Usage

Basic Usage

data "alicloud_zones" "default" {
  available_resource_creation = "VSwitch"
}

resource "alicloud_vpc" "default" {
  cidr_block = "192.168.0.0/16"
}

resource "alicloud_vswitch" "default" {
  vpc_id     = alicloud_vpc.default.id
  cidr_block = cidrsubnet(alicloud_vpc.default.cidr_block, 8, 2)
  zone_id    = data.alicloud_zones.default.zones.0.id
}

resource "alicloud_network_acl" "default" {
  vpc_id = alicloud_vswitch.default.vpc_id
}

resource "alicloud_vpc_network_acl_attachment" "default" {
  network_acl_id = alicloud_network_acl.default.id
  resource_id    = alicloud_vswitch.default.id
  resource_type  = "VSwitch"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Timeouts

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

Import

VPC Network Acl Attachment can be imported using the id, e.g.

$ terraform import alicloud_vpc_network_acl_attachment.example <network_acl_id>:<resource_id>