1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. VpcDhcpOptions
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.ec2.VpcDhcpOptions

Explore with Pulumi AI

Provides a VPC DHCP Options resource.

Example Usage

Basic usage:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const dnsResolver = new aws.ec2.VpcDhcpOptions("dns_resolver", {domainNameServers: [
    "8.8.8.8",
    "8.8.4.4",
]});
Copy
import pulumi
import pulumi_aws as aws

dns_resolver = aws.ec2.VpcDhcpOptions("dns_resolver", domain_name_servers=[
    "8.8.8.8",
    "8.8.4.4",
])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcDhcpOptions(ctx, "dns_resolver", &ec2.VpcDhcpOptionsArgs{
			DomainNameServers: pulumi.StringArray{
				pulumi.String("8.8.8.8"),
				pulumi.String("8.8.4.4"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var dnsResolver = new Aws.Ec2.VpcDhcpOptions("dns_resolver", new()
    {
        DomainNameServers = new[]
        {
            "8.8.8.8",
            "8.8.4.4",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VpcDhcpOptions;
import com.pulumi.aws.ec2.VpcDhcpOptionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var dnsResolver = new VpcDhcpOptions("dnsResolver", VpcDhcpOptionsArgs.builder()
            .domainNameServers(            
                "8.8.8.8",
                "8.8.4.4")
            .build());

    }
}
Copy
resources:
  dnsResolver:
    type: aws:ec2:VpcDhcpOptions
    name: dns_resolver
    properties:
      domainNameServers:
        - 8.8.8.8
        - 8.8.4.4
Copy

Full usage:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const foo = new aws.ec2.VpcDhcpOptions("foo", {
    domainName: "service.consul",
    domainNameServers: [
        "127.0.0.1",
        "10.0.0.2",
    ],
    ipv6AddressPreferredLeaseTime: "1440",
    ntpServers: ["127.0.0.1"],
    netbiosNameServers: ["127.0.0.1"],
    netbiosNodeType: "2",
    tags: {
        Name: "foo-name",
    },
});
Copy
import pulumi
import pulumi_aws as aws

foo = aws.ec2.VpcDhcpOptions("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",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcDhcpOptions(ctx, "foo", &ec2.VpcDhcpOptionsArgs{
			DomainName: pulumi.String("service.consul"),
			DomainNameServers: pulumi.StringArray{
				pulumi.String("127.0.0.1"),
				pulumi.String("10.0.0.2"),
			},
			Ipv6AddressPreferredLeaseTime: pulumi.String("1440"),
			NtpServers: pulumi.StringArray{
				pulumi.String("127.0.0.1"),
			},
			NetbiosNameServers: pulumi.StringArray{
				pulumi.String("127.0.0.1"),
			},
			NetbiosNodeType: pulumi.String("2"),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("foo-name"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var foo = new Aws.Ec2.VpcDhcpOptions("foo", new()
    {
        DomainName = "service.consul",
        DomainNameServers = new[]
        {
            "127.0.0.1",
            "10.0.0.2",
        },
        Ipv6AddressPreferredLeaseTime = "1440",
        NtpServers = new[]
        {
            "127.0.0.1",
        },
        NetbiosNameServers = new[]
        {
            "127.0.0.1",
        },
        NetbiosNodeType = "2",
        Tags = 
        {
            { "Name", "foo-name" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VpcDhcpOptions;
import com.pulumi.aws.ec2.VpcDhcpOptionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var foo = new VpcDhcpOptions("foo", VpcDhcpOptionsArgs.builder()
            .domainName("service.consul")
            .domainNameServers(            
                "127.0.0.1",
                "10.0.0.2")
            .ipv6AddressPreferredLeaseTime("1440")
            .ntpServers("127.0.0.1")
            .netbiosNameServers("127.0.0.1")
            .netbiosNodeType("2")
            .tags(Map.of("Name", "foo-name"))
            .build());

    }
}
Copy
resources:
  foo:
    type: aws:ec2:VpcDhcpOptions
    properties:
      domainName: service.consul
      domainNameServers:
        - 127.0.0.1
        - 10.0.0.2
      ipv6AddressPreferredLeaseTime: 1440
      ntpServers:
        - 127.0.0.1
      netbiosNameServers:
        - 127.0.0.1
      netbiosNodeType: 2
      tags:
        Name: foo-name
Copy

Remarks

  • Notice that all arguments are optional but you have to specify at least one argument.
  • domain_name_servers, netbios_name_servers, ntp_servers are limited by AWS to maximum four servers only.
  • To actually use the DHCP Options Set you need to associate it to a VPC using aws.ec2.VpcDhcpOptionsAssociation.
  • If you delete a DHCP Options Set, all VPCs using it will be associated to AWS’s default DHCP Option Set.
  • In most cases unless you’re configuring your own DNS you’ll want to set domain_name_servers to AmazonProvidedDNS.

Create VpcDhcpOptions Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VpcDhcpOptions(name: string, args?: VpcDhcpOptionsArgs, opts?: CustomResourceOptions);
@overload
def VpcDhcpOptions(resource_name: str,
                   args: Optional[VpcDhcpOptionsArgs] = None,
                   opts: Optional[ResourceOptions] = None)

@overload
def VpcDhcpOptions(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   domain_name: Optional[str] = None,
                   domain_name_servers: Optional[Sequence[str]] = None,
                   ipv6_address_preferred_lease_time: Optional[str] = None,
                   netbios_name_servers: Optional[Sequence[str]] = None,
                   netbios_node_type: Optional[str] = None,
                   ntp_servers: Optional[Sequence[str]] = None,
                   tags: Optional[Mapping[str, str]] = None)
func NewVpcDhcpOptions(ctx *Context, name string, args *VpcDhcpOptionsArgs, opts ...ResourceOption) (*VpcDhcpOptions, error)
public VpcDhcpOptions(string name, VpcDhcpOptionsArgs? args = null, CustomResourceOptions? opts = null)
public VpcDhcpOptions(String name, VpcDhcpOptionsArgs args)
public VpcDhcpOptions(String name, VpcDhcpOptionsArgs args, CustomResourceOptions options)
type: aws:ec2:VpcDhcpOptions
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args VpcDhcpOptionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args VpcDhcpOptionsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args VpcDhcpOptionsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args VpcDhcpOptionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpcDhcpOptionsArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var vpcDhcpOptionsResource = new Aws.Ec2.VpcDhcpOptions("vpcDhcpOptionsResource", new()
{
    DomainName = "string",
    DomainNameServers = new[]
    {
        "string",
    },
    Ipv6AddressPreferredLeaseTime = "string",
    NetbiosNameServers = new[]
    {
        "string",
    },
    NetbiosNodeType = "string",
    NtpServers = new[]
    {
        "string",
    },
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := ec2.NewVpcDhcpOptions(ctx, "vpcDhcpOptionsResource", &ec2.VpcDhcpOptionsArgs{
	DomainName: pulumi.String("string"),
	DomainNameServers: pulumi.StringArray{
		pulumi.String("string"),
	},
	Ipv6AddressPreferredLeaseTime: pulumi.String("string"),
	NetbiosNameServers: pulumi.StringArray{
		pulumi.String("string"),
	},
	NetbiosNodeType: pulumi.String("string"),
	NtpServers: pulumi.StringArray{
		pulumi.String("string"),
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var vpcDhcpOptionsResource = new VpcDhcpOptions("vpcDhcpOptionsResource", VpcDhcpOptionsArgs.builder()
    .domainName("string")
    .domainNameServers("string")
    .ipv6AddressPreferredLeaseTime("string")
    .netbiosNameServers("string")
    .netbiosNodeType("string")
    .ntpServers("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
vpc_dhcp_options_resource = aws.ec2.VpcDhcpOptions("vpcDhcpOptionsResource",
    domain_name="string",
    domain_name_servers=["string"],
    ipv6_address_preferred_lease_time="string",
    netbios_name_servers=["string"],
    netbios_node_type="string",
    ntp_servers=["string"],
    tags={
        "string": "string",
    })
Copy
const vpcDhcpOptionsResource = new aws.ec2.VpcDhcpOptions("vpcDhcpOptionsResource", {
    domainName: "string",
    domainNameServers: ["string"],
    ipv6AddressPreferredLeaseTime: "string",
    netbiosNameServers: ["string"],
    netbiosNodeType: "string",
    ntpServers: ["string"],
    tags: {
        string: "string",
    },
});
Copy
type: aws:ec2:VpcDhcpOptions
properties:
    domainName: string
    domainNameServers:
        - string
    ipv6AddressPreferredLeaseTime: string
    netbiosNameServers:
        - string
    netbiosNodeType: string
    ntpServers:
        - string
    tags:
        string: string
Copy

VpcDhcpOptions Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VpcDhcpOptions resource accepts the following input properties:

DomainName Changes to this property will trigger replacement. string
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
DomainNameServers Changes to this property will trigger replacement. List<string>
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
Ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. string
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
NetbiosNameServers Changes to this property will trigger replacement. List<string>
List of NETBIOS name servers.
NetbiosNodeType Changes to this property will trigger replacement. string
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.
NtpServers Changes to this property will trigger replacement. List<string>
List of NTP servers to configure.
Tags Dictionary<string, string>
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
DomainName Changes to this property will trigger replacement. string
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
DomainNameServers Changes to this property will trigger replacement. []string
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
Ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. string
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
NetbiosNameServers Changes to this property will trigger replacement. []string
List of NETBIOS name servers.
NetbiosNodeType Changes to this property will trigger replacement. string
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.
NtpServers Changes to this property will trigger replacement. []string
List of NTP servers to configure.
Tags map[string]string
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
domainName Changes to this property will trigger replacement. String
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
domainNameServers Changes to this property will trigger replacement. List<String>
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. String
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbiosNameServers Changes to this property will trigger replacement. List<String>
List of NETBIOS name servers.
netbiosNodeType Changes to this property will trigger replacement. String
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.
ntpServers Changes to this property will trigger replacement. List<String>
List of NTP servers to configure.
tags Map<String,String>
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
domainName Changes to this property will trigger replacement. string
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
domainNameServers Changes to this property will trigger replacement. string[]
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. string
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbiosNameServers Changes to this property will trigger replacement. string[]
List of NETBIOS name servers.
netbiosNodeType Changes to this property will trigger replacement. string
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.
ntpServers Changes to this property will trigger replacement. string[]
List of NTP servers to configure.
tags {[key: string]: string}
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
domain_name Changes to this property will trigger replacement. str
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
domain_name_servers Changes to this property will trigger replacement. Sequence[str]
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
ipv6_address_preferred_lease_time Changes to this property will trigger replacement. str
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbios_name_servers Changes to this property will trigger replacement. Sequence[str]
List of NETBIOS name servers.
netbios_node_type Changes to this property will trigger replacement. str
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.
ntp_servers Changes to this property will trigger replacement. Sequence[str]
List of NTP servers to configure.
tags Mapping[str, str]
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
domainName Changes to this property will trigger replacement. String
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
domainNameServers Changes to this property will trigger replacement. List<String>
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. String
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbiosNameServers Changes to this property will trigger replacement. List<String>
List of NETBIOS name servers.
netbiosNodeType Changes to this property will trigger replacement. String
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.
ntpServers Changes to this property will trigger replacement. List<String>
List of NTP servers to configure.
tags Map<String>
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcDhcpOptions resource produces the following output properties:

Arn string
The ARN of the DHCP Options Set.
Id string
The provider-assigned unique ID for this managed resource.
OwnerId string
The ID of the AWS account that owns the DHCP options set.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
The ARN of the DHCP Options Set.
Id string
The provider-assigned unique ID for this managed resource.
OwnerId string
The ID of the AWS account that owns the DHCP options set.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The ARN of the DHCP Options Set.
id String
The provider-assigned unique ID for this managed resource.
ownerId String
The ID of the AWS account that owns the DHCP options set.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
The ARN of the DHCP Options Set.
id string
The provider-assigned unique ID for this managed resource.
ownerId string
The ID of the AWS account that owns the DHCP options set.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
The ARN of the DHCP Options Set.
id str
The provider-assigned unique ID for this managed resource.
owner_id str
The ID of the AWS account that owns the DHCP options set.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The ARN of the DHCP Options Set.
id String
The provider-assigned unique ID for this managed resource.
ownerId String
The ID of the AWS account that owns the DHCP options set.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing VpcDhcpOptions Resource

Get an existing VpcDhcpOptions resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VpcDhcpOptionsState, opts?: CustomResourceOptions): VpcDhcpOptions
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        domain_name: Optional[str] = None,
        domain_name_servers: Optional[Sequence[str]] = None,
        ipv6_address_preferred_lease_time: Optional[str] = None,
        netbios_name_servers: Optional[Sequence[str]] = None,
        netbios_node_type: Optional[str] = None,
        ntp_servers: Optional[Sequence[str]] = None,
        owner_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> VpcDhcpOptions
func GetVpcDhcpOptions(ctx *Context, name string, id IDInput, state *VpcDhcpOptionsState, opts ...ResourceOption) (*VpcDhcpOptions, error)
public static VpcDhcpOptions Get(string name, Input<string> id, VpcDhcpOptionsState? state, CustomResourceOptions? opts = null)
public static VpcDhcpOptions get(String name, Output<String> id, VpcDhcpOptionsState state, CustomResourceOptions options)
resources:  _:    type: aws:ec2:VpcDhcpOptions    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string
The ARN of the DHCP Options Set.
DomainName Changes to this property will trigger replacement. string
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
DomainNameServers Changes to this property will trigger replacement. List<string>
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
Ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. string
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
NetbiosNameServers Changes to this property will trigger replacement. List<string>
List of NETBIOS name servers.
NetbiosNodeType Changes to this property will trigger replacement. string
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.
NtpServers Changes to this property will trigger replacement. List<string>
List of NTP servers to configure.
OwnerId string
The ID of the AWS account that owns the DHCP options set.
Tags Dictionary<string, string>
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
The ARN of the DHCP Options Set.
DomainName Changes to this property will trigger replacement. string
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
DomainNameServers Changes to this property will trigger replacement. []string
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
Ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. string
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
NetbiosNameServers Changes to this property will trigger replacement. []string
List of NETBIOS name servers.
NetbiosNodeType Changes to this property will trigger replacement. string
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.
NtpServers Changes to this property will trigger replacement. []string
List of NTP servers to configure.
OwnerId string
The ID of the AWS account that owns the DHCP options set.
Tags map[string]string
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The ARN of the DHCP Options Set.
domainName Changes to this property will trigger replacement. String
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
domainNameServers Changes to this property will trigger replacement. List<String>
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. String
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbiosNameServers Changes to this property will trigger replacement. List<String>
List of NETBIOS name servers.
netbiosNodeType Changes to this property will trigger replacement. String
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.
ntpServers Changes to this property will trigger replacement. List<String>
List of NTP servers to configure.
ownerId String
The ID of the AWS account that owns the DHCP options set.
tags Map<String,String>
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
The ARN of the DHCP Options Set.
domainName Changes to this property will trigger replacement. string
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
domainNameServers Changes to this property will trigger replacement. string[]
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. string
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbiosNameServers Changes to this property will trigger replacement. string[]
List of NETBIOS name servers.
netbiosNodeType Changes to this property will trigger replacement. string
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.
ntpServers Changes to this property will trigger replacement. string[]
List of NTP servers to configure.
ownerId string
The ID of the AWS account that owns the DHCP options set.
tags {[key: string]: string}
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
The ARN of the DHCP Options Set.
domain_name Changes to this property will trigger replacement. str
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
domain_name_servers Changes to this property will trigger replacement. Sequence[str]
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
ipv6_address_preferred_lease_time Changes to this property will trigger replacement. str
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbios_name_servers Changes to this property will trigger replacement. Sequence[str]
List of NETBIOS name servers.
netbios_node_type Changes to this property will trigger replacement. str
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.
ntp_servers Changes to this property will trigger replacement. Sequence[str]
List of NTP servers to configure.
owner_id str
The ID of the AWS account that owns the DHCP options set.
tags Mapping[str, str]
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The ARN of the DHCP Options Set.
domainName Changes to this property will trigger replacement. String
the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the search value in the /etc/resolv.conf file.
domainNameServers Changes to this property will trigger replacement. List<String>
List of name servers to configure in /etc/resolv.conf. If you want to use the default AWS nameservers you should set this to AmazonProvidedDNS.
ipv6AddressPreferredLeaseTime Changes to this property will trigger replacement. String
How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
netbiosNameServers Changes to this property will trigger replacement. List<String>
List of NETBIOS name servers.
netbiosNodeType Changes to this property will trigger replacement. String
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.
ntpServers Changes to this property will trigger replacement. List<String>
List of NTP servers to configure.
ownerId String
The ID of the AWS account that owns the DHCP options set.
tags Map<String>
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Import

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

$ pulumi import aws:ec2/vpcDhcpOptions:VpcDhcpOptions my_options dopt-d9070ebb
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.