Skip to content

Commit 9762e8b

Browse files
Added ignore_read to encryption_config field in google_backup_dr_backup_vault (#16050) (#11345) (#11347)
[upstream:0d351bc6c667dad209bde347beae6231a10d90b4] Signed-off-by: Modular Magician <magic-modules@google.com> Co-authored-by: The Magician <magic-modules@google.com>
1 parent 6ec3eea commit 9762e8b

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

.changelog/16050.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unknown: Added ignore_read to encryption_config field in google_backup_dr_backup_vault

google-beta/services/backupdr/resource_backup_dr_backup_vault.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,6 @@ func resourceBackupDRBackupVaultRead(d *schema.ResourceData, meta interface{}) e
514514
if err := d.Set("access_restriction", flattenBackupDRBackupVaultAccessRestriction(res["accessRestriction"], d, config)); err != nil {
515515
return fmt.Errorf("Error reading BackupVault: %s", err)
516516
}
517-
if err := d.Set("encryption_config", flattenBackupDRBackupVaultEncryptionConfig(res["encryptionConfig"], d, config)); err != nil {
518-
return fmt.Errorf("Error reading BackupVault: %s", err)
519-
}
520517
if err := d.Set("terraform_labels", flattenBackupDRBackupVaultTerraformLabels(res["labels"], d, config)); err != nil {
521518
return fmt.Errorf("Error reading BackupVault: %s", err)
522519
}
@@ -854,23 +851,6 @@ func flattenBackupDRBackupVaultAccessRestriction(v interface{}, d *schema.Resour
854851
return v
855852
}
856853

857-
func flattenBackupDRBackupVaultEncryptionConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
858-
if v == nil {
859-
return nil
860-
}
861-
original := v.(map[string]interface{})
862-
if len(original) == 0 {
863-
return nil
864-
}
865-
transformed := make(map[string]interface{})
866-
transformed["kms_key_name"] =
867-
flattenBackupDRBackupVaultEncryptionConfigKmsKeyName(original["kmsKeyName"], d, config)
868-
return []interface{}{transformed}
869-
}
870-
func flattenBackupDRBackupVaultEncryptionConfigKmsKeyName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
871-
return v
872-
}
873-
874854
func flattenBackupDRBackupVaultTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
875855
if v == nil {
876856
return v

google-beta/services/backupdr/resource_backup_dr_backup_vault_generated_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func TestAccBackupDRBackupVault_backupDrBackupVaultSimpleExample(t *testing.T) {
7070
ResourceName: "google_backup_dr_backup_vault.backup-vault-test",
7171
ImportState: true,
7272
ImportStateVerify: true,
73-
ImportStateVerifyIgnore: []string{"allow_missing", "annotations", "backup_retention_inheritance", "backup_vault_id", "force_delete", "force_update", "ignore_backup_plan_references", "ignore_inactive_datasources", "labels", "location", "terraform_labels"},
73+
ImportStateVerifyIgnore: []string{"allow_missing", "annotations", "backup_retention_inheritance", "backup_vault_id", "encryption_config", "force_delete", "force_update", "ignore_backup_plan_references", "ignore_inactive_datasources", "labels", "location", "terraform_labels"},
7474
},
7575
},
7676
})
@@ -128,7 +128,7 @@ func TestAccBackupDRBackupVault_backupDrBackupVaultCmekExample(t *testing.T) {
128128
ResourceName: "google_backup_dr_backup_vault.backup-vault-cmek",
129129
ImportState: true,
130130
ImportStateVerify: true,
131-
ImportStateVerifyIgnore: []string{"allow_missing", "annotations", "backup_retention_inheritance", "backup_vault_id", "force_delete", "force_update", "ignore_backup_plan_references", "ignore_inactive_datasources", "labels", "location", "terraform_labels"},
131+
ImportStateVerifyIgnore: []string{"allow_missing", "annotations", "backup_retention_inheritance", "backup_vault_id", "encryption_config", "force_delete", "force_update", "ignore_backup_plan_references", "ignore_inactive_datasources", "labels", "location", "terraform_labels"},
132132
},
133133
},
134134
})

0 commit comments

Comments
 (0)