Cloudformation: How to Reference a DNS IP address for DHCPOptions, why does

0

Just trying to create a simple DHCP option set to me EC2 instances have a default domain..

but when i just input the ip address as a test ( not even referencing) it is telling me it wants a string

DHCPTest:
Type: AWS::EC2::DHCPOptions
Properties:
DomainName: test.com
DomainNameServers: "10.0.0.1"

Value of property DomainNameServers must be of type List of String

The domain name Servers will be a reference to an EC2 created IP address

but i can just go into the front end and simple type in that ip address and it saves fine... i dont want to use the amazon provided DNS.. how can i create the DHCP with the ip addresses? This should be simple

asked 5 years ago381 views
1 Answer
0

[SOLVED] Its a LIST of string, not a string. Reading Comprehension helps

If anyone else runs into this, the syntax is:

DomainNameServers:
- !getAtt AdInstance.PrivateIp

works, needs to be listed with the dashes

Edited by: JWhitcomb-AWS on Jun 17, 2019 9:52 AM

Edited by: JWhitcomb-AWS on Jun 17, 2019 9:53 AM

Edited by: JWhitcomb-AWS on Jun 17, 2019 9:53 AM

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions