seqeralabs / cx-field-tools-installer

Unofficial Terraform solution to help clients install Seqera Platform
Apache License 2.0
3 stars 1 forks source link

[ Enhancement ] Add mechanism to tear down TowerForge-generated environments prior to `terraform destroy` #108

Open gwright99 opened 3 months ago

gwright99 commented 3 months ago

The seqerakit integration allows one to provision a brand new AWS Batch CE (via TowerForge) as part of the terraform apply process. While this is very handy from a stand-up process, it can result in orphan resources in the AWS Account in the event that a user invokes a terraform destroy action prior to cleaning up resources inside Tower (due to Tower controlling the state of these objects rather than TF).

The make destroy command should be enhanced to loop through all TowerForge-generated CEs in the implementation, and destroy them, prior to invoking the terraform destroy command.

gwright99 commented 3 months ago

@schaluva - this could be a good ticket for you to run with: solves a genuine problem, the project already has most of the infrastructure necessary to implement this extension, and it gives you a chance to play with the Tower APIs.

Depending how your testing goes today, we can align this afternoon / early next week.