Skip to content

Commit 555c18d

Browse files
alexhemardAlex Hemard
and
Alex Hemard
authored
fix(Cloud Databases): send host flavor with scaling requests (IBM-Cloud#5874)
Co-authored-by: Alex Hemard <[email protected]>
1 parent 305ad4b commit 555c18d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ibm/service/database/resource_ibm_database.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ func resourceIBMDatabaseInstanceCreate(context context.Context, d *schema.Resour
13391339
if g.CPU != nil && g.CPU.Allocation*nodeCount != currentGroup.CPU.Allocation {
13401340
groupScaling.CPU = &clouddatabasesv5.GroupScalingCPU{AllocationCount: core.Int64Ptr(int64(g.CPU.Allocation * nodeCount))}
13411341
}
1342-
if g.HostFlavor != nil && g.HostFlavor.ID != currentGroup.HostFlavor.ID {
1342+
if g.HostFlavor != nil {
13431343
groupScaling.HostFlavor = &clouddatabasesv5.GroupScalingHostFlavor{ID: core.StringPtr(g.HostFlavor.ID)}
13441344
}
13451345

ibm/service/database/resource_ibm_database_postgresql_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func TestAccIBMDatabaseInstancePostgresGroup(t *testing.T) {
142142
resource.TestCheckResourceAttr(name, "plan", "standard"),
143143
resource.TestCheckResourceAttr(name, "location", acc.Region()),
144144
resource.TestCheckResourceAttr(name, "groups.0.count", "3"),
145-
resource.TestCheckResourceAttr(name, "groups.0.memory.0.allocation_mb", "8192"),
145+
resource.TestCheckResourceAttr(name, "groups.0.memory.0.allocation_mb", "24576"),
146146
resource.TestCheckResourceAttr(name, "groups.0.disk.0.allocation_mb", "21504"),
147147
resource.TestCheckResourceAttr(name, "groups.0.cpu.0.allocation_count", "9"),
148148
resource.TestCheckResourceAttr(name, "allowlist.#", "0"),

0 commit comments

Comments
 (0)