Closed s-maj closed 7 years ago
Hey @s-maj, I can't reproduce this with Terraform 0.10.6.
The example output you give has a number of hyphens at the start (-------...
etc). Where are those coming from?
It's possible this was fixed in landscape 0.1.14. Can you confirm it's still a problem?
I was experiencing a similar issue to this with TF 0.10.7
terraform plan | bundle exec landscape
error: Expected [ ] at line 1, column 2 (byte 2) after -. Use --trace to view backtrace
make: *** [plan] Error 1
upgrading from landscape 0.1.6 > 0.1.14 seems to have fixed it for me
All fine, cheers!
I'm seeing this in Terraform 0.10.5 (at least) 72 dashes and two new lines to the top of the plan output.
https://github.com/hashicorp/terraform/blob/master/backend/local/backend_plan.go#L100 https://github.com/hashicorp/terraform/blob/master/backend/local/backend_plan.go#L152
Also related to environment variable TF_IN_AUTOMATION.
In terraform_landscape printer.rb
, the dashes get caught by:
elsif (match = scrubbed_output.match(/^\s*(~|\+|\-)/))
scrubbed_output = scrubbed_output[match.begin(0)..-1]
So this never reaches the regexp that checks for "No changes".
My solution is to scrub the output of the 72 dashes and 2 \n's then parse as normal.
Also move the "no change" code above the parsing section so we don't match a parse before no changes.
Hi there,
If there is no changes to apply landscape fails.
Terraform (v0.10.6):
Landscape (0.1.13):
Trace: