Azure / Azure/azure-postgresql
Getting AadAuthOperationCannotBePerformedWhenServerIsNotAccessible on ARM template when deploying server admin with dependsOn for server
- Dominant language
- Bicep
- Stars
- 87
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I am intermittently seeing this error when deploying a resource of type `Microsoft.DBforPostgreSQL/flexibleServers/administrators` via ARM template.
_StatusCode: Conflict, Status: Failed, ErrorCode: AadAuthOperationCannotBePerformedWhenServerIsNotAccessible, ErrorMessage: The server '{server name}' is not in an accessible state to perform Azure AD Principal operation. Please make sure the server is accessible before executing Azure AD Principal operations._
I first deploy a postgres server (`Microsoft.DBforPostgreSQL/flexibleServers`) and explicitly depend on this server for the deployment of the `Microsoft.DBforPostgreSQL/flexibleServers/administrators` resource.
This situation complicates having stable, reliable deployments as sometimes the `dependsOn` condition is satisfied when apparently the postgres server is not ready for an Azure AD operation. I think this is a bug, the `dependsOn` condition for the postgres server should not be fulfilled until the server is ready for an Azure AD operation.
example arm operation id: A6CE82DD8683DCEF, sadly don't have the correlation id available
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.