Skip to content

chore: upgrade to azurerm 4.x (~> 4.20) - #11

Merged
JoshLuedeman merged 1 commit into
mainfrom
chore/upgrade-azurerm-4x
May 12, 2026
Merged

chore: upgrade to azurerm 4.x (~> 4.20)#11
JoshLuedeman merged 1 commit into
mainfrom
chore/upgrade-azurerm-4x

Conversation

@JoshLuedeman

Copy link
Copy Markdown
Contributor

Phase 1 fleet upgrade — azurerm 3.x → 4.x.

Provider constraints

  • terraform >= 1.10 (was >= 1.9)
  • azurerm ~> 4.20 (was ~> 3.116)
  • azapi ~> 2.0 (newly declared for fleet alignment)
  • popsrox ~> 1.0 (unchanged)

Updated in root versions.tf and every example versions.tf.

Codemod applied

  • azurerm_subnet.private_endpoint_network_policies_enabled = true
    azurerm_subnet.private_endpoint_network_policies = "Enabled" in
    resources.template.private.endpoints.tf. 4.x replaced the bool argument
    with a string enum (Enabled / Disabled / NetworkSecurityGroupEnabled /
    RouteTableEnabled).

Audited (no changes needed)

  • No enable_https_traffic_only, allow_blob_public_access, or
    enable_rbac_authorization usage anywhere in the module.
  • No azurerm_monitor_diagnostic_setting resources, so no retention_policy
    block removals required.
  • No deprecated azurerm_app_service / azurerm_app_service_plan usage.

Version

  • VERSION set to 2.0.0 (new file). Major bump due to provider major and
    Terraform CLI floor raise.

Validation

  • terraform fmt -recursive -check -diff — clean.
  • Root + 3 of 4 examples: Success! The configuration is valid. against
    azurerm v4.42.0, azapi v2.9.0, popsrox v1.0.9.
  • examples/Commerical/complete pulls in terraform-az-overlays-storageaccount
    and terraform-az-overlays-containerregistry (sibling Phase 1 PRs).
    Those still pin azurerm ~> 3.116 on main, so the unioned constraint
    is unsatisfiable until they merge. HCL in this repo is correct; the example
    will go green once siblings ship.

Consumer-facing breaking change

azurerm 4.x requires an explicit subscription (ARM_SUBSCRIPTION_ID env var
or subscription_id in provider "azurerm"). Module repos don't declare a
provider block, so this is a consumer concern — but downstream callers need to
set it before upgrading.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Phase 1 fleet upgrade.

- terraform >= 1.10, azurerm ~> 4.20, azapi ~> 2.0, popsrox ~> 1.0
- versions.tf updated in root and all 4 examples
- azurerm_subnet.private_endpoint_network_policies_enabled (bool) →
  private_endpoint_network_policies (string enum) per the 4.x schema
- No retention_policy blocks on azurerm_monitor_diagnostic_setting in this overlay
- No enable_https_traffic_only / allow_blob_public_access / enable_rbac_authorization usage
- Bumped VERSION to 2.0.0

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JoshLuedeman
JoshLuedeman merged commit cb572ba into main May 12, 2026
3 of 4 checks passed
@JoshLuedeman
JoshLuedeman deleted the chore/upgrade-azurerm-4x branch May 12, 2026 00:24
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.

1 participant