Data Source: aws_network_acls

Example Usage

The following shows outputting all network ACL ids in a vpc.

data "aws_network_acls" "example" {
  vpc_id = var.vpc_id
}

output "example" {
  value = data.aws_network_acls.example.ids
}

The following example retrieves a list of all network ACL ids in a VPC with a custom tag of Tier set to a value of "Private".

data "aws_network_acls" "example" {
  vpc_id = var.vpc_id

  tags = {
    Tier = "Private"
  }
}

The following example retrieves a network ACL id in a VPC which associated with specific subnet.

data "aws_network_acls" "example" {
  vpc_id = var.vpc_id

  filter {
    name   = "association.subnet-id"
    values = [aws_subnet.test.id]
  }
}

Argument Reference

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

Attribute Reference

This data source exports the following attributes in addition to the arguments above:

Timeouts

Configuration options: