Skip to content

feat: support .bicepparam parameter files for Bicep deployments#253

Merged
maniSbindra merged 4 commits into
mainfrom
bgdnext64/12-support-bicep-style-parameters-file
Jun 24, 2026
Merged

feat: support .bicepparam parameter files for Bicep deployments#253
maniSbindra merged 4 commits into
mainfrom
bgdnext64/12-support-bicep-style-parameters-file

Conversation

@bgdnext64

Copy link
Copy Markdown
Collaborator

Detect .bicepparam extension on --parametersFilePath and automatically compile to ARM JSON format using 'bicep build-params' before deployment. Both .json and .bicepparam formats are now supported.

  • Add .bicepparam detection and compilation in bicepCmd.go
  • Add storage-account-simple-params.bicepparam sample file
  • Add TestBicepWithBicepparamFile e2e test
  • Update known-issues doc (no longer unsupported)
  • Add .bicepparam example to quickstart and flags docs

Closes #12

@bgdnext64 bgdnext64 requested a review from a team as a code owner April 10, 2026 15:46
@bgdnext64 bgdnext64 linked an issue Apr 10, 2026 that may be closed by this pull request
@bgdnext64 bgdnext64 requested a review from Copilot April 10, 2026 16:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class support for Bicep-native .bicepparam parameter files in the MPF Bicep workflow by compiling them to ARM JSON parameters via bicep build-params when provided through --parametersFilePath, and updates samples/docs/tests accordingly (closes #12).

Changes:

  • Detect .bicepparam in cmd/bicepCmd.go and compile to .parameters.json before running the deployment authorization checker.
  • Add a .bicepparam sample and an e2e test exercising bicep build-params + deployment with the compiled parameters.
  • Update documentation to reflect .bicepparam support and provide quickstart/flags examples.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
cmd/bicepCmd.go Adds .bicepparam detection and invokes bicep build-params to generate ARM JSON parameters prior to deployment.
e2eTests/e2eBicep_test.go Adds a new e2e test using a .bicepparam file (compiled to JSON) with a simple storage account Bicep sample.
samples/bicep/storage-account-simple-params.bicepparam Adds a Bicep-native parameters file sample referencing the storage account template.
docs/known-issues-and-workarounds.MD Updates known-issues to reflect that .bicepparam is now supported.
docs/installation-and-quickstart.md Adds quickstart examples showing .bicepparam usage (currently has formatting/command issues).
docs/commandline-flags-and-env-variables.md Updates flag documentation to note .json and .bicepparam are supported.
go.mod Bumps the Go toolchain version referenced by the module.

Comment thread cmd/bicepCmd.go Outdated
Comment thread docs/installation-and-quickstart.md
Comment thread docs/installation-and-quickstart.md Outdated
Comment thread e2eTests/e2eBicep_test.go Outdated
Comment thread e2eTests/e2eBicep_test.go Outdated
Comment thread e2eTests/e2eBicep_test.go Outdated
Comment thread e2eTests/e2eBicep_test.go

@maniSbindra maniSbindra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review findings not yet raised by the automated review.

Comment thread cmd/bicepCmd.go Outdated
Comment thread e2eTests/e2eBicep_test.go Outdated

@maniSbindra maniSbindra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, a few changes in addition to the automated review requested. Thanks, Mani

@bgdnext64

Copy link
Copy Markdown
Collaborator Author

Quick update on testing: I ran the new TestBicepWithBicepparamFile e2e against my test tenant end-to-end, not just locally as a build/vet. Created a fresh service principal with no role assignments (so MPF managed them dynamically), pointed it at samples/bicep/storage-account-simple-params.bicepparam, and let it go through the full discovery loop.

Result: PASS in about 120 seconds. The auto-compile path via the new bicepUtils.CompileBicepParamsToTempFile helper worked, the temp .parameters.json was cleaned up, and the storage-account deployment converged on exactly 4 permissions (Microsoft.Resources/deployments/{read,write} and Microsoft.Storage/storageAccounts/{read,write}), which is what the assertion now requires. Resource group, custom role, and the temp SP were all cleaned up afterwards.

Also worth flagging: the failing CI checks here look like the same upstream go-task/setup-task "unable to get latest version" issue we hit on #254 — it dies inside the action's own setup before any of our code runs, the workflow files are unchanged, and the same workflow was green on main last week. Happy to open a small PR pinning go-task/setup-task to a specific version (e.g. 3.50.0) instead of 3.x if that would help unblock things repo-wide.

bgdnext64 added 3 commits June 8, 2026 10:28
Detect .bicepparam extension on --parametersFilePath and automatically
compile to ARM JSON format using 'bicep build-params' before deployment.
Both .json and .bicepparam formats are now supported.

- Add .bicepparam detection and compilation in bicepCmd.go
- Add storage-account-simple-params.bicepparam sample file
- Add TestBicepWithBicepparamFile e2e test
- Update known-issues doc (no longer unsupported)
- Add .bicepparam example to quickstart and flags docs

Closes #12
- Bump Go 1.26.1 to 1.26.2 to fix stdlib vulnerabilities (govulncheck)
- Fix errcheck: handle os.Remove return value in e2eBicep_test.go
- Fix markdown: add missing blank lines before headings
@bgdnext64 bgdnext64 force-pushed the bgdnext64/12-support-bicep-style-parameters-file branch from 871c8b3 to a6e4e30 Compare June 8, 2026 16:34
@bgdnext64 bgdnext64 requested a review from maniSbindra June 8, 2026 17:53

@maniSbindra maniSbindra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@maniSbindra maniSbindra added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit 35ef6a2 Jun 24, 2026
17 checks passed
@maniSbindra maniSbindra deleted the bgdnext64/12-support-bicep-style-parameters-file branch June 24, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support bicep style parameters file

3 participants