4 ms·
This is my greatest fear when it comes to terraform: > terraform destroy (And either a confirmation or a flag) and everything is deleted. I know you can add
by webel0 6y ago
This is my greatest fear when it comes to terraform:
> terraform destroy
(And either a confirmation or a flag) and everything is deleted.
I know you can add some locks but still :/
- malwrar 6y agoYou can save yourself from scary operations like deleting everything by a.) not rooting your entire infra in the same main.tf and b.) using Terraform's lifecycle meta-argument: https://www.terraform.io/docs/configuration/resources.html#lifecycle-lifecycle-customizations https://www.terraform.io/docs/configuration/resources.html#l... I like to use the lifecycle feature for suuuper core things that will never be deleted (VPC, r53 zone, etc) and eventually when I start targeting multiple DCs w/ lots of infra I'll eventually move to many state roots (or use tools like Terragrunt, which make things mildly scary again).
- gkop 6y agoAlso a human should review every plan and confirm before applying, right?
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]