DNS - Create Domain - AWS CLI
Aim
Details of the output from Ansible
AWS CLI
$ cd awscli/
$ source ../../../providers/aws/setup.bash
$ ./dns-create-domain.bash
+ echo 'An example of List Hosted Zones by Name'
An example of List Hosted Zones by Name
+ aws route53 list-hosted-zones-by-name --profile=alphatest --region=eu-west-2 --endpoint-url=https://aws.piranha.sh
{
"HostedZones": [
{
"Id": "8d943433e0fa60b3",
"Name": "apubliczone.com.",
"CallerReference": "8d943433e0fa60b3",
"Config": {
"Comment": "",
"PrivateZone": false
},
"ResourceRecordSetCount": 1
}
],
"IsTruncated": false,
"MaxItems": "100"
}
+ sleep 10s
+ echo 'An example of Creating a Hosted Zone'
An example of Creating a Hosted Zone
++ echo 2809
++ md5sum
++ head -c 16
++ echo
+ CREF1=c6eb66db018fc7be
++ aws route53 create-hosted-zone --name testfromawsclidemo.com --caller-reference c6eb66db018fc7be --hosted-zone-config 'Comment=Test URL 1' --profile=alphatest --region=eu-west-2 --endpoint-url=https://aws.piranha.sh
++ grep '"Id":'
++ awk '{ print $2 }'
++ sed 's/",//g'
++ sed 's,",,g'
++ head -n1
+ HOSTED_ZONE_ID_1=317701a959075266
+ sleep 10s
+ echo 'Created Hosted Zone ID : 317701a959075266'
Created Hosted Zone ID : 317701a959075266
+ echo 'An example of List Hosted Zones by Name'
An example of List Hosted Zones by Name
+ aws route53 list-hosted-zones-by-name --profile=alphatest --region=eu-west-2 --endpoint-url=https://aws.piranha.sh
{
"HostedZones": [
{
"Id": "8d943433e0fa60b3",
"Name": "apubliczone.com.",
"CallerReference": "8d943433e0fa60b3",
"Config": {
"Comment": "",
"PrivateZone": false
},
"ResourceRecordSetCount": 1
},
{
"Id": "317701a959075266",
"Name": "testfromawsclidemo.com.",
"CallerReference": "317701a959075266",
"Config": {
"Comment": "",
"PrivateZone": false
},
"ResourceRecordSetCount": 1
}
],
"IsTruncated": false,
"MaxItems": "100"
}
+ sleep 10s