Hi,
I’m working on a project, where terraform tfstate files are placed in a Google Bucket (GCS) for every Dataproc cluster that is created. Since Cloud Functions support ability to trigger an event after each DataProc cluster is deleted, I would like to trigger a Python script that would run terraform destroy on particular .tfstate file located in GCS.
I tried looking online for a find similar solution, but was unable to find anything related. Since Cloud Functions 2nd gen are running as part of containers, I would need to download & install setup Terraform as part of each Functions run which I’m trying to avoid, as I’d like to keep it as simple as possible.
Hence, why I’m asking this question to see if there’s anyone who did anything similar, or if I should stay away from creating one such solution, as it could be seen as a potential anti pattern for Cloud Function use?
Thank you and looking forward to your input!