Azure / terraform-azurerm-caf-enterprise-scale

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

An argument named "private_endpoint_network_policies_enabled" is not expected here #1162

Open ifilipovskyy opened 1 month ago

ifilipovskyy commented 1 month ago

Community Note

Versions

terraform: 1.9.8 (latest)

azure provider: 4.5.0

module: 5.2.0

Description

β”‚ Error: Unsupported argument β”‚ β”‚ on .terraform/modules/enterprise_scale/resources.connectivity.tf line 58, in resource "azurerm_subnet" "connectivity": β”‚ 58: private_endpoint_network_policies_enabled = each.value.template.private_endpoint_network_policies_enabled β”‚ β”‚ An argument named "private_endpoint_network_policies_enabled" is not β”‚ expected here.

Describe the bug

All the time when I run caf-enterprise-scale module with version higher than 1.x.x I got this error message even it's very basic configuration.

Steps to Reproduce

Run terraform with basic configuration like following:

module "enterprise_scale" { source = "Azure/caf-enterprise-scale/azurerm" version = "5.2.0"

providers = { azurerm = azurerm azurerm.management = azurerm azurerm.connectivity = azurerm }

Base module configuration settings.

root_parent_id = data.azurerm_client_config.current.tenant_id root_id = local.root_id root_name = local.root_name default_location = local.default_location

Screenshots

Image

Additional context

matt-FFFFFF commented 1 week ago

Hi private_link_service_network_policies_enabled is the attribute name and it's correct in the latest version of the module. You either need to ping to an older provider version, or update the module.

svanzoest-lr commented 6 days ago

This is caused by the azurerm 4 provider.. follow #1123