You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stabilize infrastructure deployments by fixing race conditions and making deployment names unique (#461)
### Summary & Motivation
Make all Bicep module deployment names unique to avoid concurrent
deployments of resources like managed identity container permissions.
This resolves issues where deployments failed due to naming conflicts.
Fix race condition when assigning user-managed identity permissions to
container registry immediately after creation. The fix involves setting
the `principalType` to `ServicePrincipal` on Bicep `roleAssignments`
resource.
Remove `-role-assignment` postfix from Bicep module names to allow for
longer resource names, as deployment names in Bicep cannot be longer
than 64 characters.
Ensure `deploy-cluster.sh` reliably checks for failed deployments even
when `az CLI` outputs warnings. This ensures JSON results are parsed
correctly by stripping any prefixed warning messages.
Rename Application Insights smart detection resource from `Application
Insights smart detection` to
`staging-application-insights-smart-detection`.
Fix information message about setting up SSL certificate to use domain
name instead of `account-management`.
### Checklist
- [x] I have added a Label to the pull-request
- [x] I have added tests, and done manual regression tests
- [x] I have updated the documentation, if necessary
Copy file name to clipboardExpand all lines: cloud-infrastructure/cluster/deploy-cluster.sh
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -76,8 +76,9 @@ then
76
76
RED='\033[0;31m'
77
77
RESET='\033[0m'# Reset formatting
78
78
79
+
cleaned_output=$(echo "$output"| sed '/^WARNING/d')
79
80
# Check for the specific error message indicating that DNS Records are missing
80
-
if [[ $output==*"InvalidCustomHostNameValidation"* ]] || [[ $output==*"FailedCnameValidation"* ]] || [[ $output==*"-certificate' under resource group '$RESOURCE_GROUP_NAME' was not found"* ]];then
81
+
if [[ $cleaned_output==*"InvalidCustomHostNameValidation"* ]] || [[ $cleaned_output==*"FailedCnameValidation"* ]] || [[ $cleaned_output==*"-certificate' under resource group '$RESOURCE_GROUP_NAME' was not found"* ]];then
81
82
# Get details about the container apps environment. Although the creation of the container app fails, the verification ID on the container apps environment is consistent across all container apps.
82
83
env_details=$(az containerapp env show --name "$LOCATION_PREFIX-container-apps-environment" --resource-group "$RESOURCE_GROUP_NAME")
83
84
@@ -90,27 +91,28 @@ then
90
91
echo -e "${RED}- A TXT record with the name 'asuid.$DOMAIN_NAME' and the value '$custom_domain_verification_id'.${RESET}"
91
92
echo -e "${RED}- A CNAME record with the Host name '$DOMAIN_NAME' that points to address 'app-gateway.$default_domain'.${RESET}"
# If the domain was not configured during the first run and we didn't receive any warnings about missing DNS entries, we trigger the deployment again to complete the binding of the SSL Certificate to the domain.
99
100
if [[ "$IS_DOMAIN_CONFIGURED"=="false" ]] && [[ "$DOMAIN_NAME"!="" ]];then
100
-
echo"Running deployment again to finalize setting up SSL certificate for account-management"
101
+
echo"Running deployment again to finalize setting up SSL certificate for $DOMAIN_NAME"
0 commit comments