Resource: aws_vpc_dhcp_options

Provides a VPC DHCP Options resource.

Example Usage

Basic usage:

resource "aws_vpc_dhcp_options" "dns_resolver" {
  domain_name_servers = ["8.8.8.8", "8.8.4.4"]
}

Full usage:

resource "aws_vpc_dhcp_options" "foo" {
  domain_name                       = "service.consul"
  domain_name_servers               = ["127.0.0.1", "10.0.0.2"]
  ipv6_address_preferred_lease_time = 1440
  ntp_servers                       = ["127.0.0.1"]
  netbios_name_servers              = ["127.0.0.1"]
  netbios_node_type                 = 2

  tags = {
    Name = "foo-name"
  }
}

Argument Reference

This resource supports the following arguments:

Remarks

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

You can find more technical documentation about DHCP Options Set in the official AWS User Guide.

Import

In Terraform v1.5.0 and later, use an import block to import VPC DHCP Options using the DHCP Options id. For example:

import {
  to = aws_vpc_dhcp_options.my_options
  id = "dopt-d9070ebb"
}

Using terraform import, import VPC DHCP Options using the DHCP Options id. For example:

% terraform import aws_vpc_dhcp_options.my_options dopt-d9070ebb