Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Server Error when creating Azure Cosmos DB for PostgreSQL Cluster #3573

Open
AdelinaK opened this issue Sep 12, 2024 · 6 comments
Open
Labels
kind/enhancement Improvements or new features upstream/service

Comments

@AdelinaK
Copy link

Hello. I am using Pulumi with Python.

I want to deploy an Azure Cosmos DB for PostgreSQL Cluster.
I am using azure-native.dbforpostgresql.Cluster. I was able to create the resource but I don't see any support to change the Authentication settings to accept Entra ID Authentication. Is this feature missing or is there another way/package I can use?

I would like to stick with the Cluster, even if I see the property available in azure-native.dbforpostgresql.Server.

Thanks in advance!

@AdelinaK AdelinaK added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Sep 12, 2024
@justinvp
Copy link
Member

Thanks for the question @AdelinaK. Moving this to the Azure Native repository and someone will take a look and get back to you soon.

@justinvp justinvp transferred this issue from pulumi/pulumi Sep 12, 2024
@thomas11
Copy link
Contributor

Hi @AdelinaK, it seems that this functionality was added to the Azure API spec in a later API version. Therefore, our docs and the default Cluster class don't show it. However, you can explicitly import the later API version 20230302preview that has the functionality. The specifics depend on your programming language, e.g., in TypeScript you would use dbforpostgresql.v20230302preview.Cluster instead of dbforpostgresql.Cluster.

@thomas11 thomas11 added awaiting-feedback Blocked on input from the author impact/missing-api and removed needs-triage Needs attention from the triage team labels Sep 13, 2024
@AdelinaK
Copy link
Author

As suggested, I tried to use the 20230302preview version based on what I found here. I mentioned I'm using Python but I get an unexpected error:

azure-native:dbforpostgresql:Cluster (<db-name>)
   error: Code="internal_server_error" Message="Internal server error."

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Sep 16, 2024
@thomas11
Copy link
Contributor

That's unfortunate. This error comes from Azure and indicates a bug in their service.

If you can share the Pulumi code creating the Cluster, we might be able to spot something.

@thomas11 thomas11 added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Sep 18, 2024
@AdelinaK
Copy link
Author

Sure.

import pulumi
import pulumi_azure_native

postgresql_cluster = pulumi_azure_native.dbforpostgresql.v20230302preview.Cluster(
    resource_name="<name_of_resource>",
    cluster_name="<name_of_cluster>",
    resource_group_name=resource_group.name,
    location="westeurope",
    coordinator_storage_quota_in_mb=131072,
    coordinator_server_edition="GeneralPurpose",
    coordinator_v_cores=2,
    enable_ha=False,
    enable_shards_on_coordinator=True,
    node_count=0,
    administrator_login_password="<randomly_generated_password>",
    citus_version="12.1",
    postgresql_version="16",
    auth_config=azure.dbforpostgresql.v20230302preview.AuthConfigArgs(
        active_directory_auth="enabled",
        password_auth="enabled"
    )
)

pulumi version 3.132.0
pulumi-azure-native version 2.60.0

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Sep 20, 2024
@thomas11 thomas11 changed the title Update Authentication settings of Azure Cosmos DB for PostgreSQL Cluster to accept Entra ID Authentication Internal Server Error when creating Azure Cosmos DB for PostgreSQL Cluster Sep 20, 2024
@thomas11
Copy link
Contributor

I don't see an issue with your cluster definition. An internal server error is a bug in the Azure service. In case the problem is an invalid cluster definition and they're just not validating it properly, I suggest investigating if your cluster definition is correct. There are some examples here.

@thomas11 thomas11 added upstream/service and removed needs-triage Needs attention from the triage team impact/missing-api labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features upstream/service
Projects
None yet
Development

No branches or pull requests

4 participants