$ aws ec2 create-dhcp-options --dhcp-configuration file://dhcp.json
{
"DhcpOptions": {
"DhcpConfigurations": [
{
"Values": [
"node.consul service.consul ap-northeast-1.compute.internal"
],
"Key": "domain-name"
},
{
"Values": [
"127.0.0.1",
"10.x.0.2"
],
"Key": "domain-name-servers"
}
],
"DhcpOptionsId": "dopt-xxxxxxxx"
}
}
$ aws ec2 associate-dhcp-options --dhcp-options-id dopt-xxxxxxxx --vpc-id vpc-yyyyyyyy
{
"return": "true"
}