Skip to content

Resource: awsDefaultVpcDhcpOptions

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 awsDefaultVpcDhcpOptions 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:

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.defaultVpcDhcpOptions.DefaultVpcDhcpOptions(this, "default", {
  tags: {
    Name: "Default DHCP Option Set",
  },
});

Argument Reference

The arguments of an awsDefaultVpcDhcpOptions differ slightly from awsVpcDhcpOptions resources. Namely, the domainName, domainNameServers and ntpServers arguments are computed. The following arguments are still supported:

  • netbiosNameServers - (Optional) List of NETBIOS name servers.
  • netbiosNodeType - (Optional) The NetBIOS node type (1, 2, 4, or 8). AWS recommends to specify 2 since broadcast and multicast are not supported in their network. For more information about these node types, see RFC 2132.
  • ownerId - The ID of the AWS account that owns the DHCP options set.
  • tags - (Optional) A map of tags to assign to the resource.

Removing awsDefaultVpcDhcpOptions from your configuration

The awsDefaultVpcDhcpOptions 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.

Attributes Reference

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

  • id - The ID of the DHCP Options Set.
  • arn - The ARN of the DHCP Options Set.

Import

VPC DHCP Options can be imported using the dhcpOptionsId, e.g.,

$ terraform import aws_default_vpc_dhcp_options.default_options dopt-d9070ebb