Closed morgante closed 4 years ago
@morgante Additional input exclude_labels
should be string or list of strings? If it's list, then it have to be JSON format or YAML, or any other format?
Should exclude_labels
input value ignore folder ID? (Affects all projects, not only under the folder)
Should, also folder ID
affect old inputs?
exclude_labels
should be a map of key/value pairs (in Terraform). It should be combined with folder ID.
So the workflow is that all projects under folder_id
without an excluded label will be deleted.
@paulpalamarchuk can you clarify what you mean by
folder ID affect old inputs
@aaron-lane If folder_id
is not set, does the func have to delete all the projects(which have defined labels) within the org? I think it's unsafe.
@aaron-lane If folder_id is not set, does the func have to delete all the projects(which have defined labels) within the org? I think it's unsafe.
I think we can make folder_id required.
We need to add infrastructure for cleaning up old test projects so they don't continue to cost us money. The work involved should be:
exclude_labels: {cft-testing: persistent}
)infra/terraform/test-org/test-cleanup/
which sources the project cleanup module and instantiates it on our org. Work began on this here, please pick up from that PR.