Closed siran closed 4 years ago
One more thing: When I started this AWSweeper project (and when I was new to Go) I statically imported the Terraform AWS Provider to delete resources. I guess, at that time ECS didn't exist, so I think we can currently not delete ECS clusters (and I cannot import a newer version of the provider statically).
However, I am working on a new approach to dynamically use the latest Terraform AWS Provider as a plugin to always be able to delete also the newest resources (see: https://github.com/jckuester/terradozer). I just need some time to integrate that deletion approach here.
You mean by this that ECS can't be deleted with the current implementation of awsweeper?
Also, terradozer
seems very useful (we also need it!). But we want to delete resources not created with Terraform, so awsweeper
is just what we need.
You mean by this that ECS can't be deleted with the current implementation of awsweeper?
You can try, but I guess the answer is no. I will renew the deletion part in the next weeks by using what I learned from terradozer
. Hope you can wait a bit. Sorry for the inconvience.
@siran prepare the PR as much as you can, I will take care of it asap
UPDATE: I have started integrating the new destroy API (see https://github.com/cloudetc/awsweeper/pull/67), which means deleting ECS resources will soon work.
@siran I am done with making some bigger changes to potentially support deleting now any AWS resource with awsweeper
(https://github.com/cloudetc/awsweeper/pull/67 is merged to master). You can go ahead and test your changes now. Let me know if you need any help.
@siran I merged your PR locally and finished support for aws_ecs_cluster
resource in https://github.com/cloudetc/awsweeper/pull/84.
Note that aws_ecs_cluster
resources can only be deleted if all of the following dependencies are gone:
aws_ecs_task_definition
aws_ecs_service
aws_ecs_capacity_provider
So let me know, then I can support those resource types, too.
More than a pull request, I wanted to ask for you to please review this commit. I intent to add support for ECS CLUSTER deletion, but after adding all obvious changes and executing [1], I get the error [2].
[1] Create a file cluster.yml:
Build this commit and execute as:
If you have ECS Clusters on you AWS account, you should see an error similar to:
(disclaimer: I'm totally new to Go)