terraform-provider-google: Provider configuration values supplied as empty strings/zero-values are no longer treated like null values (muxed provider, v4.60.2+)

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

v1.1.9

Affected Resource(s)

Google Provider

### Debug Output

[DEBUG] provider.terraform-provider-google_v4.60.2_x5: Calling provider defined validator.String: @module=sdk.framework description="value must match regular expression '.*/[^/]+/$'" tf_attribute_path=redis_custom_endpoint tf_rpc=PrepareProviderConfig @caller=github.com/hashicorp/terraform-plugin-framework@v1.1.1/internal/fwserver/attribute_validation.go:704 tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=<removed>

[DEBUG] provider.terraform-provider-google_v4.60.2_x5: Called provider defined validator.String: @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=<removed>@caller=github.com/hashicorp/terraform-plugin-framework@v1.1.1/internal/fwserver/attribute_validation.go:714 description="value must match regular expression '.*/[^/]+/$'" tf_attribute_path=redis_custom_endpoint tf_mux_provider=*proto5server.Server tf_rpc=PrepareProviderConfig 

[DEBUG] provider.terraform-provider-google_v4.60.2_x5: Calling provider defined validator.String: tf_rpc=PrepareProviderConfig @caller=github.com/hashicorp/terraform-plugin-framework@v1.1.1/internal/fwserver/attribute_validation.go:704 @module=sdk.framework description="value must match regular expression '.*/[^/]+/$'" tf_attribute_path=tpu_custom_endpoint tf_req_id=<removed> tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google 


Error: JSON credentials are not valid
  with provider["registry.terraform.io/hashicorp/google"],
plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/google/4.60.2/linux_amd64/terraform-provider-google_v4.60.2_x5
Terraform invocation failed

When I constrained to version 4.59.0, the issue resolved.

Panic Output

Expected Behavior

Plan should have run

Actual Behavior

Plan failed

Steps to Reproduce

  1. terraform plan

Important Factoids

References

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 27 (7 by maintainers)

Most upvoted comments

We’ve decided to update future 4.x.x versions to have parity with the old versions of the provider that only used the SDK to structure the code. When 5.0.0 comes around we’ll remove the ability to set provider arguments as “” and have them ignored by the code in favour of ENVs/ADC/etc.

So, I’ll leave this issue open until the provider config logic has been updated to allow credentials="" (and the same for other string type arguments).

I’ll reopen for more investigation but, just to manage expectations, I can’t look into this until next week earliest. Hopefully that isn’t an issue as there’s the workaround you described!

To be clear, when I constrained the provider version to 4.59.0, I was able to run a plan without any other changes.