VpcDhcpOptions
Provides a VPC DHCP Options resource.
Remarks
- Notice that all arguments are optional but you have to specify at least one argument.
domain_name_servers,netbios_name_servers,ntp_serversare 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
defaultDHCP Option Set. - In most cases unless you’re configuring your own DNS you’ll want to set
domain_name_serverstoAmazonProvidedDNS.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var dnsResolver = new Aws.Ec2.VpcDhcpOptions("dnsResolver", new Aws.Ec2.VpcDhcpOptionsArgs
{
DomainNameServers =
{
"8.8.8.8",
"8.8.4.4",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewVpcDhcpOptions(ctx, "dnsResolver", &ec2.VpcDhcpOptionsArgs{
DomainNameServers: pulumi.StringArray{
pulumi.String("8.8.8.8"),
pulumi.String("8.8.4.4"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
dns_resolver = aws.ec2.VpcDhcpOptions("dnsResolver", domain_name_servers=[
"8.8.8.8",
"8.8.4.4",
])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",
],
});Create a VpcDhcpOptions Resource
new VpcDhcpOptions(name: string, args?: VpcDhcpOptionsArgs, opts?: CustomResourceOptions);def VpcDhcpOptions(resource_name, opts=None, domain_name=None, domain_name_servers=None, netbios_name_servers=None, netbios_node_type=None, ntp_servers=None, tags=None, __props__=None);func NewVpcDhcpOptions(ctx *Context, name string, args *VpcDhcpOptionsArgs, opts ...ResourceOption) (*VpcDhcpOptions, error)public VpcDhcpOptions(string name, VpcDhcpOptionsArgs? args = null, CustomResourceOptions? opts = null)- name 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 str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name 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 string
- The unique name of the resource.
- args VpcDhcpOptionsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
VpcDhcpOptions Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The VpcDhcpOptions resource accepts the following input properties:
- Domain
Name 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
searchvalue in the/etc/resolv.conffile.- Domain
Name List<string>Servers List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.- Netbios
Name List<string>Servers List of NETBIOS name servers.
- Netbios
Node stringType 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 List<string> List of NTP servers to configure.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Domain
Name 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
searchvalue in the/etc/resolv.conffile.- Domain
Name []stringServers List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.- Netbios
Name []stringServers List of NETBIOS name servers.
- Netbios
Node stringType 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 []string List of NTP servers to configure.
- map[string]string
A map of tags to assign to the resource.
- domain
Name 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
searchvalue in the/etc/resolv.conffile.- domain
Name string[]Servers List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.- netbios
Name string[]Servers List of NETBIOS name servers.
- netbios
Node stringType 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 string[] List of NTP servers to configure.
- {[key: string]: string}
A map of tags to assign to the resource.
- domain_
name 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
searchvalue in the/etc/resolv.conffile.- domain_
name_ List[str]servers List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.- netbios_
name_ List[str]servers List of NETBIOS name servers.
- netbios_
node_ strtype 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 List[str] List of NTP servers to configure.
- Dict[str, str]
A map of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcDhcpOptions resource produces the following output properties:
Look up an 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): VpcDhcpOptionsstatic get(resource_name, id, opts=None, arn=None, domain_name=None, domain_name_servers=None, netbios_name_servers=None, netbios_node_type=None, ntp_servers=None, owner_id=None, tags=None, __props__=None);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)- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Domain
Name 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
searchvalue in the/etc/resolv.conffile.- Domain
Name List<string>Servers List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.- Netbios
Name List<string>Servers List of NETBIOS name servers.
- Netbios
Node stringType 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 List<string> List of NTP servers to configure.
- Owner
Id string The ID of the AWS account that owns the DHCP options set.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Arn string
The ARN of the DHCP Options Set.
- Domain
Name 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
searchvalue in the/etc/resolv.conffile.- Domain
Name []stringServers List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.- Netbios
Name []stringServers List of NETBIOS name servers.
- Netbios
Node stringType 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 []string List of NTP servers to configure.
- Owner
Id string The ID of the AWS account that owns the DHCP options set.
- map[string]string
A map of tags to assign to the resource.
- arn string
The ARN of the DHCP Options Set.
- domain
Name 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
searchvalue in the/etc/resolv.conffile.- domain
Name string[]Servers List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.- netbios
Name string[]Servers List of NETBIOS name servers.
- netbios
Node stringType 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 string[] List of NTP servers to configure.
- owner
Id string The ID of the AWS account that owns the DHCP options set.
- {[key: string]: string}
A map of tags to assign to the resource.
- arn str
The ARN of the DHCP Options Set.
- domain_
name 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
searchvalue in the/etc/resolv.conffile.- domain_
name_ List[str]servers List of name servers to configure in
/etc/resolv.conf. If you want to use the default AWS nameservers you should set this toAmazonProvidedDNS.- netbios_
name_ List[str]servers List of NETBIOS name servers.
- netbios_
node_ strtype 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 List[str] List of NTP servers to configure.
- owner_
id str The ID of the AWS account that owns the DHCP options set.
- Dict[str, str]
A map of tags to assign to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.