NubesGen icon indicating copy to clipboard operation
NubesGen copied to clipboard

Easily delete environments on-demand

Open cmaneu opened this issue 3 years ago • 1 comments

GitOps allows you to create environments very easily. Deleting environments is a bit more tricky. One way we can offer a simple environment deletion is by leveraging workflow_dispatch and inputs.

We can simply generate another action "delete-environment", which takes as an input the environment name, or just derives it from the selected branch. Here is an example of the UI:

image

Terraform implementation We can remove all terraform files within the action (not on the repo) and do a Terraform apply.

Bicep We can't do the same thing in bicep, but we can simply call the Azure CLI to delete all created resources. Either by resource group name, or by Tags.

See https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ for more info.

cmaneu avatar Jan 28 '22 11:01 cmaneu

cc @jdubois for visibility

cmaneu avatar Feb 21 '22 10:02 cmaneu