Data Source: aws_internet_gateway

aws_internet_gateway provides details about a specific Internet Gateway.

Example Usage

variable "vpc_id" {}

data "aws_internet_gateway" "default" {
  filter {
    name   = "attachment.vpc-id"
    values = [var.vpc_id]
  }
}

Argument Reference

The arguments of this data source act as filters for querying the available Internet Gateway in the current region. The given filters must match exactly one Internet 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

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

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 Internet Gateway.

attachments are also exported with the following attributes, when there are relevants: Each attachment supports the following:

Timeouts

Configuration options: