Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AV-86105] initialized autoexpansion field with null value #226

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func TestAccClusterResourceAzure(t *testing.T) {
resource.TestCheckResourceAttr(resourceReference, "service_groups.0.node.compute.ram", "16"),
resource.TestCheckResourceAttr(resourceReference, "service_groups.0.node.disk.storage", "1024"),
resource.TestCheckResourceAttr(resourceReference, "service_groups.0.node.disk.type", "Ultra"),
resource.TestCheckResourceAttr(resourceReference, "service_groups.0.node.disk.iops", "2000"),
resource.TestCheckResourceAttr(resourceReference, "service_groups.0.node.disk.iops", "17000"),
resource.TestCheckResourceAttr(resourceReference, "service_groups.0.num_of_nodes", "3"),
resource.TestCheckResourceAttr(resourceReference, "service_groups.0.services.#", "3"),
resource.TestCheckResourceAttr(resourceReference, "service_groups.0.services.0", "data"),
Expand Down Expand Up @@ -573,7 +573,7 @@ func TestAccClusterResourceWithOptionalFieldAWSInvalidScenario(t *testing.T) {
{
PreConfig: testAccProjecCreationWaitTime(),
Config: testAccClusterResourceConfigWithAllFieldInvalidScenario(acctest.Cfg, resourceName, projectResourceName, projectResourceReference, cidr),
ExpectError: regexp.MustCompile("gp2, is not valid"),
ExpectError: regexp.MustCompile("'gp2', is not valid"),
},
},
})
Expand Down Expand Up @@ -1003,7 +1003,7 @@ resource "couchbase-capella_cluster" "%[2]s" {
disk = {
storage = 1024,
type = "Ultra"
iops = 2000
iops = 17000
}
}
num_of_nodes = 3
Expand Down
3 changes: 3 additions & 0 deletions internal/resources/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,9 @@ func initializePendingClusterWithPlanAndId(plan providerschema.Cluster, id strin
if serviceGroup.Node != nil && (serviceGroup.Node.Disk.IOPS.IsNull() || serviceGroup.Node.Disk.IOPS.IsUnknown()) {
serviceGroup.Node.Disk.IOPS = types.Int64Null()
}
if serviceGroup.Node != nil && (serviceGroup.Node.Disk.Autoexpansion.IsNull() || serviceGroup.Node.Disk.Autoexpansion.IsUnknown()) {
serviceGroup.Node.Disk.Autoexpansion = types.BoolNull()
}
}
return plan
}
Loading