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

Override parameters for bicep parameter files #139

Open
Jarod1662 opened this issue Sep 1, 2023 · 8 comments
Open

Override parameters for bicep parameter files #139

Jarod1662 opened this issue Sep 1, 2023 · 8 comments
Assignees
Labels
need-to-triage Requires investigation

Comments

@Jarod1662
Copy link

Jarod1662 commented Sep 1, 2023

I'm in the process of creating workflows to deploy bicep & bicepparam files and need to pass some overrides however when doing so the overrides are not being set when the workflow is running.

image
image

Workflow error:
image

I have tested using an ARM template and parameter file and this appears to be working as expected.
image
image

Any idea on how to resolve this issue?

@Jarod1662 Jarod1662 added the need-to-triage Requires investigation label Sep 1, 2023
@Jarod1662 Jarod1662 changed the title Override parameters for Bicep files Override parameters for bicep parameter files Sep 1, 2023
@Jarod1662 Jarod1662 reopened this Sep 1, 2023
@dandreasen-uncomn
Copy link

I am also seeing this issue using Bicep and bicepparam files and would like to give this a +1.

At this point, the resolution for me was to deploy the Bicep template along with a JSON ARM parameter file instead of a bicepparam file.

@Jarod1662
Copy link
Author

@bishal-pdMSFT @t-dedah - any update on this?

@rdeveen
Copy link

rdeveen commented Nov 9, 2023

@frasermclean
Copy link

Just wanted to add my +1 to this. I am experiencing this issue on my project. When running the az deployment locally, you can provide multiple --parameters options to override parameter values specified in the bicepparam file. So it should be possible to get this action working correctly,

@frasermclean
Copy link

As a workaround, you could trying running a az bicep build-params --file yourfile.bicepparam to create a JSON parameters file dynamically on the Actions runner. Then use that JSON file and override the parameters.

@jtomkiew-mng
Copy link

Regarding workarounds, can confirm the action does not override bicepparam parameters if defined in parameters input, e.g.:

parameters: >-
  main.bicepparam
  customParameter=overrideValue

but it does work if specified in additionalArguments input, e.g.:

parameters: main.bicepparam
additionalArguments: >-
  -p customParameter=overrideValue

@anthony-c-martin
Copy link
Member

I believe this should be fixed by Azure/azure-cli#28826.

@Jarod1662
Copy link
Author

I believe this should be fixed by Azure/azure-cli#28826.

I believe this needs to be revisited. I've just tried the workaround as mentioned by @jtomkiew-mng and can confirm that's working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-to-triage Requires investigation
Projects
None yet
Development

No branches or pull requests

8 participants