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

Add Bigtable CMEK Support #4770

Merged
merged 2 commits into from
Jun 18, 2021
Merged

Conversation

upodroid
Copy link
Contributor

@upodroid upodroid commented May 6, 2021

Fixes: hashicorp/terraform-provider-google#8882

You need to upgrade the bigtable library.

go get -u cloud.google.com/go/bigtable

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

bigtable: added `cluster.kms_key_name` field to `google_bigtable_instance`

@google-cla google-cla bot added the cla: yes label May 6, 2021
@modular-magician
Copy link
Collaborator

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.

Thanks for your contribution! A human will be with you soon.

@c2thorn, please review this PR or find an appropriate assignee.

@modular-magician modular-magician requested a review from c2thorn May 6, 2021 17:31
Co-authored-by: upodroid <[email protected]>
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 67 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 5 files changed, 70 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=185977"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 67 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 3 files changed, 67 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=185978"

@c2thorn
Copy link
Member

c2thorn commented May 14, 2021

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=187389"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 67 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 3 files changed, 67 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=187390"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccBigQueryDataTable_bigtable|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=187400"

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccBigQueryDataTable_bigtable|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample Please fix these to complete your PR

@c2thorn
Copy link
Member

c2thorn commented May 14, 2021

Upgrading cloud.google.com/go/bigtable causes the other tests like TestAccBigtableInstance_basic to crash. I'm thinking it may be an issue upstream since it crashes here: https://github.com/googleapis/google-cloud-go/blob/master/bigtable/admin.go#L1171

@upodroid
Copy link
Contributor Author

Interesting, I haven't run the other tests 😄

@c2thorn
Copy link
Member

c2thorn commented May 18, 2021

They fixed the issue in googleapis/google-cloud-go#4105, I'll wait on next release

@rileykarson
Copy link
Member

@c2thorn
Copy link
Member

c2thorn commented Jun 17, 2021

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=192535"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 67 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 4 files changed, 68 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=192537"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccAppEngineStandardAppVersion_update|TestAccBigQueryDataTable_bigtable|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccBinaryAuthorizationPolicy_basic|TestAccBinaryAuthorizationPolicy_full|TestAccBinaryAuthorizationPolicy_separateProject|TestAccCloudRunService_cloudRunServiceSecretEnvironmentVariablesExample|TestAccCloudRunService_cloudRunServiceSecretVolumesExample|TestAccCloudRunService_secretVolume|TestAccBinaryAuthorizationPolicy_update|TestAccCloudRunService_secretEnvironmentVariable|TestAccCloudFunctionsFunction_vpcConnector|TestAccComputeBackendBucket_backendBucketFullExample|TestAccComputeBackendBucket_withCdnPolicy|TestAccComputeBackendService_backendServiceCacheSimpleExample|TestAccComputeBackendService_backendServiceCacheExample|TestAccComputeBackendService_withSecurityPolicy|TestAccComputeBackendService_withCdnPolicy|TestAccComputeDiskResourcePolicyAttachment_update|TestAccComputeInterconnectAttachment_interconnectAttachmentBasicExample|TestAccComputeRegionBackendService_regionBackendServiceCacheExample|TestAccComputeSecurityPolicy_basic|TestAccComputeSecurityPolicy_withRuleExpr|TestAccComputeSecurityPolicy_withRule|TestAccComputeSecurityPolicy_update|TestAccContainerCluster_withILBSubsetting|TestAccContainerCluster_withNodeConfigScopeAlias|TestAccDataprocClusterIamBinding|TestAccDataprocClusterIamMember|TestAccDataprocClusterIamPolicy|TestAccDataprocCluster_updatable|TestAccDataprocCluster_withConfigOverrides|TestAccDataprocCluster_withTempBucket|TestAccDataprocCluster_withStagingBucket|TestAccDataprocCluster_withInitAction|TestAccDataprocJobIamBinding|TestAccDataprocJobIamMember|TestAccDataprocCluster_withServiceAcc|TestAccDataprocJobIamPolicy|TestAccDataprocJob_updatable|TestAccDataprocJob_PySpark|TestAccDataprocJob_Spark|TestAccDataprocJob_Hadoop|TestAccDataprocJob_Hive|TestAccDataprocJob_Pig|TestAccDataprocJob_SparkSql|TestAccIAMBetaWorkloadIdentityPoolProvider_oidc|TestAccIAMBetaWorkloadIdentityPoolProvider_aws|TestAccRedisInstance_update|TestAccSqlDatabaseInstance_diskspecs|TestAccVPCAccessConnector_vpcAccessConnectorExample|TestAccVPCAccessConnector_vpcAccessConnectorSharedVPCExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=192540"

@@ -36,10 +36,6 @@ func resourceBigtableInstance() *schema.Resource {
},
},

// ----------------------------------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note:
We are moving ahead with removing this now that deletion_protection is available.

@@ -82,6 +78,13 @@ func resourceBigtableInstance() *schema.Resource {
ValidateFunc: validation.StringInSlice([]string{"SSD", "HDD"}, false),
Description: `The storage type to use. One of "SSD" or "HDD". Defaults to "SSD".`,
},
"kms_key_name": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for context:
This field is optional+computed and deletion protection is available. Introducing this as a new ForceNew field should have lower risk than before.

Copy link
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests pass after the upstream fix. Requesting some more warnings/notes about the field in documentation, and then we should be good to go.

Copy link
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went ahead and committed the documentation add

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 71 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 4 files changed, 72 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=192563"

@upodroid
Copy link
Contributor Author

thanks

@c2thorn c2thorn merged commit bcdd37c into GoogleCloudPlatform:master Jun 18, 2021
@c2thorn c2thorn deleted the bigtable-cmek branch June 18, 2021 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Bigtable CMEK
4 participants