-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
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
Back-end config file in json throws an error #233
Comments
Thanks @rsealsovtech, I didn't realise that backend config files could be in json format. Can you share what such a file looks like? |
Going by the docs, Terraform supports JSON syntax with For our "backend_config_file" example, that can look like: # backend.tfbackend
bucket = "terraform-aws-rdhar"
dynamodb_table = "terraform-aws-rdhar"
key = "terraform.tfstate"
region = "us-east-1"
# backend.tfbackend.json
{
"bucket": "terraform-aws-rdhar",
"dynamodb_table": "terraform-aws-rdhar",
"key": "terraform.tfstate",
"region": "us-east-1"
} |
I thought this was my problem, but actually my solution was to just not specify the backend config file. That works in the case of .tf.json files, where a backend file would start with
|
Problem description
Previously I was using a json formatted back-end file. On Friday suddenly
terraform plan
started throwing errors about not expecting a Left brace. I updated the name of the file to exclude.json
and changed the syntax to HCL and it worked.I did test a
plan
andapply
locally with the samejson
files and received no syntax errors.Terraform version
1.3.6
Backend
s3
Workflow YAML
Workflow log
The text was updated successfully, but these errors were encountered: