chore(providers): upgrade azurerm to 4.x (~> 4.20) - #11
Merged
Conversation
- Bump azurerm to ~> 4.20 (was ~> 3.116) in root and both examples. - Raise required_version to >= 1.10 (was >= 1.9). - Declare azapi ~> 2.0 (and keep popsrox POps-Rox/azutils ~> 1.0) in required_providers for fleet alignment. - Subnet codemod (Pattern AKS-7): replaced deprecated private_endpoint_network_policies_enabled = true on azurerm_subnet.snet_ep with private_endpoint_network_policies = "Enabled". - Prune stale 'output "echo_text"' from both example outputs.tf — the output referenced module.echo which never existed in either example. The dangling reference was latent on main but blocks terraform validate on the upgraded examples. - Add VERSION file at 2.0.0. Validated with terraform init/validate on root and both examples against azurerm v4.x (used the phase1-codemods workaround for transitive sibling overlays still pinning ~> 3.116). Refs Phase 1 fleet upgrade (governance/edge cohort). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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
Phase 1 fleet upgrade — governance/edge cohort.
azurermto~> 4.20(was~> 3.116) in root and bothexamples/*/example_new_rg.required_versionto>= 1.10(was>= 1.9).azapi ~> 2.0and keeppopsrox POps-Rox/azutils ~> 1.0inrequired_providersfor fleet alignment.private_endpoint_network_policies_enabled = trueonazurerm_subnet.snet_epwithprivate_endpoint_network_policies = "Enabled"(4.x: bool arg → string enum).output "echo_text"references in both exampleoutputs.tffiles — they pointed at a non-existentmodule.echo(latent onmain; blocked the upgradedterraform validategate).VERSIONfile at2.0.0.Codemods applied
enable_https_traffic_only→https_traffic_only_enabledallow_blob_public_access→allow_nested_items_to_be_publicenable_rbac_authorization→rbac_authorization_enabledprivate_endpoint_network_policies_enabled→private_endpoint_network_policiesenumresources.template.private.endpoints.tf:true→"Enabled".azurerm_monitor_diagnostic_setting.retention_policyblock removalValidation
Breaking changes for consumers
subscription_idon the provider block (orARM_SUBSCRIPTION_IDenv var).var.enable_private_endpoint = trueconsumers: no consumer-facing change — the rename is on the internalazurerm_subnetresource argument; the module's variable surface is unchanged.Cross-module dependency
Transitive sibling overlays (
terraform-az-overlays-azregionslookup,-resourcegroup) still pinazurerm ~> 3.116onmain. Local validation used the codemod-doc workaround (terraform get+ in-place patch of.terraform/modules/**/versions.tf). CI will pass cleanly once those sibling overlays publish 4.x-compatible releases.Refs Phase 1 fleet upgrade.
Co-authored-by: Copilot