-
Notifications
You must be signed in to change notification settings - Fork 772
Description
TL;DR
CI tests have 100% failure rate since July 13th.
Tests are consistently broken by a perma-diff in Cloud Funcitons, with an error like the following:
Step #7 - "converge-org": TestOrg 2024-07-29T17:51:04Z retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1;
Step #7 - "converge-org": Error: Provider produced inconsistent final plan
Step #7 - "converge-org":
Step #7 - "converge-org": When expanding the plan for
Step #7 - "converge-org": module.cai_monitoring.module.cloud_function.google_cloudfunctions2_function.function
Step #7 - "converge-org": to include new values learned so far during apply, provider
Step #7 - "converge-org": "registry.terraform.io/hashicorp/google" produced an invalid new value for
Step #7 - "converge-org": .service_config[0].environment_variables: was null, but now
Step #7 - "converge-org": cty.MapVal(map[string]cty.Value{"LOG_EXECUTION_ID":cty.StringVal("true"),
Step #7 - "converge-org": "ROLES":cty.StringVal("roles/owner,roles/editor,roles/resourcemanager.organizationAdmin,roles/compute.networkAdmin,roles/compute.orgFirewallPolicyAdmin"),
Step #7 - "converge-org": "SOURCE_ID":cty.StringVal("organizations/943740911108/sources/17068193223143848275")}).
Step #7 - "converge-org":
Step #7 - "converge-org": This is a bug in the provider, which should be reported in the provider's own
Step #7 - "converge-org": issue tracker.}
Step #7 - "converge-org": apply.go:34:
Step #7 - "converge-org": Error Trace: /builder/home/go/pkg/mod/github.com/gruntwork-io/terratest@v0.46.16/modules/terraform/apply.go:34
Step #7 - "converge-org": /builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/blueprint-test@v0.16.0/pkg/tft/terraform.go:571
Step #7 - "converge-org": /workspace/test/integration/org/org_test.go:101
Step #7 - "converge-org": /builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/blueprint-test@v0.16.0/pkg/tft/terraform.go:630
Step #7 - "converge-org": /builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/blueprint-test@v0.16.0/pkg/tft/terraform.go:669
Step #7 - "converge-org": /builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/blueprint-test@v0.16.0/pkg/utils/stages.go:31
Step #7 - "converge-org": /builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/blueprint-test@v0.16.0/pkg/tft/terraform.go:669
Expected behavior
No response
Observed behavior
No response
Terraform Configuration
the automated Cloud Build suite for this repo
Terraform Version
the automated Cloud Build suite for this repo
Additional information
I'm having a hard time identifying what we need to update or modify to resolve this. It looks like the root issue was in the provider, here's what I've found so far:
There was a provider fix 27 days ago to fix a permadiff:
- https://github.com/hashicorp/terraform-provider-google/blame/4d74ea57be5c61538cee6183218b887c7dba21f3/google/services/cloudfunctions2/resource_cloudfunctions2_function.go#L38
- PR 18651 include in provider release 5.38.0 fixed permadiffs on
environment_variables
in cloudfunctions2 function hashicorp/terraform-provider-google#18651, - https://github.com/hashicorp/terraform-provider-google/releases/tag/v5.38.0
There is also a PR in terraform-google-cloud-function (which we reference) to use latest source has not been approved, from 27 days ago: GoogleCloudPlatform/terraform-google-cloud-functions#135
From the related dates, I expect that the PR 135 needs to be merged into the CFT module, then we can update with this repo with the CFT module. However, I'm not certain because I can't find where the provider fix is pulled into the CFT module.