Skip to content

Getting AadAuthOperationCannotBePerformedWhenServerIsNotAccessible on ARM template when deploying server admin with dependsOn for server  #127

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions