Skip to content

Commit

Permalink
fix permadiff of encryption_configuration in resource_bigquery_table …
Browse files Browse the repository at this point in the history
…when API returns an empty object (GoogleCloudPlatform#9757)
  • Loading branch information
wj-chen authored and Yuan Chuan Kee committed Jan 21, 2024
1 parent cb62aa8 commit 053e984
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2127,6 +2127,10 @@ func flattenEncryptionConfiguration(ec *bigquery.EncryptionConfiguration) []map[
re := regexp.MustCompile(`(projects/.*/locations/.*/keyRings/.*/cryptoKeys/.*)/cryptoKeyVersions/.*`)
paths := re.FindStringSubmatch(ec.KmsKeyName)

if len(ec.KmsKeyName) == 0 {
return nil
}

if len(paths) > 0 {
return []map[string]interface{}{
{
Expand Down

0 comments on commit 053e984

Please sign in to comment.