I have a DHCPOptions defined in my CloudFormation template as so:
DhcpOptionSet:
Type: AWS::EC2::DHCPOptions
DependsOn:
- DnsInstance
- DnsSecondaryInstance
Properties:
DomainName: test.local
DomainNameServers:
- !GetAtt DnsInstance.PrivateIp
- !GetAtt DnsSecondaryInstance.PrivateIp
- AmazonProvidedDNS
Tags:
- Key: Name
Value: test-option-set
However, when CF creates the DHCP OptionSet, the order of the Name Servers doesn't match what I've defined in the template. It seems that no matter what order I put them in for my template, they end up as:
DnsSecondaryInstance.PrivateIp,AmazonProvidedDNS,DnsInstance.PrivateIp
This causes the resolv.conf
on servers to be in the wrong order.
Is there anyway to ensure the ordering of the OptionSet?