Skip to content

Commit d2e63fa

Browse files
Revert "Added - Support for Configure RTRT via console + Unit-tests: ExaDB@CC"
This reverts commit 123964d.
1 parent a762647 commit d2e63fa

File tree

2 files changed

+14
-43
lines changed

2 files changed

+14
-43
lines changed

internal/integrationtest/database_database_test.go

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,9 @@ var (
527527

528528
databaseDatabaseNoHsmRepresentation2 = map[string]interface{}{
529529
"admin_password": acctest.Representation{RepType: acctest.Required, Create: `BEstrO0ng_#11`},
530-
"db_name": acctest.Representation{RepType: acctest.Required, Create: `myHsmDb2`},
530+
"db_name": acctest.Representation{RepType: acctest.Required, Create: `myHsmDb2`, Update: `myHsmDb5`},
531531
"character_set": acctest.Representation{RepType: acctest.Optional, Create: `AL32UTF8`},
532+
"db_unique_name": acctest.Representation{RepType: acctest.Optional, Create: `myHsmDb_47`},
532533
"db_workload": acctest.Representation{RepType: acctest.Optional, Create: `OLTP`},
533534
"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
534535
"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"freeformTags": "freeformTags"}, Update: map[string]string{"freeformTags2": "freeformTags2"}},
@@ -580,11 +581,10 @@ var (
580581
}
581582

582583
DbBackupConfigZdlraBackupDestinationDetailsRepresentation = map[string]interface{}{
583-
"type": acctest.Representation{RepType: acctest.Optional, Create: `RECOVERY_APPLIANCE`},
584-
"id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_backup_destination.test_zdlra_backup_destination.id}`},
585-
"vpc_user": acctest.Representation{RepType: acctest.Optional, Create: `bkupUser1`},
586-
"vpc_password": acctest.Representation{RepType: acctest.Optional, Create: `testPassword`},
587-
"is_zero_data_loss_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`},
584+
"type": acctest.Representation{RepType: acctest.Optional, Create: `RECOVERY_APPLIANCE`},
585+
"id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_backup_destination.test_zdlra_backup_destination.id}`},
586+
"vpc_user": acctest.Representation{RepType: acctest.Optional, Create: `bkupUser1`},
587+
"vpc_password": acctest.Representation{RepType: acctest.Optional, Create: `testPassword`},
588588
}
589589

590590
databaseDatabaseDbBackupConfigRepresentation = map[string]interface{}{
@@ -1222,13 +1222,13 @@ func TestDatabaseDatabaseResource_multipleStandby(t *testing.T) {
12221222
resource.TestCheckResourceAttr(primaryDatabase, "database.0.db_name", "myTestDb"),
12231223
resource.TestCheckResourceAttrSet(primaryDatabase, "db_home_id"),
12241224
resource.TestCheckResourceAttr(primaryDatabase, "source", "NONE"),
1225-
//resource.TestCheckResourceAttrSet(primaryDatabase, "defined_tags"),
1226-
//resource.TestCheckResourceAttrSet(primaryDatabase, "freeform_tags"),
1225+
resource.TestCheckResourceAttrSet(primaryDatabase, "defined_tags"),
1226+
resource.TestCheckResourceAttrSet(primaryDatabase, "freeform_tags"),
12271227
resource.TestCheckResourceAttr(standbyDatabase, "database.#", "1"),
12281228
resource.TestCheckResourceAttr(standbyDatabase, "database.0.db_name", "myTestDb"),
12291229
resource.TestCheckResourceAttrSet(standbyDatabase, "db_home_id"),
1230-
//resource.TestCheckResourceAttrSet(standbyDatabase, "defined_tags"),
1231-
//resource.TestCheckResourceAttrSet(standbyDatabase, "freeform_tags"),
1230+
resource.TestCheckResourceAttrSet(standbyDatabase, "defined_tags"),
1231+
resource.TestCheckResourceAttrSet(standbyDatabase, "freeform_tags"),
12321232
resource.TestCheckResourceAttr(standbyDatabase, "source", "DATAGUARD"),
12331233
resource.TestCheckResourceAttrSet(standbyDatabase, "data_guard_group.#"),
12341234
resource.TestCheckResourceAttr(standbyDatabase, "data_guard_group.0.protection_mode", "MAXIMUM_PERFORMANCE"),
@@ -1431,29 +1431,27 @@ func TestExaccDatabaseBackupDestination_basic(t *testing.T) {
14311431
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_backup_config.0.backup_destination_details.#", "1"),
14321432
resource.TestCheckResourceAttrSet(databaseResourceName, "database.0.db_backup_config.0.backup_destination_details.0.id"),
14331433
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_backup_config.0.backup_destination_details.0.type", "RECOVERY_APPLIANCE"),
1434-
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_backup_config.0.backup_destination_details.0.is_zero_data_loss_enabled", "false"),
14351434

14361435
resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.db_name", "myHsmDb"),
14371436
),
14381437
},
14391438
// Update EXACC database
14401439
{
14411440
Config: config + compartmentIdVariableStr + DatabaseExaccHsmDbHomeResourceDependencies +
1442-
acctest.GenerateResourceFromRepresentationMap("oci_database_backup_destination", "test_zdlra_backup_destination", acctest.Optional, acctest.Create, DatabaseBackupDestinationRepresentation) +
1443-
acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_hsm_db_home", acctest.Optional, acctest.Create, dbHomeHsmRepresentation) +
1441+
acctest.GenerateResourceFromRepresentationMap("oci_database_backup_destination", "test_zdlra_backup_destination", acctest.Optional, acctest.Update, DatabaseBackupDestinationRepresentation) +
1442+
acctest.GenerateResourceFromRepresentationMap("oci_database_db_home", "test_hsm_db_home", acctest.Optional, acctest.Update, dbHomeHsmRepresentation) +
14441443
acctest.GenerateResourceFromRepresentationMap("oci_database_database", "test_database", acctest.Optional, acctest.Update, DatabaseDatabaseZdlraRepresenation),
14451444
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
14461445
resource.TestCheckResourceAttr(databaseResourceName, "database.#", "1"),
14471446
resource.TestCheckResourceAttr(databaseResourceName, "database.0.admin_password", "BEstrO0ng_#11"),
1448-
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_name", "myHsmDb2"),
1447+
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_name", "myHsmDb5"),
14491448
resource.TestCheckResourceAttrSet(databaseResourceName, "db_home_id"),
14501449
resource.TestCheckResourceAttr(databaseResourceName, "source", "NONE"),
14511450
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_backup_config.#", "1"),
14521451
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_backup_config.0.auto_backup_enabled", "true"),
14531452
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_backup_config.0.backup_destination_details.#", "1"),
14541453
resource.TestCheckResourceAttrSet(databaseResourceName, "database.0.db_backup_config.0.backup_destination_details.0.id"),
14551454
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_backup_config.0.backup_destination_details.0.type", "RECOVERY_APPLIANCE"),
1456-
resource.TestCheckResourceAttr(databaseResourceName, "database.0.db_backup_config.0.backup_destination_details.0.is_zero_data_loss_enabled", "true"),
14571455
resource.TestCheckResourceAttr(dbHomeResourceName, "database.0.db_name", "myHsmDb"),
14581456
),
14591457
},

internal/service/database/database_database_resource.go

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ func DatabaseDatabaseResource() *schema.Resource {
150150
Optional: true,
151151
Computed: true,
152152
},
153-
"is_zero_data_loss_enabled": {
154-
Type: schema.TypeBool,
155-
Computed: true,
156-
Optional: true,
157-
},
158153
"id": {
159154
Type: schema.TypeString,
160155
Optional: true,
@@ -638,11 +633,7 @@ func DatabaseDatabaseResource() *schema.Resource {
638633
// Required
639634

640635
// Optional
641-
"is_zero_data_loss_enabled": {
642-
Type: schema.TypeBool,
643-
Computed: true,
644-
Optional: true,
645-
},
636+
646637
// Computed
647638
"backup_retention_policy_on_terminate": {
648639
Type: schema.TypeString,
@@ -1199,11 +1190,6 @@ func (s *DatabaseDatabaseResourceCrud) mapToBackupDestinationDetails(fieldKeyFor
11991190
result.IsRetentionLockEnabled = &tmp
12001191
}
12011192

1202-
if IsZeroDataLossEnabled, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_zero_data_loss_enabled")); ok {
1203-
tmp := IsZeroDataLossEnabled.(bool)
1204-
result.IsZeroDataLossEnabled = &tmp
1205-
}
1206-
12071193
if remoteRegion, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "remote_region")); ok {
12081194
tmp := remoteRegion.(string)
12091195
result.RemoteRegion = &tmp
@@ -1236,11 +1222,6 @@ func (s *DatabaseDatabaseResourceCrud) mapToUpdateBackupDestinationDetails(field
12361222
"vpc_user": func(val string) { tmp := val; result.VpcUser = &tmp },
12371223
}
12381224

1239-
if isZeroDataLossEnabled, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_zero_data_loss_enabled")); ok {
1240-
tmp := isZeroDataLossEnabled.(bool)
1241-
result.IsZeroDataLossEnabled = &tmp
1242-
}
1243-
12441225
for fieldName, setter := range fields {
12451226
key := fmt.Sprintf(fieldKeyFormat, fieldName)
12461227
if val, ok := s.D.GetOkExists(key); ok {
@@ -1331,10 +1312,6 @@ func (s *DatabaseDatabaseResourceCrud) BackupDestinationDetailsToMap(obj oci_dat
13311312
result["is_retention_lock_enabled"] = bool(*obj.IsRetentionLockEnabled)
13321313
}
13331314

1334-
if obj.IsZeroDataLossEnabled != nil {
1335-
result["is_zero_data_loss_enabled"] = bool(*obj.IsZeroDataLossEnabled)
1336-
}
1337-
13381315
if obj.RemoteRegion != nil {
13391316
result["remote_region"] = string(*obj.RemoteRegion)
13401317
}
@@ -1377,10 +1354,6 @@ func BackupDestinationDetailsToMap(obj oci_database.BackupDestinationDetails) ma
13771354
result["is_retention_lock_enabled"] = bool(*obj.IsRetentionLockEnabled)
13781355
}
13791356

1380-
if obj.IsZeroDataLossEnabled != nil {
1381-
result["is_zero_data_loss_enabled"] = bool(*obj.IsZeroDataLossEnabled)
1382-
}
1383-
13841357
if obj.RemoteRegion != nil {
13851358
result["remote_region"] = string(*obj.RemoteRegion)
13861359
}

0 commit comments

Comments
 (0)