Format objects for Terraform .tfvars file
samgabrail opened this issue · comments
Current Behavior
using a schema like this:
"my_tags": {
"type": "JSONSchema",
"description": "A map of tags to add to all resources.",
"schema": {"type": "object"},
"required": true
}
then exporting as a Terraform .tfvars file results in this:
prefix = "configu"
region = "us-east-1"
address_space = "10.0.0.0/16"
subnet_prefix = "10.0.10.0/24"
instance_type = "t2.micro"
my_aws_key = "mykey.pem"
my_tags = "{"Name": "configu-demo", "Environment": "Development"}"
Expected Behavior
However, Terraform doesn't like this and considers it invalid. would need to either do this:
my_tags = "{\"Name\": \"configu-demo\", \"Environment\": \"Development\"}"
or better yet, export it as a map (object) like this:
my_tags = {"Name": "configu-demo", "Environment": "Development"}
To Reproduce
No response
Context
No response
Great catch @samgabrail!
@rannn505 please provide your insight regarding the right way to go about fixing this issue.
Thanks @samgabrail well handle it in the next release :)
Great, thank you so much!
…On Mon, Feb 26, 2024, 6:50 AM Ran Cohen ***@***.***> wrote:
Thanks @samgabrail <https://github.com/samgabrail> well handle it in the
next release :)
—
Reply to this email directly, view it on GitHub
<#377 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAEZ7L74OKUHCLYOIDUUTDYVRZIFAVCNFSM6AAAAABDSB3HESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTHE3DEOBRGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
can you assign it to me please?