Expand description
Provides a VPC DHCP Options resource.
§Example Usage
Basic usage:
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let dnsResolver = vpc_dhcp_options::create(
"dnsResolver",
VpcDhcpOptionsArgs::builder()
.domain_name_servers(vec!["8.8.8.8", "8.8.4.4",])
.build_struct(),
);
}
Full usage:
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
§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
toAmazonProvidedDNS
.
§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
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments