Closed robomotic closed 6 years ago
Okay there is no issue to call destroy from terraform if setting the variable force_destroy to true in the variable settings.
You might want to read through the docs, they're pretty good. https://binaryalert.io/deploying.html#terraform-destroy
Thanks @robomotic for the suggestion and @crobo1337 for the docs reference! Yeah, you can use the force_destroy
option, as you found.
I was initially hesitant to add the destroy
command to the manage.py
script for fear of someone accidentally destroying their infrastructure, but the current setup does seem like too much friction. You have to:
force_destroy = true
terraform apply
terraform destroy
Since terraform
itself provides a destroy
option, I would be open to adding it if you think it would be useful.
Thoughts?
Yes I think so with the caveat of user input, so it would work like this:
manage.py destroy
Warning: this will delete (S3|DynamoDB|RDS etc etc) do you want to continue (N)?
On 20 Nov 2017, at 18:55, Austin Byers notifications@github.com wrote:
Thanks @robomotic https://github.com/robomotic for the suggestion and @crobo1337 https://github.com/crobo1337 for the docs reference! Yeah, you can use the force_destroy option, as you found.
I was initially hesitant to add the destroy command to the manage.py script for fear of someone accidentally destroying their infrastructure, but the current setup does seem like too much friction. You have to:
Set force_destroy = true terraform apply terraform destroy Since terraform itself provides a destroy option, I would be open to adding it if you think it would be useful.
Thoughts?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/airbnb/binaryalert/issues/78#issuecomment-345792634, or mute the thread https://github.com/notifications/unsubscribe-auth/AATSPBpHXXUdvGWEVOiM7m7lxZivGW-jks5s4cs6gaJpZM4QjJ8k.
Background
There is no option in manage.py to call the terraform destroy . If performed manually via terraform directly it is not successful: it is unable to delete the S3, SNS and SQS resources.
Desired Change
Introduce destroy option.