Closed bruceharrison1984 closed 2 weeks ago
Thanks raising this issue. Seems I didn't reproduce this issue with above tf config. Does this issue happen when they're in the same resource group?
It does not, it only occurs when they are in separate RGs. I had planned on putting in a more correct example on Monday.
I hadn't expected anyone to take a look at this before then 😬
@bruceharrison1984 is the real MVP
Is there an existing issue for this?
Community Note
Terraform Version
1.9.0
AzureRM Provider Version
4.3.0
Affected Resource(s)/Data Source(s)
postgresql_flexible_server_virtual_endpoint_resource
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
No changes should be detected after initial creation
Actual Behaviour
Resources deploy correctly, however the Replica Server ID changes on the endpoint on second run due to the way it is derived from the Source Server within the provider.
The Virtual Endpoint presumes the replica server is in the same RG as the source server, which is not always the case.
Steps to Reproduce
Deploy resources, then immediately deploy them again.
Important Factoids
No response
References
https://github.com/hashicorp/terraform-provider-azurerm/blob/22b75edb3669a1d0fb48d0108fde66a49c73eed8/internal/services/postgres/postgresql_flexible_server_virtual_endpoint_resource.go#L162-L164