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 #9757

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

wj-chen
Copy link
Member

@wj-chen wj-chen commented Jan 5, 2024

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

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

@trodge, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 100
Passed tests 92
Skipped tests: 8
Affected tests: 0

Click here to see the affected service packages
  • bigquery

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

@trodge trodge merged commit e134913 into GoogleCloudPlatform:main Jan 8, 2024
12 checks passed
bskaplan pushed a commit to bskaplan/magic-modules that referenced this pull request Jan 17, 2024
kylase pushed a commit to yuanchuankee/magic-modules that referenced this pull request Jan 21, 2024
@wj-chen wj-chen deleted the encryption_configuration branch February 1, 2024 23:03
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants