処理の実行
Route53委任セットの作成
Route53委任セットを作成します。
変数の確認:
cat << END
# ROUTE53_REUSABLE_DELEGATION_SET_CALLER:"handson-cli-route53-before-dgset-XXXXXXXXXX"
ROUTE53_REUSABLE_DELEGATION_SET_CALLER="${ROUTE53_REUSABLE_DELEGATION_SET_CALLER}"
END
コマンド:
aws route53 create-reusable-delegation-set \
--caller-reference ${ROUTE53_REUSABLE_DELEGATION_SET_CALLER}
結果(例):
{
"Location": "https://route53.amazonaws.com/2013-04-01/delegationset/NXXXXXXXXXXXXXXXXXXXX",
"DelegationSet": {
"NameServers": [
"ns-xxx.awsdns-xx.org",
"ns-xxx.awsdns-xx.com",
"ns-xxx.awsdns-xx.co.uk",
"ns-xxx.awsdns-xx.net"
],
"CallerReference": "handson-cli-route53-before-dgset-XXXXXXXXXX",
"Id": "/delegationset/NXXXXXXXXXXXXXXXXXXXX"
}
}
Route53委任セット識別子の保存
Route53委任セット識別子を一時ファイルに保存します。
コマンド:
echo "ROUTE53_REUSABLE_DELEGATION_SET_CALLER='${ROUTE53_REUSABLE_DELEGATION_SET_CALLER}'" \
> ${FILE_TMP_ROUTE53_REUSABLE_DELEGATION_SET}
cat ${FILE_TMP_ROUTE53_REUSABLE_DELEGATION_SET}
結果(例):
ROUTE53_REUSABLE_DELEGATION_SET_CALLER='handson-cli-route53-before-dgset-XXXXXXXXXX'
完了確認
「Route53委任セット"handson-cli-route53-before-dgset-XXXXXXXXXX"が存在する。」ことを確認します。
コマンド:
aws route53 list-reusable-delegation-sets \
--query "DelegationSets[?CallerReference == \`${ROUTE53_REUSABLE_DELEGATION_SET_CALLER}\`].CallerReference" \
--output text
結果(例):
handson-cli-route53-before-dgset-XXXXXXXXXX
「一時ファイルファイル名"${HOME}/environment/tmp-handson-cli-route53-before/handson-cli-domain.tmp"にRoute53委任セット識別子の変数定義が存在する。」ことを確認します。
コマンド:
ls ${FILE_TMP_ROUTE53_REUSABLE_DELEGATION_SET}
結果(例):
${HOME}/environment/tmp-handson-cli-route53-before/handson-cli-route53-reusable_delegation_set.tmp