I have provisioned SQL (PostrgresSQL) on GCP cloud using Pulumi SDK (Go). I have set deletionProtection as true - but checking GCP console I can see the SQL is not protected. I was able to delete the instance using console by that breaking Pulumi state.
+ gcp:sql/databaseInstance:DatabaseInstance: (create)
[urn=urn:pulumi:us-east4-dev-google-cloud-sql-example::google-cloud-sql-example::gcp:myproject/sql:Database$gcp:sql/databaseInstance:DatabaseInstance::google-cloud-sql]
databaseVersion : "POSTGRES_12"
deletionProtection: true
name : "google-cloud-sql-0b96b6d"
project : "my-project"
region : "us-east4"
settings : {
availabilityType : "REGIONAL"
backupConfiguration: {
enabled : false
pointInTimeRecoveryEnabled: false
}
databaseFlags : [
[0]: {
name : "auto_explain.log_analyze"
value : "on"
}
[1]: {
name : "max_connections"
value : "800"
}
]
diskAutoresize : true
diskAutoresizeLimit: 0
diskSize : 200
diskType : "PD_SSD"
insightsConfig : {
queryInsightsEnabled: false
queryStringLength : 1024
}
ipConfiguration : {
ipv4Enabled : false
privateNetwork: "projects/my-project/global/networks/dev-vpc"
}
pricingPlan : "PER_USE"
tier : "db-custom-32-122880"
userLabels : {
compliance : "cisl1"
criticality: "2"
environment: "dev"
monitored : "true"
name : "myusername"
owner : "devops_backend"
persistence: "persistent"
purpose : "pulumi-common-google-cloud-sql-example"
}
}