Open arkiaconsulting opened 1 year ago
Might be related: I oberserved the same behaviour when I change the identity type from SystemAssigned
to UserAssigned
.
# azurerm_api_management.main will be updated in-place
~ resource "azurerm_api_management" "main" {
id = "/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.ApiManagement/service/<redacted>"
name = "<redacted>"
# (21 unchanged attributes hidden)
~ identity {
~ identity_ids = [] -> (known after apply)
~ type = "SystemAssigned" -> "UserAssigned"
# (2 unchanged attributes hidden)
}
# (8 unchanged blocks hidden)
}
The changes are planned, but apply does not produce any changes
Might be related: I oberserved the same behaviour when I change the identity type from
SystemAssigned
toUserAssigned
.# azurerm_api_management.main will be updated in-place ~ resource "azurerm_api_management" "main" { id = "/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.ApiManagement/service/<redacted>" name = "<redacted>" # (21 unchanged attributes hidden) ~ identity { ~ identity_ids = [] -> (known after apply) ~ type = "SystemAssigned" -> "UserAssigned" # (2 unchanged attributes hidden) } # (8 unchanged blocks hidden) }
The changes are planned, but apply does not produce any changes
I found out that the resource is effectively updated while not in resource targeting mode. The issue might be in the terraform scope instead of the provider scope.
Hi @arkiaconsulting thanks for opening this issue. Is it possible that the virtual_network_type
was updated by other clients before Terraform updated it?
Hi @sinbai. I'm the only one operating on this resource, and no other scripts exist. Furthermore, I retried the steps several times to make sure of the issue.
Thanks for the updates @arkiaconsulting , except for resource azurerm_api_management
, do other terraform resources have the same behavior?
@sinbai I never experienced this behavior on any azurerm resource. This is not blocking as it works correctly when not in resource targeting mode, but it's kind of annoying...
Is there an existing issue for this?
Community Note
Terraform Version
1.5.0
AzureRM Provider Version
3.75.0
Affected Resource(s)/Data Source(s)
azurerm_api_management
Terraform Configuration Files
When running
apply
with resource targeting, terraform detects the changes but when effectively applying them, it runs to the end straight away, and the APIM resource does not change (even its status does not transition toUpdating
).Debug Output/Panic Output
Apply result:
Expected Behaviour
and the APIM resource should go to the
Updating
status, and after a while, it should have migrated to networkInternal
.Actual Behaviour
The APIM resource is not updated.
Steps to Reproduce
No response
Important Factoids
No response
References
No response