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 (#9757)
  • Loading branch information
wj-chen authored Jan 8, 2024
1 parent 4222056 commit e134913
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 e134913

Please sign in to comment.