Skip to content

Commit 86cecea

Browse files
alex-muiMaxrovr
authored andcommitted
Bug Fix - Exacs dbHome, pdb, cvm bug fixes
1 parent d493376 commit 86cecea

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

examples/database/db_systems/db_exacs/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ variable "cloud_vm_cluster_cpu_core_count" {
4747
}
4848

4949
variable "cloud_vm_cluster_ocpu_count" {
50-
default = "8.0"
50+
default = "16.0"
5151
}
5252

5353
variable "cloud_vm_cluster_gi_version" {

internal/service/database/database_backup_resource.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ func (s *DatabaseBackupResourceCrud) SetData() error {
374374

375375
if s.Res.EncryptionKeyLocationDetails != nil {
376376
s.D.Set("encryption_key_location_details", []interface{}{EncryptionKeyLocationDetailsToMap(&s.Res.EncryptionKeyLocationDetails, "")})
377+
} else {
378+
s.D.Set("encryption_key_location_details", nil)
377379
}
378380

379381
if s.Res.KeyStoreId != nil {

internal/service/database/database_cloud_exadata_infrastructure_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ func (s *DatabaseCloudExadataInfrastructureResourceCrud) Update() error {
676676
if s.Res.ActivatedStorageCount != nil {
677677
userStorageCount := storageCount.(int)
678678
activatedStorageCount := *s.Res.ActivatedStorageCount
679-
if utils.IsMultiVm(*s.Res.Shape, s.Res.MaxDataStorageInTBs) && activatedStorageCount < userStorageCount {
679+
if utils.IsMultiVm(s.Res.ActivatedStorageCount) && activatedStorageCount < userStorageCount {
680680
err := s.addStorageMVM()
681681
if err != nil {
682682
return err

internal/service/database/database_cloud_vm_cluster_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ func (s *DatabaseCloudVmClusterResourceCrud) Update() error {
930930
}
931931
}
932932
}
933-
if !utils.IsMultiVm(*s.Infra.Shape, s.Infra.MaxDataStorageInTBs) {
933+
if !utils.IsMultiVm(s.Infra.ActivatedStorageCount) {
934934
if nodeCount, ok := s.D.GetOkExists("node_count"); ok {
935935
if s.Infra.ComputeCount != nil && *s.Infra.ComputeCount != nodeCount {
936936
request.ComputeNodes = []string{"ALL"}

internal/service/database/database_pluggable_database_resource.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ func DatabasePluggableDatabaseResource() *schema.Resource {
3737
ForceNew: true,
3838
},
3939
"pdb_name": {
40-
Type: schema.TypeString,
41-
Required: true,
42-
ForceNew: true,
40+
Type: schema.TypeString,
41+
Required: true,
42+
ForceNew: true,
43+
DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff,
4344
},
4445

4546
// Optional

internal/tfresource/crud_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ func DbVersionDiffSuppress(key string, old string, new string, d *schema.Resourc
529529
if old == "" || new == "" {
530530
return false
531531
}
532-
if new == "18.0.0.0" || new == "19.0.0.0" {
532+
if new == "18.0.0.0" || new == "19.0.0.0" || new == "23.0.0.0" {
533533
oldVersion := strings.Split(old, ".")
534534
newVersion := strings.Split(new, ".")
535535
oldVersionNumber, err := strconv.Atoi(oldVersion[0])

internal/utils/exacs_helpers.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package utils
22

3-
import "strings"
4-
5-
func IsMultiVm(shape string, maxDataStorageInTBs *float64) bool {
6-
return (strings.EqualFold(shape, "Exadata.X8M") || strings.EqualFold(shape, "Exadata.X9M")) && maxDataStorageInTBs != nil
3+
func IsMultiVm(activatedStorageCount *int) bool {
4+
return activatedStorageCount != nil && *activatedStorageCount > 0
75
}

0 commit comments

Comments
 (0)