Skip to content

Commit 515312d

Browse files
authored
Fix provider produced an unexpected new value: .idle_timeout_minutes: was cty.NumberIntVal(5), but now null (#324)
1 parent bb88f24 commit 515312d

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

docs/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
# generated by https://github.com/hashicorp/terraform-plugin-docs
33
page_title: "clickhouse Provider"
4-
subcategory: ""
54
description: |-
65
This is the official provider for ClickHouse Cloud.
76
With this provider you can deploy a ClickHouse instance on AWS, Google Cloud or Azure Cloud.

docs/resources/service.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ Read-Only:
180180

181181
Import is supported using the following syntax:
182182

183+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
184+
183185
```shell
184186
# Services can be imported by specifying the UUID.
185187
terraform import clickhouse_service.example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

docs/resources/service_private_endpoints_attachment.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ resource "clickhouse_service_private_endpoints_attachment" "attachment" {
5151

5252
Import is supported using the following syntax:
5353

54+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
55+
5456
```shell
5557
# Endpoint Attachments can be imported by specifying the clickhouse service UUID
5658
terraform import clickhouse_service_private_endpoints_attachment.example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

docs/resources/service_transparent_data_encryption_key_association.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ resource "clickhouse_service_transparent_data_encryption_key_association" "servi
4141

4242
Import is supported using the following syntax:
4343

44+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
45+
4446
```shell
4547
# Endpoint Attachments can be imported by specifying the clickhouse service UUID
4648
terraform import clickhouse_service_transparent_data_encryption_key_association.example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

pkg/resource/service.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,14 @@ func (r *ServiceResource) ModifyPlan(ctx context.Context, req resource.ModifyPla
629629
resp.Plan.Set(ctx, plan)
630630
}
631631

632-
if config.IdleTimeoutMinutes.IsNull() && state.IdleTimeoutMinutes.IsNull() {
632+
if config.IdleTimeoutMinutes.IsNull() {
633633
plan.IdleTimeoutMinutes = types.Int64Null()
634634
resp.Plan.Set(ctx, plan)
635635
}
636+
637+
if !state.IdleScaling.ValueBool() && plan.IdleScaling.ValueBool() {
638+
plan.IdleTimeoutMinutes = config.IdleTimeoutMinutes
639+
}
636640
}
637641

638642
if plan.Tier.ValueString() == api.TierDevelopment {

0 commit comments

Comments
 (0)