https://pulumi.com logo
Title
w

wet-noon-14291

10/05/2020, 10:26 PM
Hello. I'm trying to sping up postgresql and following what is here: https://www.pulumi.com/docs/reference/pkg/azure/postgresql/configuration/ I manage to create the server, but the configuration fails with the message:
Code="ConfigurationNotExists" Message="The configuration '<name of resource>' does not exist for PostgreSQL server version <version number>."
I've tried both version 9.5 and 11. I'm using F#, but that shouldn't matter since I've basically done a 1-to-1 copy from the C# sample. Any idea what I should do to get configuration working?
@tall-librarian-49374 do you know what might be causing this?
t

tall-librarian-49374

10/06/2020, 6:06 AM
I do not
w

wet-noon-14291

10/06/2020, 6:42 AM
hm.. bummer 🙂
Anyone that have a working example of postgresql on Azure? I can't get the sample in the link in the post to work.
w

witty-candle-66007

10/06/2020, 1:24 PM
FWIW, I tested the typescript version just now and received a couple of errors about the names. Specifically, the DB server, apparently, can't have upper case, so I changed it to
exampleserver
and the configuration name was too long when uniquified by pulumi. So I changed it to
exConf
and it worked. I wonder if for some reason the C# use-case is hiding those errors and so it fails downstream.
I lied - I too am seeing the configuration does not exist error. (I didn't wait long enough to see it.)
OK, so the problem is that the example does not have a
name
attribute in the Configuration definition. So, the code defaults to the name of the configuration. However, that
name
parameter needs to be a name of Postgres configuration option (e.g.
backslash_quote
) Example:
const exampleConfiguration = new azure.postgresql.Configuration('mitchCfg', {
  name: 'backslash_quote',
  resourceGroupName: exampleResourceGroup.name,
  serverName: exampleServer.name,
  value: 'off',
});
In the Azure portal, if you look at the
server parameters
view for the PostgresSQL server, you'll see the options names that can be used when setting the configuration. Also, I'll get the documentation updated accordingly.
👍 1