Remove disabled WhatIf ARM checker and its leftover config fields - #304
Merged
Mani Bindra (maniSbindra) merged 1 commit intoAug 6, 2026
Merged
Conversation
Whatif mode was disabled a while back in favor of full deployment mode, so the ARMTemplateWhatIf checker is dead code now. Drop it along with the SubscriptionScoped and Location fields on ArmTemplateAdditionalConfig that only the whatif path ever read, and point the design doc at the deployment checker that actually implements the interface for ARM/Bicep.
Copilot started reviewing on behalf of
Brian Gordon Davis (bgdnext64)
August 4, 2026 16:41
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy (disabled) ARM/Bicep WhatIf authorization checker and trims the shared ARM template config down to only the fields used by the active full-deployment authorization checker.
Changes:
- Deleted the unused
ARMTemplateWhatIfauthorization checker implementation. - Removed
LocationandSubscriptionScopedfromARMTemplateShared.ArmTemplateAdditionalConfigand updated command wiring accordingly. - Updated design documentation to reference the active ARM/Bicep deployment checker implementation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/infrastructure/authorizationCheckers/ARMTemplateWhatIf/armTemplateWhatIfAuthorizationChecker.go | Removes dead WhatIf checker code now that WhatIf mode is disabled. |
| pkg/infrastructure/ARMTemplateShared/armTemplateShared.go | Simplifies ArmTemplateAdditionalConfig by removing fields only used by the removed WhatIf path. |
| docs/mpf-design.md | Updates design doc to point to the active ARM/Bicep deployment checker implementation. |
| cmd/bicepCmd.go | Stops populating removed ArmTemplateAdditionalConfig.Location; --location continues to drive RG location. |
| cmd/armCmd.go | Stops populating removed ArmTemplateAdditionalConfig.Location; --location continues to drive RG location. |
Mani Bindra (maniSbindra)
approved these changes
Aug 6, 2026
Mani Bindra (maniSbindra)
deleted the
refactor/38-cleanup-armtemplateshared
branch
August 6, 2026 07:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the legacy WhatIf authorization checker and the config it relied on, now that full deployment is the only supported mode for ARM and Bicep.
WhatIf mode was disabled some time ago (see the "whatif mode has been disabled" note in
armCmd.go/bicepCmd.go), soARMTemplateWhatIf/armTemplateWhatIfAuthorizationChecker.gois dead code — nothing in the active build path imports it, only commented-out blocks in the e2e tests referenced it.Changes:
ARMTemplateWhatIfpackage (the disabled checker).SubscriptionScopedandLocationfields fromArmTemplateAdditionalConfig. These were only ever read by the WhatIf path (subscription-scoped deployments and the WhatIf deployment location). The full-deployment checker derives the resource group location fromMPFConfig.ResourceGroup, so nothing else depended on them.Location: flgLocationassignments inarmCmd.goandbicepCmd.go(the--locationflag still drives the resource group location as before).docs/mpf-design.mdto point atARMTemplateDeployment/armTemplateAuthorizationChecker.go, which is the checker that actually implementsDeploymentAuthorizationCheckerCleanerfor ARM/Bicep.The shared
ArmTemplateAdditionalConfig,ErrInvalidTemplate, andGetParametersInStandardFormatinARMTemplateSharedremain, since the full-deployment checker still uses them.Verified with
go build ./...,go vet ./... ./e2eTests/..., andgo test ./cmd/... ./pkg/...(all green).Fixes #38