Provides an network ACL association resource which allows you to associate your network ACL with any subnet(s).
resource "aws_network_acl_association" "main" {
network_acl_id = aws_network_acl.main.id
subnet_id = aws_subnet.main.id
}
This resource supports the following arguments:
network_acl_id
- (Required) The ID of the network ACL.subnet_id
- (Required) The ID of the associated Subnet.This resource exports the following attributes in addition to the arguments above:
id
- The ID of the network ACL associationIn Terraform v1.5.0 and later, use an import
block to import Network ACL associations using the id
. For example:
import {
to = aws_network_acl_association.main
id = "aclassoc-02baf37f20966b3e6"
}
Using terraform import
, import Network ACL associations using the id
. For example:
% terraform import aws_network_acl_association.main aclassoc-02baf37f20966b3e6