Im trying to update a `gcp.bigquery.Table` Its an ...
# general
i
Im trying to update a
gcp.bigquery.Table
Its an external data table so I don’t mind deleting it when I make changes, but I can’t replace it.
Copy code
error: update failed

  gcp:bigquery:Table (syslog_parsed):
    error: deleting urn:pulumi:dev::myproj-agent::gcp:bigquery/table:Table::syslog_parsed: 1 error occurred:
        * cannot destroy instance without setting deletion_protection=false and running `terraform apply`
I explicitly set:
Copy code
export const syslogTable = new gcp.bigquery.Table(
  "syslog_parsed",
  {
    datasetId: coreroDataset.datasetId,
    project: coreroDataset.project,
    tableId: "syslog_parsed",
    deletionProtection: false,

............

  {
    deleteBeforeReplace: true,
  }
The documentation says: https://www.pulumi.com/registry/packages/gcp/api-docs/bigquery/table
Copy code
Note: On newer versions of the provider, you must explicitly set deletion_protection=false
Is there something I am missing?
e
This looks like https://github.com/pulumi/pulumi-gcp/issues/876 which was marked closed. One thing I'd try is to do an update which just sets deletionProtection. Then do another update which triggers the replace.
t
I’m having the same issue with a SQL db when doing a
down
. Ver annoying. In gcp console and my pulumi script, deletion protection is false. I also have refresh enabled as well.
I had one case where the error message changed to something like “could not delete because 6 objects depend on the db_instance”. Perhaps coincidentally a plug was updated just before I saw this.
We got rid of some issues for sql.User and sql.Databaseby setting:
Copy code
deletion_policy='ABANDON'
Still need to manually delete the db instance via the console, gcloud cmd, etc. before doing a pulumi down.