Comments (3)
Nice! Yep using terraform_wrapper: false
fixed it for me!! 👍 Thanks!
from regula-action.
Hi, @jwicks! I was able to reproduce this issue using the Terraform github action. The problem is that the Terraform github action wraps the Terraform binary with a script that does two things:
- It echoes out the command that it's running
- After running the command, it echoes out two Github Action workflow commands:
::set-output name=std-err
::set-output name=exit-code
So assuming you're doing something like this:
terraform show -json plan.tfplan > terraform.plan.json
Your JSON file ends up with a few extra lines. It's definitely not ideal, but two potential ways that you can work around this is to either use the Terraform binary directly or strip out those lines, like:
terraform show -json plan.tfplan | tail -n +2 | head -n 1 > terraform.plan.json
Why is regula attempting to parse my TF plan JSON file using YAML?
The YAML specification is actually a superset of JSON, so all valid JSON is also valid YAML. The YAML parser that we're using gives us some nice features beyond what's available in JSON libraries that we looked at and it lets us reuse code in a few places.
from regula-action.
If you're using the setup-terraform
action, there's an option to use the Terraform binary without the wrapper and it seems to fix the issue:
- uses: hashicorp/setup-terraform@v1
with:
terraform_wrapper: false
terraform_version: 1.0.5
If this resolves your issue, I'll go ahead and add this to the README.
from regula-action.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from regula-action.