GoogleCloudPlatform / terraform-validator

Terraform Validator is not an officially supported Google product; it is a library for conversion of Terraform plan data to CAI Assets. If you have been using terraform-validator directly in the past, we recommend migrating to `gcloud beta terraform vet`.
https://cloud.google.com/docs/terraform/policy-validation
Apache License 2.0
437 stars 93 forks source link

Add SKIP_PROJECT_SWEEPER env variable for skipping the project sweeper #1442

Closed modular-magician closed 1 year ago

modular-magician commented 1 year ago

This is implemented as a general-purpose flag that can be used to skip the project sweeper any time it is useful.

However, the specific reason for adding it is for the upcoming project split for our nightly tests. When we have multiple projects initiating acceptance tests (GA, Beta, VCR), they will be sharing project-space, and can inadvertently sweep projects being used by one of the other environments.

Using this flag, we can choose one of the environments to sweep projects when no tests are being run, and then have the other environments skip the project sweeper.

If this PR is for Terraform, I acknowledge that I have:

Release Note Template for Downstream PRs (will be copied)

Derived from https://github.com/GoogleCloudPlatform/magic-modules/pull/7432