Loading...
Loading...
### Is there an existing issue for this? - [X] I have searched the existing issues ### Community Note * Please vote on this issue by adding a :thumbsup: [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) 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 and review the [contribution guide](https://github.com/hashicorp/terraform-provider-azurerm/blob/main/contributing/README.md) to help. ### Terraform Version 1.5.7 ### AzureRM Provider Version v3.89.0 ### Affected Resource(s)/Data Source(s) azurerm_storage_account ### Terraform Configuration Files ```hcl variable "virtual_network_subnet_ids" { type = list(string) default = [] } resource "null_resource" "test" { triggers = { virtual_ids = join(",", var.virtual_network_subnet_ids) } provisioner "local-exec" { command = "echo ${self.triggers.virtual_ids}" } } resource "azurerm_storage_account" "storage_account" { name = "teststorageacc" location = "westeurope" resource_group_name = "test-rg" account_tier = "Standard" account_replication_type = "LRS" min_tls_version = "TLS1_2" enable_https_traffic_only = true network_rules { default_action = "Deny" bypass = ["AzureServices"] virtual_network_subnet_ids = var.virtual_network_subnet_ids } } ``` ### Debug Output/Panic Output ```shell # module.main-k8s-storage[0].null_resource.test must be replaced -/+ resource "null_resource" "test" { ~ id = "8225602398967497365" -> (known after apply) ~ triggers = { # forces replacement ~ "virtual_ids" = "/subscriptions/****/resourceGroups/****/providers/Microsoft.Network/virtualNetworks/****/subnets/****-public1,/subscriptions/****/resourceGroups/****/providers/Microsoft.Network/virtualNetworks/****/subnets/****-public2,/subscriptions/****/resourceGroups/****/providers/Microsoft.Network/virtualNetworks/****/subnets/****-public3,/subscriptions/****/resourceGroups/****/providers/Microsoft.Network/virtualNetworks/****/subnets/****-kubernetes-subnet" -> (known after apply) } } # No changes for azurerm_storage_account.storage_account ``` ### Expected Behaviour When variable for `azurerm_storage_account.network_rules.virtual_network_subnet_ids` changes, `terraform plan` and `terraform apply` should detect the change ### Actual Behaviour The change for `azurerm_storage_account.network_rules.virtual_network_subnet_ids` is detected when `terraform apply` is executed once. It is, the change is detected on the second `terraform apply` and not the first one. Since `null_resource.test` resource detects the change in first `terraform plan`, it must be some issue with azurerm provider and not terraform core. ### Steps to Reproduce _No response_ ### Important Factoids _No response_ ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.