You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is common to configure a DHCP Options Set when creating a VPC, which allows DNS Servers, a custom search domain, NTP servers and a few other parameters to instances via the DHCP system built into the VPC control plane.
Currently the following function can be used to add an options set for a custom search domain.
functionaddDhcpOptions(namePrefix: string,baseTags: aws.Tags,zoneName: string,vpc: awsx.ec2.Vpc): pulumi.Output<string>{constprivateZone=newaws.route53.Zone(`${namePrefix}-private-hosted-zone`,{vpcs: [{vpcId: vpc.id,}],name: zoneName,comment: `Private zone for ${zoneName}. Managed by Pulumi.`,},{parent: vpc});constdhcpOptionSet=newaws.ec2.VpcDhcpOptions(`${namePrefix}-dhcp-options`,{domainName: privateZone.name,domainNameServers: ["AmazonProvidedDNS"],tags: Object.assign({Name: `DHCP Options (${zoneName})`,},baseTags),},vpc);newaws.ec2.VpcDhcpOptionsAssociation(`${namePrefix}-dhcp-options-assoc`,{vpcId: vpc.id,dhcpOptionsId: dhcpOptionSet.id,},{parent: dhcpOptionSet});returnprivateZone.zoneId;}
Note: the above program also creates the zone itself, which I do not believe should be done by the Vpc class.
It would be nice to allow a zone ID or name to be passed to the VpcArgs of awsx.ec2.Vpc in order that this can be done automatically, and that the zone ID can be exposed as one of the outputs of the Vpc instead of being passed around separately to create records on it.
The text was updated successfully, but these errors were encountered:
It is common to configure a DHCP Options Set when creating a VPC, which allows DNS Servers, a custom search domain, NTP servers and a few other parameters to instances via the DHCP system built into the VPC control plane.
Currently the following function can be used to add an options set for a custom search domain.
Note: the above program also creates the zone itself, which I do not believe should be done by the
Vpc
class.It would be nice to allow a zone ID or name to be passed to the
VpcArgs
ofawsx.ec2.Vpc
in order that this can be done automatically, and that the zone ID can be exposed as one of the outputs of theVpc
instead of being passed around separately to create records on it.The text was updated successfully, but these errors were encountered: