ClickHouse / terraform-provider-clickhouse

Terraform Provider for ClickHouse Cloud
Apache License 2.0
23 stars 8 forks source link

Error: Provider produced inconsistent result after apply #173

Closed jkaflik closed 1 month ago

jkaflik commented 1 month ago

clickhouse_service without idle_scaling set causes this error after apply:

│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to clickhouse_service.service, provider "provider[\"registry.terraform.io/clickhouse/clickhouse\"]" produced an unexpected new value: .idle_scaling: was null, but now cty.False.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Works fine if idle_scaling is set explicit to false. Turns out it's missing some default value.

Provider version: 1.2.2

whites11 commented 1 month ago

Hey @jkaflik, thanks a lot for your report. You are indeed right. The idle_scaling field is optional and defaulted on the server side if missing. It must be declared as "Computed" for terraform to deal with this case. We just released version 1.2.3, hopefully addressing this bug.

Feel free to reopen this ticket or open a new one should you still have trouble.

Thanks again