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
But there is a chicken and egg problem. These values need to be sent as parameters to Bicep scripts, but the values are not available before the environment is up and running. This includes both the value of the CNAME where the kindsand-a1a794b7 part is autogenerated by Azure, and the SHA1 hash for the TXT Record.
Challenges
Autogenerated CNAME: The kindsand-a1a794b7 part in the CNAME value is autogenerated by Azure. Until the environment is up, we can't fetch this value.
TXT Record SHA1 Hash: The hash is another piece of data that can't be determine until the environment is up.
Bicep Script Parameters: Both values are needed as parameters to Bicep scripts, which complicates automation.
Full Automation Requirement: The goal is to automate everything, so manual steps are undesirable.
Potential Solutions
Two-Phase Deployment: First, deploy only the Azure Container App using Bicep. Once it's up, use Azure CLI or SDKs to fetch the autogenerated values, and then redeploy the Bicep script with these parameters. This makes the process semi-automatic but could be scripted.
Custom DNS Management Script: Use Azure SDKs or Azure CLI to create a script that detects changes in the autogenerated domain name and updates DNS accordingly. This can run post-deployment. It's fully automated but adds an extra layer of complexity.
Azure Functions/Webhooks: Utilize Azure Functions or similar to trigger when a new environment is up. The function can then update the DNS records. This is an event-driven approach.
Azure Automation Account: Use Azure Automation to run a script that fetches the necessary data and updates the Bicep parameters. This could be a scheduled task that checks for changes and applies them.
The text was updated successfully, but these errors were encountered:
Background
To set up a custom domain and SSL certificate in Azure Container Apps two DNS records need to be added. E.g.
Type: CNAME
Host: account-management-api
Value: account-management-api.kindsand-a1a794b7.westeurope.azurecontainerapps.io
Type: TXT
Host: asuid.account-management-api
Value: CBCE06E92E4955E5625EC8190B8DD45CD98D72722D53468484C9000748278897
But there is a chicken and egg problem. These values need to be sent as parameters to Bicep scripts, but the values are not available before the environment is up and running. This includes both the value of the CNAME where the
kindsand-a1a794b7
part is autogenerated by Azure, and the SHA1 hash for the TXT Record.Challenges
Potential Solutions
The text was updated successfully, but these errors were encountered: