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.25k stars 1.7k forks source link

Failing test(s): inTestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityCustomSkiExample #18662

Open SarahFrench opened 5 days ago

SarahFrench commented 5 days ago

Impacted tests

Affected Resource(s)

Failure rates

Message(s)

------- Stdout: -------
=== RUN   TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityCustomSkiExample
=== PAUSE TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityCustomSkiExample
=== CONT  TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityCustomSkiExample
    vcr_utils.go:152: Step 1/2 error: Error running apply: exit status 1
        Error: Error waiting to create CertificateAuthority: Error waiting for Creating CertificateAuthority: Error code 3, message: com.google.apps.framework.request.StatusException: <eye3 title=\\\'INVALID_ARGUMENT\\\'/> generic::INVALID_ARGUMENT: Exception calling IAM: Service account service-594424405950@gcp-sa-privateca.iam.gserviceaccount.com does not exist.; IAM SetIamPolicy RPC failed on project_id: a2b7a77cafa293e0bp-tp.
          with google_privateca_certificate_authority.default,
          on terraform_plugin_test.tf line 2, in resource "google_privateca_certificate_authority" "default":
           2: resource "google_privateca_certificate_authority" "default" {
--- FAIL: TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthorityCustomSkiExample (14.92s)
FAIL

Nightly build test history

b/351842949

SarahFrench commented 5 days ago

We can force the service account to exist by using this:

resource "google_project_service_identity" "privateca_sa" {
  provider = google-beta
  service = "privateca.googleapis.com"
}

But when this is introduced to the test then a permissions error occurs instead. See https://github.com/GoogleCloudPlatform/magic-modules/pull/11109#issuecomment-2209261184