Skip to content

Data Source: aws_vpc_dhcp_options#

Provides information about the DHCP options configuration.

Example usage#

Specific example: performing a lookup by DHCP options ID#

variable dopts_id {}

data "aws_vpc_dhcp_options" "example" {
  dhcp_options_id = var.dopts_id
}

Specific example: performing a lookup by filter#

data "aws_vpc_dhcp_options" "example" {
  filter {
    name   = "key"
    values = ["domain-name"]
  }

  filter {
    name   = "value"
    values = ["example.com"]
  }
}

Argument reference#

  • dhcp_options_id - (Optional, String) The ID of the DHCP options set.
  • filter - (Optional, Block) One or more name/value pairs to use as filters.

filter#

  • name - (Required, String) The name of the filter.
    • Constraints: Filter names are case-sensitive
  • values - (Required, List of strings) One or more filter values.
    • Constraints: Filter values are case-sensitive

Attribute reference#

Supported attributes#

In addition to all arguments above, the following attributes are exported:

  • arn - (String) The Amazon Resource Name (ARN) of the DHCP options set.
  • domain_name - (String) The suffix domain name to be used when resolving non-fully qualified domain names (for example, the search value in the /etc/resolv.conf file).
  • domain_name_servers - (List of strings) The list of name servers set.
  • id - (String) The ID of the DHCP options set.
  • netbios_name_servers - (List of strings) The List of NetBIOS name servers.
  • netbios_node_type - (String) The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.
  • ntp_servers - (List of strings) The list of NTP servers.
  • tags - (Map of strings) Key-value pairs assigned to the resource.

Unsupported attributes#

~> Note This attribute may be present in the terraform.tfstate file, but it has a preset value and cannot be specified in configuration files.

The following attribute is not currently supported: owner_id.