Skip to content

Commit f1ff487

Browse files
Yue Dengganbaras
authored andcommitted
Bug Fix - ExaDB-XS VM Cluster Getting Replaced due to HostName Case Mismatch
1 parent 4d8ba67 commit f1ff487

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

examples/database/db_systems/db_exadbxs/exadb_vm_cluster_database.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
resource "oci_database_db_home" "test_db_home" {
55
display_name = "ExampleExaDbVmDbHome"
66
db_system_id = oci_database_exadb_vm_cluster.test_exadb_vm_cluster.id
7-
db_version = "23.4.0.24.05"
7+
db_version = data.oci_database_gi_version_minor_versions.test_gi_minor_versions.gi_minor_versions[0].version
88
}
99

1010
resource "oci_database_database" "test_db1" {

internal/integrationtest/database_exadb_vm_cluster_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var (
5353
"display_name": acctest.Representation{RepType: acctest.Required, Create: `TFExadbVmCluster`, Update: `TFExadbVmClusterUpdatedName`},
5454
"exascale_db_storage_vault_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_database_exascale_db_storage_vault.test_exascale_db_storage_vault.id}`},
5555
"grid_image_id": acctest.Representation{RepType: acctest.Required, Create: `${var.grid_image_id}`},
56-
"hostname": acctest.Representation{RepType: acctest.Required, Create: `apollo`},
56+
"hostname": acctest.Representation{RepType: acctest.Required, Create: `APOLLO`}, // hostname is in UPPERCASE in config and in lowercase in response (hence state) but there will be no diff since hostname is considered case-insensitive
5757
"shape": acctest.Representation{RepType: acctest.Required, Create: `EXADBXS`},
5858
"ssh_public_keys": acctest.Representation{RepType: acctest.Required, Create: []string{`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOuBJgh6lTmQvQJ4BA3RCJdSmxRtmiXAQEEIP68/G4gF3XuZdKEYTFeputacmRq9yO5ZnNXgO9akdUgePpf8+CfFtveQxmN5xo3HVCDKxu/70lbMgeu7+wJzrMOlzj+a4zNq2j0Ww2VWMsisJ6eV3bJTnO/9VLGCOC8M9noaOlcKcLgIYy4aDM724MxFX2lgn7o6rVADHRxkvLEXPVqYT4syvYw+8OVSnNgE4MJLxaw8/2K0qp19YlQyiriIXfQpci3ThxwLjymYRPj+kjU1xIxv6qbFQzHR7ds0pSWp1U06cIoKPfCazU9hGWW8yIe/vzfTbWrt2DK6pLwBn/G0x3 sample`}},
5959
"security_attributes": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"oracle-zpr.maxegresscount.value": "42", "oracle-zpr.maxegresscount.mode": "enforce"}, Update: map[string]string{"oracle-zpr.maxegresscount.value": "updatedValue", "oracle-zpr.maxegresscount.mode": "enforce"}},

internal/service/database/database_exadb_vm_cluster_resource.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ func DatabaseExadbVmClusterResource() *schema.Resource {
6868
Required: true,
6969
},
7070
"hostname": {
71-
Type: schema.TypeString,
72-
Required: true,
73-
ForceNew: true,
71+
Type: schema.TypeString,
72+
Required: true,
73+
ForceNew: true,
74+
DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff,
7475
},
7576
"shape": {
7677
Type: schema.TypeString,

0 commit comments

Comments
 (0)