-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 google_bigquery_table encryption_configuration modifications #2880
fix google_bigquery_table encryption_configuration modifications #2880
Conversation
Hello! I am a robot who works on Magic Modules PRs. I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. They will authorize it to run through our CI pipeline, which will generate downstream PRs. Thanks for your contribution! A human will be with you soon. @rambleraptor, please review this PR or find an appropriate assignee. |
I'm not sure I'm convinced this is the best way to go here. I believe that technically this is the correct way to represent this in Terraform, because forcing a recreate is the only way to handle changes to encryption via the API. What worries me is that we would be introducing a potentially dangerous data loss situation when someone attempts to add encryption to their bigquery table, losing any data that existed in the table. I would almost prefer throwing an error when attempting to update the encryption config and point to the guide on copying & encrypting a table, but that's not very terraform-y @emilymye thoughts? |
I don't mind the more restrictive "encryption cannot be updated" approach for now, would be down with a customdiff.ValidateChange - if enough users hate it, we can switch to just allow ForceNew encryption. It doesn't hurt anyone who decided to do the more tedious copy-encryption, and I don't think anyone is updating their table encryption in an automated workflow. |
We discussed this in a meeting and prefer the |
Hi! I'm the modular magician, I work on Magic Modules. Pull request statusesNo diff detected in terraform-google-conversion. New Pull RequestsI built this PR into one or more new PRs on other repositories, and when those are closed, this PR will also be merged and closed. |
- changing to/from CMEK requires recreating the table (see [Change a table from default encryption to Cloud KMS protection](https://cloud.google.com/bigquery/docs/customer-managed-encryption#change_to_kms)) - the BQ API appears to support the default -> kms transition (no API error), but tables don't appear to get encrypted according to the UI/CLI - see hashicorp/terraform-provider-google#5241 and GoogleCloudPlatform#2763 (comment) for more info
75262f5
to
1f4fc2a
Compare
Thanks for the thoughtful consideration, I agree with the consistency argument. |
Release Note Template for Downstream PRs (will be copied)