Hi, Trying to create flexible server primary and ...
# azure
t
Hi, Trying to create flexible server primary and replica. After the primary creation succeeds, the replica creation which references the primary fails, claiming its not in active state. error: 1 error occurred: * resource created but read failed autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.DBforPostgreSQL/flexibleServers' with name 'xxxx' was not found.": Code="Failed" Message="The async operation failed." AdditionalInfo=[{"error":{"code":"","message":"Source server 'xxx' is not in active state."},"name":"96d28595-b029-4a41-b37a-5fd17ea48f23","startTime":"2024-06-30T152849.07Z","status":"Failed"}] Retrying after few minutes works. Any idea how to ensure replicas creation are waiting for the primary to become active ?
f
I'm wondering if there's a way to abuse
.apply
for this - though I'm not sure if .apply can return a promise/future
t
the actual status needs to be retrieve from the cluster using a rest call until it is in active state.