Open Romiko opened 1 month ago
Please paste the output of terraform version command from within the initialized directory:
terraform version
Terraform v1.5.6 on linux_arm64
Please enter the module version that you are using:
module "lz_vending_ source = "Azure/ version = "4.1.0"
When I have virtual_network_enabled = false and have a vnets section initalised in tfvars, it still cause terraform add/remove
The expected behaviour is to ignore
Resource groups work as expected.
` -/+ destroy and then create replacement
Terraform will perform the following actions:
-/+ resource "azapi_resource" "telemetry_root" { ~ id = "/subscriptions/blahblahblah/providers/Microsoft.Resources/deployments/pid-50a8a460-d517-4b11-b86c-6de447806b67_4.1.0_00000007" -> (known after apply) ~ name = "pid-50a8a460-d517-4b11-b86c-6de447806b67_4.1.0_00000007" -> "pid-50a8a460-d517-4b11-b86c-6de447806b67_4.1.0_00000807" # forces replacement ~ output = jsonencode({}) -> (known after apply)
}
`
Workaround:
virtual_network_enabled = each.value.virtual_network_enabled virtual_networks = each.value.virtual_network_enabled ? each.value.vnets : {}
Hi this is a bug in the telemetry logic, thanks for reporting.
Community Note
Versions
Please paste the output of
terraform version
command from within the initialized directory:Please enter the module version that you are using:
Description
When I have virtual_network_enabled = false and have a vnets section initalised in tfvars, it still cause terraform add/remove
The expected behaviour is to ignore
Resource groups work as expected.
Steps to Reproduce
` -/+ destroy and then create replacement
Terraform will perform the following actions:
module.lz_vending_subscriptions["sandbox"].azapi_resource.telemetry_root[0] must be replaced
-/+ resource "azapi_resource" "telemetry_root" { ~ id = "/subscriptions/blahblahblah/providers/Microsoft.Resources/deployments/pid-50a8a460-d517-4b11-b86c-6de447806b67_4.1.0_00000007" -> (known after apply) ~ name = "pid-50a8a460-d517-4b11-b86c-6de447806b67_4.1.0_00000007" -> "pid-50a8a460-d517-4b11-b86c-6de447806b67_4.1.0_00000807" # forces replacement ~ output = jsonencode({}) -> (known after apply)
(8 unchanged attributes hidden)
`