Skip to content

Commit 32b7e9d

Browse files
committed
Add "Azure" to DNS advisory check
1 parent 1ff7e8b commit 32b7e9d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

bbl-up/task

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,15 @@ function main() {
112112
${name_flag} \
113113
${lb_flags} "2>&1" ${drain} "${root_dir}/bbl_up.log"
114114

115-
ns_record_advisory="For DNS delegation to work, please ensure an NS record for ${LB_DOMAIN} is created in its parent DNS zone with the following nameservers:"
115+
echo "For DNS delegation to work, please ensure an NS record for ${LB_DOMAIN} is created in its parent DNS zone with the following nameservers:"
116116
if [[ "$BBL_IAAS" == "aws" ]]; then
117-
echo "$ns_record_advisory"
118117
bbl outputs | yq '.env_dns_zone_name_servers[0:4]' --output-format yaml | cut -d' ' -f2
119-
elif [[ "$BBL_IAAS" == "gcp" ]]; then
120-
echo "$ns_record_advisory"
121-
bbl outputs | yq '.system_domain_dns_servers' --output-format yaml | cut -d' ' -f2
118+
elif [[ "$BBL_IAAS" == "gcp" || "$BBL_IAAS" == "azure" ]]; then
119+
if bbl outputs | yq '.system_domain_dns_servers' | grep -qv 'null'; then
120+
bbl outputs | yq '.system_domain_dns_servers' --output-format yaml | cut -d' ' -f2
121+
else
122+
echo "No .system_domain_dns_servers found in bbl outputs. Please refer to the GCP/Azure portal to get the DNS servers for the created DNS zone."
123+
fi
122124
fi
123125

124126
if [[ "${DELETE_TERRAFORM_PLUGINS}" == "true" ]]; then

0 commit comments

Comments
 (0)