-
Notifications
You must be signed in to change notification settings - Fork 195
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
provisioning: Define mapping between AZURE_ENV_VAR
to parameter
#4404
Comments
With the AZURE_VAR mapping, is that how they would get set, i.e. |
Hi @pamelafox! The current proposal is that we'd use The alternative proposal is to adopt something that would avoid naming collisions, such as |
Background
azd users currently define a mapping between environment variables (
AZURE_ENV_NAME
) and Bicep parameters (envName
) insidemain.parameters.json
andmain.bicepparam
. While this works, from a UX perspective, it introduces another point of configuration with users. The environment substitution syntax, while powerful and used in many advanced cases, is also a potential source of misconfiguration due to lacking of upfront tooling validation.Proposal
Define an automatic naming translation rule between environment variables and provisioning parameters. When variables are not mapped explicitly,
azd
will automatically allow for an environment variable override for parameters.Some useful background to consider:
TF_VAR_<case sensitive variable name>
, described in the Terraform docs.Some properties of this proposal:
pipeline config
would set individual key-values rather than a JSON object, such asAZD_INITIAL_ENVIRONMENT_CONFIG
. This would help with troubleshooting and debugging for DevOps scenarios.Risks
For advanced DevOps users that are largely familiar with the Azure Bicep ecosystem, there may be slight hesitation towards adopting environment variables as input parameters (even if they are just overrides). An observation that may reduce assessment of this risk is that we have seen through wide-usage of environment variables over parameter files based on current azd usage in the template ecosystem.
The text was updated successfully, but these errors were encountered: