[Issue] `azd up` & `azd provision` with bicep parameters?
justinyoo opened this issue · comments
- Make sure you've installed the latest version using instructions in the wiki
Output from azd version
azd version 1.9.2 (commit c58b02f71710960aba28f81f3698e64cfdda9f96)
Describe the bug
It's not a bug but a feature request. azd provision
relies on the bicep template. When I run the bicep template using the az
CLI command, it should look like:
az deployment sub create \
-n <NAME> \
-l <LOCATION> \
--template-file ./infra/main.bicep \
--parameters environmentName=$AZURE_ENV_NAME \
--parameters location=<LOCATION> \
--parameters <PARAMETER_KEY_1>=<PARAMETER_VALUE_1> \
...
However, there's no way to provide parameters while running either azd up
or azd provision
command. So, if I run either azd up
or azd provision
, can we add the --parameters
option so that the parameter input prompt won't appear?
@justinyoo - azd
supports setting Bicep parameters in the following ways:
- Interactive mode via a prompt from
azd
when a required parameter is missing a value - By configuring
main.parameters.json
that supports environment variable substitutions along with default values. - By configuring
main.bicepparam
(See Azure docs for more info)
By using either option 2 or 3 you could then dynamically set any referenced variables and avoid any interactive prompts.
Additionally having a parameter that can easily be set via a --parameters
flag or similar is something that has been discussed but not available yet. Thanks for the feedback!
@wbreza Thanks for getting back to me!
I know all the options, but any of them goes slightly off.
- I want to avoid the interactive mode
- I want to provide some parameter values dynamically generated from somewhere
My current solution is either option 2 or 3, but I think my feature request is also a nice-to-have-feature to provide devs with better flexibility.
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!