Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: virtual_network_enabled = false #378

Open
Romiko opened this issue May 7, 2024 · 2 comments · May be fixed by #434
Open

bug: virtual_network_enabled = false #378

Romiko opened this issue May 7, 2024 · 2 comments · May be fixed by #434
Assignees
Labels
bug 🐛 Something isn't working PR: Referenced 👀 Issue is referenced in a PR

Comments

@Romiko
Copy link

Romiko commented May 7, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Versions

Please paste the output of terraform version command from within the initialized directory:

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"

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

  1. Define tfvars with vnets
  2. virtual_network_enabled = false
  3. Terraform plan will still want to do the following:

`
-/+ 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)
}
`

@Romiko
Copy link
Author

Romiko commented May 7, 2024

Workaround:

virtual_network_enabled = each.value.virtual_network_enabled virtual_networks = each.value.virtual_network_enabled ? each.value.vnets : {}

@matt-FFFFFF
Copy link
Member

Hi this is a bug in the telemetry logic, thanks for reporting.

@matt-FFFFFF matt-FFFFFF added the bug 🐛 Something isn't working label Jun 5, 2024
matt-FFFFFF added a commit that referenced this issue Jan 19, 2025
@matt-FFFFFF matt-FFFFFF self-assigned this Jan 19, 2025
@matt-FFFFFF matt-FFFFFF linked a pull request Jan 19, 2025 that will close this issue
5 tasks
@microsoft-github-policy-service microsoft-github-policy-service bot added the PR: Referenced 👀 Issue is referenced in a PR label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working PR: Referenced 👀 Issue is referenced in a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants