https://pulumi.com logo
#azure
Title
# azure
s

sparse-pilot-48357

03/29/2022, 9:47 PM
Hey 👋, I'm trying to provision a server and DB for PGSQL, and the flexible server deployed fine (using
Pulumi.AzureNative.DBforPostgreSQL.V20200214Preview
but I'm getting this error on the database (using
Pulumi.AzureNative.DBforPostgreSQL.V20210601
)
Copy code
var pgDb = new PGSQLDB.Database($"foo", new PGSQLDB.DatabaseArgs()
        {
            Charset = "UTF8",
            Collation = "English_United States.1252",
            ResourceGroupName = resourceGroup.Name,
            ServerName = pgsqlServer.Name,
            DatabaseName = "foo"
        });
Copy code
azure-native:dbforpostgresql/v20210601:Database (foo):
    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 'foo' was not found.": Code="InternalServerError" Message="An unexpected error occured while processing the request. Tracking ID: '**redacted**'"
A few questions 🙂 - am I using the right namespaces? Is there any way of getting more info than that
InternalServerError
(I tried
--verbose=9
to no avail). I found https://github.com/pulumi/pulumi-azure-native/issues/1126, but I don't think it's quite it...
g

great-queen-39697

03/30/2022, 10:35 PM
Re the verbose flag: We're running an update to our debugging docs to help with this info (I've got that fix in review!). That being said, to get the logging details from the Azure Native provider, you need to add the
--logflow
flag to get the diagnostics data from the provider itself. Here's the basic command I'll use for a native provider:
Copy code
pulumi up -v=9 --logflow
That will dump logs into wherever your logs go for Pulumi (find that from the last line in the output of
pulumi about
). If you'd rather get it all at once on the terminal:
Copy code
pulumi up -v=9 --logflow --logtostderr 2>&1 | tee -a pulumi_log.txt
That extra bit at the end tells Pulumi to share logs both to stdout/stderr and append them to a file called
pulumi_log.txt
.
I'm not seeing anything immediately suspicious in your code, but I'd like to see those logs (redacted, of course) to see if there's anything there that might help.
s

sparse-pilot-48357

03/31/2022, 2:05 AM
Thanks Laura, I will capture those logs and see. I've found it's not a blocking issue really - I can actually just do a
CREATE DATABASE 'foo'
as the pg admin user, and it works fine. No need to deploy it as a resource there. But yeah, it's a little weird because DB seems architecture related
g

great-queen-39697

03/31/2022, 9:11 PM
Hmm... that is odd. I haven't had trouble creating a new database with other providers, but I haven't tried it on Azure Native yet. If you get those logs, I'd be happy to help figure out what's up.
47 Views