Closed jfe7 closed 2 years ago
@jfe7 taking a look through above unfortunately the Resource IDs have been sanitised/show no differences, so it's hard to confirm the specific issue here - would you be able to confirm the Resource IDs in question?
I can't post the exact output due to security reasons... I have just replaced the subscription id with 0's.
but that is exactly the point I am making, the change Terraform is stating, is not actually a change, it is replacing the subnet_id with exactly the same subnet_id as it was before:
~ virtual_network_configuration {
~ subnet_id = "/subscriptions/00000000-000000000000000-000000000/resourceGroups/rg-01/providers/Microsoft.Network/virtualNetworks/vnet-01/subnets/snet-01" -> "/subscriptions/00000000-000000000000000-000000000/resourceGroups/rg-01/providers/Microsoft.Network/virtualNetworks/vnet-01/subnets/snet-01"
}
@jfe7 without the difference in the Resource ID being shown unfortunately we're unable to assist much further here, is there a difference in casing perhaps?
@jfe7 without the difference in the Resource ID being shown unfortunately we're unable to assist much further here, is there a difference in casing perhaps?
Yes that looks like the issue, the case, the current subnet ID, everything is in lowercase, where-as the one it wants to change it to, has some capital letters, for example /virtualnetwork/ vs /virtualNetwork/, not sure why it is changing this every run?
Anyway, looks like the issue is resolved in 3.X.X as I upgraded the provider and this issue never occurred, must just be an issue in the later versions of 2.X.X !
Thanks
@jfe7 glad to hear this is resolved in 3.0 - closing this out.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
1.1.7
AzureRM Provider Version
2.99.0
Affected Resource(s)/Data Source(s)
azurerm_api_management
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Terraform reports no changes to the API Management subnet.
Actual Behaviour
Every time I run Terraform Plan, Terraform reports that the subnet on the API Management resource is changing, even though it reports the change as being an identical subnet ID, for example below:
Steps to Reproduce
terraform plan
Important Factoids
No response
References
No response