Skip to content

Commit

Permalink
fix(Cloud Databases): send host flavor with scaling requests (IBM-Clo…
Browse files Browse the repository at this point in the history
…ud#5874)

Co-authored-by: Alex Hemard <[email protected]>
  • Loading branch information
alexhemard and Alex Hemard authored Dec 13, 2024
1 parent 305ad4b commit 555c18d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ibm/service/database/resource_ibm_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ func resourceIBMDatabaseInstanceCreate(context context.Context, d *schema.Resour
if g.CPU != nil && g.CPU.Allocation*nodeCount != currentGroup.CPU.Allocation {
groupScaling.CPU = &clouddatabasesv5.GroupScalingCPU{AllocationCount: core.Int64Ptr(int64(g.CPU.Allocation * nodeCount))}
}
if g.HostFlavor != nil && g.HostFlavor.ID != currentGroup.HostFlavor.ID {
if g.HostFlavor != nil {
groupScaling.HostFlavor = &clouddatabasesv5.GroupScalingHostFlavor{ID: core.StringPtr(g.HostFlavor.ID)}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestAccIBMDatabaseInstancePostgresGroup(t *testing.T) {
resource.TestCheckResourceAttr(name, "plan", "standard"),
resource.TestCheckResourceAttr(name, "location", acc.Region()),
resource.TestCheckResourceAttr(name, "groups.0.count", "3"),
resource.TestCheckResourceAttr(name, "groups.0.memory.0.allocation_mb", "8192"),
resource.TestCheckResourceAttr(name, "groups.0.memory.0.allocation_mb", "24576"),
resource.TestCheckResourceAttr(name, "groups.0.disk.0.allocation_mb", "21504"),
resource.TestCheckResourceAttr(name, "groups.0.cpu.0.allocation_count", "9"),
resource.TestCheckResourceAttr(name, "allowlist.#", "0"),
Expand Down

0 comments on commit 555c18d

Please sign in to comment.