We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing error: tfvars to json:
terraform.tfvars:
ping_sg_cidr = { 1 = { cidr_blocks = [ "0.0.0.0/0" ] from_port = 8 to_port = -1 description = "Allow ping connections" protocol = "icmp" self = false } }
Current output:
{ "ping_sg_cidr": { "1": { "cidr_blocks": [ "0.0.0.0/0" ], "from_port": 8, "to_port": "${-1}", "description": "Allow ping connections", "protocol": "icmp", "self": false } } }
Expected output:
{ "ping_sg_cidr": { "1": { "cidr_blocks": [ "0.0.0.0/0" ], "from_port": 8, "to_port": -1, "description": "Allow ping connections", "protocol": "icmp", "self": false } } }
Python code:
import hcl2, json with open('terraform.tfvars') as f: print(json.dumps(hcl2.load(f), indent=2))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Parsing error: tfvars to json:
terraform.tfvars:
Current output:
Expected output:
Python code:
The text was updated successfully, but these errors were encountered: