Skip to content

Commit d204c11

Browse files
gauravkumarsinghNagaRajuPasunuri
authored andcommitted
bugfix for privateenpointip and displayName params in update
1 parent e45c5d9 commit d204c11

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

examples/database/adb/autonomous_database.tf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -401,15 +401,3 @@ resource "oci_database_autonomous_database" "test_autonomous_database_shrink" {
401401
shrink_adb_trigger = "2"
402402
is_auto_scaling_for_storage_enabled = "true"
403403
}
404-
405-
resource "oci_database_autonomous_database" "test_autonomous_database_subscriptionId" {
406-
admin_password = random_string.autonomous_database_admin_password.result
407-
compartment_id = var.compartment_ocid
408-
cpu_core_count = "1"
409-
data_storage_size_in_tbs = "1"
410-
db_name = "adbsubscription"
411-
db_version = "19c"
412-
db_workload = "OLTP"
413-
license_model = "LICENSE_INCLUDED"
414-
subscription_id = "SubscriptionID"
415-
}

internal/service/database/database_autonomous_database_resource.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,7 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) Update() error {
19661966
request.DefinedTags = convertedDefinedTags
19671967
}
19681968

1969-
if displayName, ok := s.D.GetOkExists("display_name"); ok {
1969+
if displayName, ok := s.D.GetOkExists("display_name"); ok && s.D.HasChange("display_name") {
19701970
tmp := displayName.(string)
19711971
request.DisplayName = &tmp
19721972
}
@@ -2111,7 +2111,7 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) Update() error {
21112111
request.PeerDbId = &tmp
21122112
}
21132113

2114-
if privateEndpointIp, ok := s.D.GetOkExists("private_endpoint_ip"); ok {
2114+
if privateEndpointIp, ok := s.D.GetOkExists("private_endpoint_ip"); ok && s.D.HasChange("private_endpoint_ip") {
21152115
tmp := privateEndpointIp.(string)
21162116
request.PrivateEndpointIp = &tmp
21172117
}

0 commit comments

Comments
 (0)