Repository navigation
feat(bootstrap): expose move_subscriptions_to_target_management_group toggle (#4205) - #141
Merged
Qi Zhang (Zhangqi910) merged 1 commit intoOct 10, 2026
Conversation
… toggle (#4205) Adds an optional bool input 'move_subscriptions_to_target_management_group' to the azuredevops, github and local variants. Defaults to null, preserving current behaviour (var.iac_type != 'bicep-classic'). Allows brownfield estates whose platform subscriptions are already placed to opt out of relocation during bootstrap.
Shaik Naseeruddin (NaseerDevops-1994)
requested a review
from Qi Zhang (Zhangqi910)
August 17, 2026 12:41
Contributor
Author
Before / After — captured plan outputBehavioural proof of the toggle, using a self-contained harness that mirrors the exact expression in BEFORE (hardcoded — no opt-out possible)Brownfield Terraform estate, original logic AFTER (new toggle)Same estate, Summary
Setting the toggle to |
Akshay Rohilla (akshayrohilla)
approved these changes
Oct 10, 2026
Qi Zhang (Zhangqi910)
pushed a commit
to Azure/Azure-Landing-Zones
that referenced
this pull request
Oct 10, 2026
#4243) Adds guidance to the CAF Enterprise Scale -> AVM migration guide (both migration paths + FAQ) explaining that the bootstrap moves already-placed platform subscriptions by default at the end of phase 2, and how to opt out via move_subscriptions_to_target_management_group: false in inputs.yaml. Companion to Azure/accelerator-bootstrap-modules#141. Co-authored-by: Shaik Naseeruddin (BEYONDSOFT CONSULTING INC) <v-shaiknase@microsoft.com>
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.
Summary
Resolves #4205.
Exposes a new optional input
move_subscriptions_to_target_management_groupso that estates can opt out of relocating their platform subscriptions during bootstrap. Previously this was hardcoded tovar.iac_type != "bicep-classic"with no way to override it, which forced subscription moves even for brownfield estates whose platform subscriptions are already placed in a management group hierarchy.The input is added to all three VCS variants (
azuredevops,github,local) and is fully backward-compatible: when left unset (null) the effective value is exactly today's behaviour.Changes
Add
variable "move_subscriptions_to_target_management_group"(type = bool,default = null) to:alz/azuredevops/variables.tfalz/github/variables.tfalz/local/variables.tfWire it into each
alz/<vcs>/main.tfwhen callingmodule "azure":The pre-change expression (
var.iac_type != "bicep-classic") remains the fallback, so unset = unchanged behaviour.The consuming module input already exists (
modules/azure/variables.tf) and gates theazapi_resource.subscription_placementfor_eachinmodules/azure/subscription_placements.tf.Usage (
inputs.yaml)No allowlist or schema change is required. The accelerator generates the bootstrap tfvars from the module's Terraform variables matched to
inputs.yamlby name (Convert-HCLVariablesToInputConfig→Set-Config→Write-TfvarsJsonFile); the interactive-wizard schema (AcceleratorInputSchema.json) only enriches prompts and never gates values. Declaring the variable inalz/<vcs>/variables.tf(this PR) makes it settable directly:Left unset, behaviour is unchanged (
truefor Terraform/Bicep,falsefor bicep-classic).Validation
terraform fmt -check -recursive alz— clean.terraform init+terraform validate— "Success! The configuration is valid." foralz/local,alz/github, andalz/azuredevops.Behavioural check (same brownfield Terraform estate,
target_subscriptions = [management, connectivity, identity, security]— matching the issue's 4-subscription plan excerpt):iac_typeterraformtrueterraformfalsefalsebicep-classicfalseterraformtruetrueSetting the toggle to
falsecleanly drops the subscription placements to0(no subscriptions relocated), while the unset default preserves current behaviour.Docs
A companion documentation update (migration guidance) will be raised separately in
Azure/Azure-Landing-Zonesand is intended to merge after this change is released.