pulumi-digitalocean icon indicating copy to clipboard operation
pulumi-digitalocean copied to clipboard

How to safely upgrade database cluster version without losing data?

Open snipebin opened this issue 4 years ago • 1 comments

Hi, thanks in advance for the support.

Digital ocean explains how we one upgrade cluster versions: https://www.digitalocean.com/docs/databases/postgresql/how-to/upgrade-version/

what's the equivalent for Pulumi?

Here's my definition

new digitalocean.DatabaseCluster(`${stackName}-shared`, {
    engine: "pg",
    nodeCount: config.requireNumber('postgres-cluster-shared-node-count'),
    region: doRegion,
    size: digitalocean.DatabaseSlugs.DB_1VPCU2GB,
    version: "11",
    privateNetworkUuid: vpc.id
  }, { dependsOn: [vpc], protect: true  })

I want to upgrade to version 12.

Do I simply change to version: "12", run pulumi up?

snipebin avatar Aug 10 '20 03:08 snipebin

Do I simply change to version: "12", run pulumi up?

I don't personally know the DigitalOcean API well, but have you tried previewing doing this? The preview should tell you whether it can update in place, or whether the change would require a replacement of the resource (which will then be prevented due to your protect: true.

lukehoban avatar Aug 10 '20 15:08 lukehoban