Open qrevel opened 7 years ago
Hm, I wonder how common of a use case this would be? Usually, Terraform state and locks are important info, so I wouldn't expect it to be deleted too often. On the other hand, for experimenting, learning, and testing, it would be nice to have an easy way to clean up, so I guess I'm not against a terragrunt-clean
command. PRs welcome :)
Would prefer that the clean only clean specific keys from the bucket related to what was created, not the entire bucket.
Agree with @ryan-dyer-sp for the default clean behavior. Maybe a --bucket
option to also clean the bucket
I want a backend destroy function. The case is for review apps - short lived stage envs that have a 1:1 relationship with a feature branch in trunk-based workflow. Each review app gets its own backend and does not share a backend with other envs.
br, tom
One possible issue with this is that you can use the same bucket and dynamodb table for multiple terraform states. You can make this safe by checking whether the bucket is empty or you just trust the user to know what they're doing - possibly with a --yes-i-know-what-i-am-doing-nuke-it-please
flag.
Have the same case for short-lived preview apps.
Anything new about this feature? Would be very handy when experimenting
+1
+1
+1
+1
Terragrunt is a really nice wrapper to automate the creation of S3 bucket and DynamoDB table. I'm actually using terragrunt to spawn demo enviroment for different development teams. So each team has access to one or multiple demos environment with similar configuration. Each demo has its own stack (S3 bucket, DynamoDB table, and Terraform configuration). Once the demo is finished, I need to clean all the stack. Unfortunately, I was unable to find any command to clean everything, even the bucket and the table.
Thanks