I have JSON as follows
"redis_parameters": {
"redis0": {
"cluster_mode": {
"num_node_groups": 2,
"replicas_per_node_group": 1
},
"count": 0,
"node_type": "cache.t3.small",
"port": 6379
}
}
With defination as:
variable "redis_parameters" {
type = map(object({
count = number
node_type = string
port = number
cluster_mode = object({
replicas_per_node_group = number
num_node_groups = number
})
}))
}
I want to store the value into Terraform cloud workspace thru the TFE
as
resource "tfe_variable" "redis" {
key = "redis_parameters"
value =var.redis_parameters -- what should go here?
category = "terraform"
hcl = true
workspace_id = tfe_workspace.qa5.id
}
How do convert HCL to string