Skip to content

Unignore empty values in the provider configuration block in 5.0.0#542

Merged
modular-magician merged 1 commit into
terraform-google-modules:FEATURE-BRANCH-major-release-5.0.0from
modular-magician:downstream-pr-83df04114dd8f94bff865079d04b37dd0979f2fa
Sep 22, 2023
Merged

Unignore empty values in the provider configuration block in 5.0.0#542
modular-magician merged 1 commit into
terraform-google-modules:FEATURE-BRANCH-major-release-5.0.0from
modular-magician:downstream-pr-83df04114dd8f94bff865079d04b37dd0979f2fa

Conversation

@modular-magician

Copy link
Copy Markdown
Collaborator

This PR stops the provider ignoring empty strings in provider blocks; if the value is in a user's config then it should be used by the code or removed by the user.

After muxing the provider we accidentally changed its behaviour to stop ignoring empty strings. That behaviour is what we'd expect the correct behaviour to be, so we are reverting to the old behaviour in a 4.x.x release (see GoogleCloudPlatform/magic-modules#8798) and then intentionally making the switch to the new behaviour as part of 5.0.0

ALSO I've decided against making similar changes in GoogleCloudPlatform/magic-modules#9015 because it would result in breaking changes for users when any datasources/resources are migrated to the plugin framework.

To do:

  • Remove validation of empty strings
  • Remove code that converts empty values to null values (awaiting sync from main to release branch)
  • Update tests

Release Note Template for Downstream PRs (will be copied)

provider: Empty strings in the provider configuration block will no longer be ignored when configuring the provider

Derived from GoogleCloudPlatform/magic-modules#9014

…(#9014)

* Stop validating `""` as valid `credentials` value in the PF provider config

* Remove code that makes PF ignore empty values

* Update PF config code tests to match change in PF config code behaviour

* Update remaining PF config code tests

* Update test for the PF version of credentials validator

* Make not on SDK version of credentials validator that it cannot distinguish between `""` in config vs zero values

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 515f9d6 into terraform-google-modules:FEATURE-BRANCH-major-release-5.0.0 Sep 22, 2023
@modular-magician modular-magician deleted the downstream-pr-83df04114dd8f94bff865079d04b37dd0979f2fa branch November 18, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant