Altinity / terraform-provider-altinitycloud

Terraform provider for Altinity.Cloud ☁️
https://registry.terraform.io/providers/altinity/altinitycloud/latest/docs
Apache License 2.0
7 stars 0 forks source link

add invalid attribute value type handling for node group name and type #83

Closed Elmo33 closed 2 weeks ago

Elmo33 commented 1 month ago

disallow any values for these two attributes that are not a string.

Elmo33 commented 1 month ago

this error is shown when name is string and type is list

╷ │ Error: Incorrect attribute value type │ │ on main.tf line 35, in resource "altinitycloud_env_aws" "this": │ 35: node_groups = [{"name": ["t4.large"], "node_type": ["t4.large"], "capacity_per_zone": 1, "reservations": ["CLICKHOUSE", "SYSTEM", "ZOOKEEPER"]}] │ │ Inappropriate value for attribute "node_groups": element 0: attribute "name": string required. ╵

but doesnt show in any other cases (that ive checked: int, string, int int, list list)

ianaya89 commented 2 weeks ago

This is expected because is how Terraform's HCL tends to coerce values to match expected types whenever is possible: int and bool can ve casted to strings but list cannot.

Docs