Hey everybody, Does anyone knows how I can transla...
# general
e
Hey everybody, Does anyone knows how I can translate this azure cli command to Pulumi?
Copy code
az postgres flexible-server db create --resource-group
                                      --server-name
                                      [--charset]
                                      [--collation]
                                      [--database-name]
                                      [--subscription]
l
https://www.pulumi.com/registry/packages/azure-native/api-docs/dbforpostgresql/database/ You can find a code snippet in the docs and are able to select the programming language of your choice using the "tabs" above the code example.
e
But it's not working with
flexible-server
as I also asked here: https://github.com/pulumi/pulumi-azure-native/issues/1520
I got error for this code:
Copy code
const newDatabase = new azureNative.dbforpostgresql.v20201105preview.Database(
  "newDatabase",
  {
    charset: "UTF8",
    collation: "English_United States.1252",
    databaseName: "newdb",
    resourceGroupName: config.RESOURCE_GROUP_NAME,
    serverName: config.POSTGRES_SERVER_NAME,
  }
)
Copy code
error: resource partially created but read failed autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.DBforPostgreSQL/flexibleServers/databases' with name 'newdb' was not found.": Code="InternalServerError" Message="An unexpected error occured while processing the request. Tracking ID: 'xxxxx'"
l
@elegant-plumber-85706 I'm just a fellow Pulumi user and not all that acquainted with Azure to be honest. I suggest you take this error to the #azure channel.
🙌 1
e
Sure Sure. Thanks for your help. 🙏