hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.35k stars 1.75k forks source link

Make bootstrapping use VCR configs when possible #16292

Open trodge opened 1 year ago

trodge commented 1 year ago

Background

Certain VCR tests are flaky because bootstrapping uses libraries that violate the assumptions of VCR replaying. They do this by pulling credentials from environment variables.

For example, IAM bootstrapping uses google.golang.org/api/cloudresourcemanager/v1 to read the policy on test projects and modify it if needed permissions are missing. This is problematic because tests run in VCR REPLAYING mode could still potentially make calls that return 409 (unavailable) errors and consume resources needed to run other tests.

What kind of contribution is this issue about?