Trying to scale down a cluster from a 4vCPU node to 2vCPU node but encountered an inconsistent apply error.
Terraform plan
# module.crdb_foo.cockroach_cluster.cluster will be updated in-place
~ resource "cockroach_cluster" "cluster" {
~ dedicated = {
~ disk_iops = 1500 -> (known after apply)
~ machine_type = "m6i.xlarge" -> (known after apply)
~ memory_gib = 16 -> (known after apply)
~ num_virtual_cpus = 4 -> 2
# (2 unchanged attributes hidden)
}
id = "<REDACTED>"
name = "foo-cluster"
~ operation_status = "UNSPECIFIED" -> (known after apply)
~ regions = [
~ {
name = "<REDACTED>"
~ sql_dns = "<REDACTED>" -> (known after apply)
~ ui_dns = "<REDACTED>" -> (known after apply)
# (2 unchanged attributes hidden)
},
]
~ state = "CREATED" -> (known after apply)
~ upgrade_status = "FINALIZED" -> (known after apply)
# (5 unchanged attributes hidden)
}
Error
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.crdb_foo.cockroach_cluster.cluster, provider "provider[\"registry.terraform.io/cockroachdb/cockroach\"]" produced an unexpected new value: .dedicated.num_virtual_cpus: was cty.NumberIntVal(2), but now cty.NumberIntVal(4).
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Versions
▶ terraform version
Terraform v1.3.7
on darwin_amd64
+ provider registry.terraform.io/cockroachdb/cockroach v0.4.7
Had to manually apply the changes via the CockroachDB console.
Trying to scale down a cluster from a 4vCPU node to 2vCPU node but encountered an inconsistent apply error.
Terraform plan
Error
Versions
Had to manually apply the changes via the CockroachDB console.