github Azure/terraform-azurerm-avm-res-network-routetable v0.7.0

one hour ago

This release moves the route table, its routes, lock and role assignments from the AzureRM provider to AzAPI, so the module no longer requires AzureRM and works alongside any AzureRM version, including 5.x (#130). It requires Terraform 1.11 or later and adds the hashicorp/time provider (~> 0.13). moved blocks adopt existing deployments in place, including routes from configurations that call modules/route directly.

Breaking changes

  • resource_group_name is replaced by a required parent_id, the resource ID of the resource group.
  • subnet_resource_ids is retired, because AzAPI can't remove a subnet association when it's deleted. Associate the route table in each subnet's configuration instead.

Upgrading from 0.6.x

Upgrades from 0.6.0 and 0.4.1 were tested against real Azure, including routes added outside Terraform and direct modules/route calls. Nothing was destroyed or replaced except the AVM telemetry deployment, whose name includes the module version. The routes, subnet associations, lock and role assignments were unchanged.

  1. Replace resource_group_name with parent_id. Spell the resource group name exactly as before, including its case, for example by passing the resource group's id. A different spelling plans a replacement of the route table.
  2. Remove subnet_resource_ids. Its associations stay in Azure and are only removed from the state. Keep the AzureRM provider block until the upgrade is applied, because Terraform needs it to forget them.
  3. Change a ReadOnly lock to CanNotDelete, or remove it, until the upgrade is applied.
  4. Cross-tenant role assignments, which set delegated_managed_identity_resource_id, need a terraform state rm and an import block. See the README.
  5. Run terraform init -upgrade, then terraform plan. The route table, lock, role assignments and legacy-mode routes are updated in place with the same settings, and routes from the route submodule don't change. The plan also adds state-only random_uuid and time_sleep resources and, when enable_telemetry is true, the AVM telemetry deployments. The modtm telemetry resources of 0.5.x or earlier are removed from the state. Don't apply a plan that destroys or replaces anything other than the telemetry deployment.
  6. Apply the plan. A second plan reports no changes, except that the AVM telemetry deployments update on every plan while enable_telemetry is true.

Route tables deployed with 0.4.x or earlier keep their routes only while routes_legacy_mode stays true.

See Upgrading from 0.6.x or earlier in the README.

Other changes

  • Adds the resource_types, retry, timeouts and ignore_body_changes inputs, which also reach the route submodule, plus lock.notes and role_assignments.name.
  • The resource output keeps the attribute names of azurerm_route_table, and in legacy mode the routes output keeps those of azurerm_route.
  • Role assignments now send description, which 0.6.0 dropped, and an assignment with a tenant-level role definition ID is no longer replaced on every plan.
  • Role names, the route table name and route names are validated during plan.
  • Waits 30 seconds after deleting a lock before deleting the route table, because Azure keeps enforcing a deleted lock for a few seconds.
  • The examples use AzAPI.

What's Changed

Features

New Contributors

Full Changelog: v0.6.0...v0.7.0

Don't miss a new terraform-azurerm-avm-res-network-routetable release

NewReleases is sending notifications on new releases.