cloudbeat icon indicating copy to clipboard operation
cloudbeat copied to clipboard

[Create Environment] Fix Undeleted EBS Snapshots

Open romulets opened this issue 9 months ago • 0 comments

Based on the issue #8365, we found out that some environment creations were leaving undeleted EBS Snapshots behind.

The cases:

  • Failed creations
  • Environments with flag Cleanup resources after provision true
  • Environment is created successfully but everything Delete Environment is used before CNVM cycle is done.

We need to find a way to prevent undeleted EBS Snapshots (And delete current backlog).

Suggestions:

  • Implement grace shutdown in cloudbeat, which deletes even if a context cancel is signaled
  • On environment creation, "pass" a unique key as configuration to Cloudbeat, which then will be used to tag all the created snapshots. Then, on GH, once the environment is being cleaned up, delete the snapshots with the unique "deployment" identifier.
    • Note: Pass is between quotes because maybe there is a unique deployment id already available

romulets avatar May 21 '24 07:05 romulets