best-hydrogen-40271
10/23/2019, 7:33 PMprotect
-- will it allow me to tear down everything except `protect`ed resources?white-balloon-205
best-hydrogen-40271
10/23/2019, 7:35 PMwhite-balloon-205
best-hydrogen-40271
10/23/2019, 7:39 PMwhite-balloon-205
best-hydrogen-40271
10/23/2019, 7:42 PMwhite-balloon-205
pulumi state delete
, but should be possible today.
Note that in general, it is very likely you won't be able to delete other resources until you delete the protected resource - like you won't be able to delete the VPC or Roles used for a Database until you delete the database. So some amount of the infrastructure will also fail to destroy if you want to keep this resource around.
Pulumi acts as conservatively as possible wrt protect
to ensure the least damage possible to you infrastructure if you have indicated something should be `protect`ed.best-hydrogen-40271
10/23/2019, 7:44 PM// const bucket = new gcp.storage.Bucket("epictree-primary-vault-bucket", {
// location: "EU",
// name: "epictree-primary-vault-bucket"
// });
const bucket = gcp.storage.Bucket.get(
"epictree-primary-vault-bucket",
"epictree-primary-vault-bucket"
);
new
white-balloon-205
I believe terraform works like I'm trying to use iircI actually am not sure - though I would have guessed the opposite - that they were even more conservative and would fail the entire attempt to destroy before deleting anything if something was marked as protected. Will be interested to look into this.
best-hydrogen-40271
10/23/2019, 7:48 PMresource "digitalocean_droplet" "db" {
lifecycle {
prevent_destroy = true
}
}