GoogleCloudPlatform / samples-experiment

🧪 Experiment time! Let's see if a monorepo for Cloud samples is a good idea.
Apache License 2.0
3 stars 2 forks source link

feat: Adding UST metadata for tests using Terraform #18

Closed m-strzelczyk closed 10 months ago

m-strzelczyk commented 11 months ago

Uploading an example that will use Terraform to set up testing environments.

This metadata file also is the first one to feature 2 test cases for single sample.

Terraform would be used by copying the listed .tf files into a temporary directory, executing terraform init followed by terraform apply. Obviously, both need to be successful for the test to continue.

For cleanup, the system will revisit the temporary folder, run terraform refresh followed by terraform destroy. This will remove any resources that are still under Terrraform control. In case there needs to be some additional cleanup, additional commands will be executed before terraform destroy