Hello! I recently upgraded to "@pulumi/gcp": "^7.2...
# getting-started
a
Hello! I recently upgraded to "@pulumi/gcp": "^7.2.1" on TS. It appears that there was a breaking update to the Secret resource. From:
Copy code
const replication= new gcp.secretmanager.Secret("test", {
  secretId: "test-mikhail",
  replication: {
    automatic: true,
  },
});
To:
Copy code
const replication= new gcp.secretmanager.Secret("test", {
  secretId: "test-mikhail",
  replication: {
    auto: {},
  },
});
When I do, pulumi recommends a 'replace': ├─ gcpsecretmanagerSecret test replace [diff: ~provider] However, the replacement always fails because the existing resource already exist: gcpsecretmanagerSecret (carbon-service-secret-APPLICATION_PROXY_PASSWORD): error: 1 error occurred: * Error creating Secret: googleapi: Error 409: Secret [projects/xxx/secrets/test] already exists. I've tried pulumi refresh and it doesn't appear to fix the issue. I'm not exactly sure what I'm doing wrong, but it feels like it's a bug. Any ideas on how can I fix this issue?
d
You can use
deleteBeforeReplace
to force the deletion to happen first: https://www.pulumi.com/docs/concepts/options/deletebeforereplace/
It might be best to downgrade to v6.67.1, do an
up
, then migrate the secretsmanager code to use
auto
, though I don't know if this will give you an in-place update.
a
Thank @dry-keyboard-94795! I'll give it a shot ☺️