Azure-Samples / apptemplate-wordpress-on-aca

Template to deploy Wordpress on Azure Container apps
MIT License
28 stars 31 forks source link

Add outputs in main.bicep to write to environment variables #2

Closed puicchan closed 1 year ago

puicchan commented 1 year ago

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.
kpantos commented 1 year ago

Implementation is now complete.