elastic / cloudbeat

Analyzing Cloud Security Posture
Other
37 stars 43 forks source link

add new wf #2266

Closed gurevichdmitry closed 2 weeks ago

gurevichdmitry commented 3 weeks ago

Summary of your changes

This PR introduces a new scheduled workflow to automatically destroy expired environments. Additionally, the existing workflow has been updated to support this functionality. TheCreate Environment workflow now includes a new input parameter, expiration_days, which specifies the number of days until the environment expires. This date is calculated and stored in the env_config.json file.

The Destroy Expired Environments workflow comprises two jobs: one for identifying expired environments and another for executing the destroy process. Due to limitations in the GCP environment deletion script, the destroy process is currently set to run sequentially.

Screenshot/Data

Expiration Days

Screenshot 2024-06-19 at 9 04 01

Logging environments

Screenshot 2024-06-19 at 9 12 29

Destroy Expired Environment WF

Screenshot 2024-06-19 at 9 13 23 Screenshot 2024-06-19 at 9 04 54

Related Issues

Checklist

mergify[bot] commented 3 weeks ago

This pull request does not have a backport label. Could you fix it @gurevichdmitry? 🙏 To fixup this pull request, you need to add the backport labels for the needed branches, such as:

github-actions[bot] commented 3 weeks ago

:bar_chart: Allure Report - :green_heart: No failures were reported.

Result Count
🟥 Failed 0
🟩 Passed 359
⬜ Skipped 33