Open manicole opened 1 week ago
For anyone interested, my current dirty workaround is to declare in my k3s Terraform plan instance_ips
as a string and use a local variable in my main.tf
:
locals {
tmp_instance_ips = split(",", var.instance_ips)
instance_ips = [for instance_ip in local.tmp_instance_ips: element(split("\"", instance_ip), 1)]
}
It allows me to get back in local.instance_ips
the list of IPs without brackets, quotes or spaces, exactly as written in my Secret ${previous}-output
.
The fix never completely worked as intended in my experience. What I personally did as a workaround was using JSON strings for any output/input that wasn’t a simple string output and then decode than into a local.
it’s a workaround, not a real fix, but it works consistently.
Thanks for sharing @ilithanos!
@chanwit Any clue on what fails here / how to? Thanks!
(Kind of reopening https://github.com/flux-iac/tofu-controller/issues/465, although supposingly fixed by https://github.com/flux-iac/tofu-controller/pull/504 @chanwit)
I am using a Terraform plan to spawn an Openstack instance, outputting:
I am using the output Secret as an input for my next Terraform plan (installing a k3s cluster):
and declare
instance_ips
as a list of strings:I get the following error message:
Not sure how I should handle that ... I am mistaking somewhere ? Thanks