mengesb / tf_chef_server

Chef server module for Terraform
Apache License 2.0
13 stars 20 forks source link

Unable to run due to Error parsing attributes_json #64

Open markcallen opened 7 years ago

markcallen commented 7 years ago

I've cloned the repo and ran:

terraform plan

get the following error message:

There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Errors:

 * null_resource.chef_chef-server: Error parsing attributes_json: invalid character 'D' after top-level value

terraform --version Terraform v0.8.2 on OSX 10.11.6

Saw your issue logged at terraform https://github.com/hashicorp/terraform/issues/10788

Solve this by downloading and using 0.7.13

mengesb commented 7 years ago

You're correct @markcallen ; unfortunately there's no current resolution. For whatever reason it isn't properly identifying the calculated (or rendered) value of the data source. From what we can see, 8.0.0-beta1 is the latest version that doesn't have this issue. However these plans were written circa 0.7.x so as indicated, 0.7.13 will work fine. Waiting on a resolution or further debugging; my attempts to debug why this occurs hasn't been successful.

mengesb commented 7 years ago

Presently my work-around for this is to write out the attributes.json/dna.json file ahead of time and then source it for the chef-client run. Since sourcing is at the time of execution, all that it has to be is valid json to start. I'll be updating these changes and releasing a new version.