Skip to content

Commit d1ec57f

Browse files
Gaurav SinghMaxrovr
authored andcommitted
Bug Fix : Adbs switchover logic and secret Id bug
1 parent 628cbf8 commit d1ec57f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/service/database/database_autonomous_database_resource.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,7 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) Update() error {
22812281
}
22822282
}
22832283

2284-
if secretId, ok := s.D.GetOkExists("secret_id"); ok && s.D.HasChange("secret_version_number") {
2284+
if secretId, ok := s.D.GetOkExists("secret_id"); ok && s.D.HasChange("secret_id") {
22852285
tmp := secretId.(string)
22862286
request.SecretId = &tmp
22872287
if _, ok := s.D.GetOkExists("freeform_tags"); ok && !s.D.HasChange("freeform_tags") {
@@ -6313,9 +6313,8 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) validateSwitchoverDatabase() er
63136313
newId := strings.ToLower(strings.TrimSpace(newIdRaw.(string)))
63146314

63156315
if newId != "" {
6316-
_, dgRegionTypeExists := s.D.GetOkExists("dataguard_region_type")
63176316
_, dgRoleExists := s.D.GetOkExists("role")
6318-
if !dgRegionTypeExists || !dgRoleExists {
6317+
if !dgRoleExists {
63196318
return fmt.Errorf("Autonomous Data Guard not found in enabled state")
63206319
}
63216320

0 commit comments

Comments
 (0)