You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
metadata:
name: vars
apiVersion: v1
data:
triangle: |
triangle={
s_one=1,
s_two=2.5,
s_three=2.5,
description="this is a triangle"
}
This is the vars file generated
{"triangle":"triangle={\ns_one=1,\ns_two=2.5,\ns_three=2.5,\ndescription=\"this is a triangle\"\n}\n"}
This is the error
You can apply this plan to save these new output values to the Terraform state, without changing any real infrastructure.
╷
│ Error: Invalid value for input variable
│
│ on generated.auto.tfvars.json line 1:
│ 1: {"triangle":"triangl
e={\ns_one=1,\ns_two=2.5,\ns_three=2.5,\ndescription=\"this is a triangle\"\n}\n"}
Maybe I'm doing something wrong but I gues we should sanitize this json file, if i'm not wrong the value used in configmap is in the properly format?
Do you think this is a bug and maybe tf-controller should manage this value ?
I also tried maps, list with complex structures and I have the same issue, the generated.auto.tfvars.json file is not in the properly format
Let me share some more troubleshooting, If I launch break-the-glass and I use this vars file testing.tfvars
s_one=1,
s_two=2.5,
s_three=2.5,
description="this is a triangle"
}
As a Terraform Controller user,
I'd like to have support for complex Terraform types such as objects in ConfigMaps and Secrets,
so that I can use these types in my Terraform Jobs without requiring workarounds.
Acceptance Criteria
Properly read and parse Terraform complex types from ConfigMaps and Secrets
Generate valid generated.auto.tfvars.json when using complex types like objects
Ensure that the Terraform apply process works correctly when using complex types from ConfigMaps and Secrets
The text was updated successfully, but these errors were encountered:
Hello,
My team are trying to migrate to tf-controller Terraform Jobs using Terrafom Complex types such as objectS
Object - https://developer.hashicorp.com/terraform/language/expressions/type-constraints#structural-types
I'm not sure but I think there are some bug reading the values from ConfigMap or Secrets.
Let me share a little example....
Terraform YAML
ConfigMap
This is the vars file generated
This is the error
Maybe I'm doing something wrong but I gues we should sanitize this json file, if i'm not wrong the value used in configmap is in the properly format?
Do you know some workaround in order to migrate Terraform jobs to tf-controller?
I'm thinking in apply this workaround commented by akselleirv
Do you think this is a bug and maybe tf-controller should manage this value ?
I also tried maps, list with complex structures and I have the same issue, the generated.auto.tfvars.json file is not in the properly format
Let me share some more troubleshooting, If I launch break-the-glass and I use this vars file testing.tfvars
It works fine if i remove from generated.auto.tfvars.json and I run this command
terraform apply -auto-approve -var-file="testing.tfvars"
. I read this example from https://www.educative.io/answers/what-are-complex-types-objects-in-terraform========
User Story
As a Terraform Controller user,
I'd like to have support for complex Terraform types such as objects in ConfigMaps and Secrets,
so that I can use these types in my Terraform Jobs without requiring workarounds.
Acceptance Criteria
generated.auto.tfvars.json
when using complex types like objectsThe text was updated successfully, but these errors were encountered: