Data Source: aws_nat_gateway

Provides details about a specific VPC NAT Gateway.

Example Usage

data "aws_nat_gateway" "default" {
  subnet_id = aws_subnet.public.id
}

With tags

data "aws_nat_gateway" "default" {
  subnet_id = aws_subnet.public.id

  tags = {
    Name = "gw NAT"
  }
}

Argument Reference

The arguments of this data source act as filters for querying the available NAT Gateways in the current Region. The given filters must match exactly one NAT Gateway whose data will be exported as attributes.

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

Attribute Reference

All of the argument attributes except filter block are also exported as result attributes. This data source will complete the data by populating any fields that are not included in the configuration with the data for the selected Nat Gateway.

Timeouts

Configuration options: