Resource: aws_default_vpc_dhcp_options

Provides a resource to manage the default AWS DHCP Options Set in the current region.

Each AWS region comes with a default set of DHCP options. This is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.

The aws_default_vpc_dhcp_options behaves differently from normal resources, in that Terraform does not _create_ this resource, but instead "adopts" it into management.

Example Usage

Basic usage with tags:

resource "aws_default_vpc_dhcp_options" "default" {
  tags = {
    Name = "Default DHCP Option Set"
  }
}

Argument Reference

The arguments of an aws_default_vpc_dhcp_options differ slightly from aws_vpc_dhcp_options resources. Namely, the domain_name, domain_name_servers and ntp_servers arguments are computed. The following arguments are still supported:

Removing aws_default_vpc_dhcp_options from your configuration

The aws_default_vpc_dhcp_options resource allows you to manage a region's default DHCP Options Set, but Terraform cannot destroy it. Removing this resource from your configuration will remove it from your statefile and management, but will not destroy the DHCP Options Set. You can resume managing the DHCP Options Set via the AWS Console.

Attribute Reference

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

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_default_vpc_dhcp_options.default_options
  id = "dopt-d9070ebb"
}

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

% terraform import aws_default_vpc_dhcp_options.default_options dopt-d9070ebb