Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infrastructure automation to configure custom domain and SSL certificates #196

Merged
merged 10 commits into from
Nov 6, 2023

Conversation

tjementum
Copy link
Member

Summary & Motivation

Introduce Bicep code to automate the configuration of a Custom Domain and the automatic creation of a valid SSL Certificate for the account-management-api. This process unfolds in three distinct steps:

  1. Deploy the container apps environment to retrieve the auto-generated environment URL and the Custom Domain Verification Id.
  2. Deploy the container app again to set up the Domain and SSL Certificate, albeit without binding them (as this is not supported in one step; see https://github.com/microsoft/azure-container-apps/tree/main/docs/templates/bicep/managedCertificates).
  3. Proceed to bind the SSL certificate to the domain.

The first step will fail when initially setting up custom domains. Bash scripts have been crafted to extract the container app url and Domain Verification ID, providing clear instructions on how to configure CNAME and TXT records to validate domain ownership. Moreover, the procedures for the second and third steps will be executed automatically if needed, streamlining the overall process.

Bash scripts responsible for deploying Bicep code have been updated with enhanced error management.

Update the initialize-azure.sh Bash script, incorporating guidelines on establishing GitHub environments and setting up the DOMAIN_NAME variables.

Simplify the overall deployment structure from GitHub to Azure by adopting a single shared Service Principal. This unified approach caters to the deployment of Bicep infrastructure, the push of container images to ACR, and the deployment of these images across various environments.

Checklist

  • I have added a Label to the pull-request
  • I have added tests, and done manual regression tests
  • I have updated the documentation, if necessary

@tjementum tjementum added the Enhancement New feature or request label Nov 6, 2023
@tjementum tjementum self-assigned this Nov 6, 2023
@tjementum tjementum linked an issue Nov 6, 2023 that may be closed by this pull request
@tjementum tjementum merged commit 2a21a67 into main Nov 6, 2023
8 checks passed
@tjementum tjementum deleted the configure-custom-domain-and-ssl-certificate branch November 6, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up custom domain
1 participant