Azure / terraform-azurerm-caf-enterprise-scale

Azure landing zones Terraform module
https://aka.ms/alz/tf
MIT License
856 stars 568 forks source link

Updating existing vnet dns_server with Azure firewall leads to azurerm_virtual_network error. #1136

Open LaurentLesle opened 1 month ago

LaurentLesle commented 1 month ago

Community Note

Versions

terraform: 1.9.5

azure provider: 3.107.0

module: 6.1.0

Description

Describe the bug

When:

  1. using the version of the module 6.1.0 and pinning the azurerm provider "~> 3.107.0"
  2. Updating a virtual network DNS to set the private IP of the Azure firewall
╷
│ Error: ID was missing the `networkSecurityGroups` element
│ 
│   with azurerm_virtual_network.some_network["test"],
│   on main.tf line 132, in resource "azurerm_virtual_network" "some_network":
│  132: resource "azurerm_virtual_network" "some_network" {
│ 
╵

This bug has been reported in the azurerm provider https://github.com/hashicorp/terraform-provider-azurerm/issues/26276#issue-2342071482

Therefore I propose to set the minimum version of the module to 3.108.0

From terraform.tf

    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~> 3.107"
      configuration_aliases = [
        azurerm.connectivity,
        azurerm.management,
      ]
    }

Steps to Reproduce

  1. step 1
  2. step 2
  3. you get it...

Screenshots

Additional context

LaurentLesle commented 1 month ago

@matt-FFFFFF once approved it would be good if you can release a 6.2.0 to set the minimum version of Azurerm to 3.108.0