Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix permadiff of encryption_configuration in resource_bigquery_table when API returns an empty object #1840

Conversation

modular-magician
Copy link
Collaborator

Sometimes the API returns a table with "encryptionConfiguration": {} when the input omits this field.

Without this change, the Terraform state file would end up with

"encryption_configuration": [
  {
    "kms_key_name": "",
     "kms_key_version": ""
  }
]

This would cause the subsequent plan to end up with a diff of - encryption_configuration {} # forces replacement.

With this change, the new Terraform state file would have:

"encryption_configuration": []

This would no longer result in a permadiff.

Release Note Template for Downstream PRs (will be copied)

bigquery: Fix permadiff of encryption_configuration in resource_bigquery_table when API returns an empty object

Derived from GoogleCloudPlatform/magic-modules#9757

…when API returns an empty object (#9757)

[upstream:e13491302ec24b3bee4a10d88b319d2cfa14067b]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician requested a review from a team as a code owner January 8, 2024 19:17
@modular-magician modular-magician requested review from roaks3 and removed request for a team January 8, 2024 19:17
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@modular-magician modular-magician merged commit afa66a4 into GoogleCloudPlatform:main Jan 8, 2024
5 checks passed
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