Azure-Samples / apptemplate-wordpress-on-aca

Template to deploy Wordpress on Azure Container apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add outputs in main.bicep to write to environment variables

puicchan opened this issue · comments

azd includes all outputs in .env after a customer runs azd up or azd provision. If you add all the outputs, customers do not need to manually edit the following:

AZD_PIPELINE_PROVIDER="github"
AZURE_ADMIN_PASSWORD="<THE JUMPHOST PASSWORD>"
AZURE_ADMIN_USERNAME="<THE JUMPHOST USERNAME>"
AZURE_APPLICATION_NAME="<AN APPLICATION NAME>"
AZURE_ENV_NAME="prod"
AZURE_FQDN="<THE FQDN OF THE SITE>"
AZURE_LOCATION="<AN AZURE DC REGION>"
AZURE_MARIADB_PASSWORD="<THE MARIADB PASSWORD>"
AZURE_PRINCIPAL_ID=""
AZURE_SUBSCRIPTION_ID="<YOUR AZURE SUBSCRIPTION ID>"
resourceGroupName="<THE RESOURCE GROUP NAME>"

Also, if default value is not found for a parameter, azd will prompt customer for input.

  1. e.g., add in main.bicep,
    output AZURE_ADMIN_USERNAME string = adminUsername
  2. For consistent - rename resourceGroupName to AZURE_RESOURCE_GROUP.

Implementation is now complete.

  • Deployment has been parameterized and can now leverage azd up instead of manually editing the .env file.
  • Documentation has been updated to reflect the new onboarding
  • Passwords are not being outputted for security reasons and users will have to provide them each time.
  • resourceGroupName has been renamed to AZURE_RESOURCE_GROUP for consistency