Skip to content
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

Add args to github action #34

Open
JafoFett opened this issue Apr 26, 2021 · 7 comments
Open

Add args to github action #34

JafoFett opened this issue Apr 26, 2021 · 7 comments

Comments

@JafoFett
Copy link

I'm trying to add a tfvars file to the github action but can't seem to get it to work, any help would be appreciated. Here is what I have:

jobs:

tfsec:
name: tfsec
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Terraform security scan
uses: triat/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --tfvars-file dev.tfvars

Which results in:
Warning: A tfvars file was found but not automatically used.
Did you mean to specify the --tf-vars flag?

And, I have replaced --tfvars-file with --tf-vars but still didn't work.

@SandyChoWealthsimple
Copy link

Notice that tfsec and Terraform Security Scan (for Github actions) accept different args.

@kwatson-rms
Copy link

Where are we with the GitHub action, arguments, documentation and CodeScan integration? We would love to use this but I can't get it working.

Thanks!

@JafoFett
Copy link
Author

This is working for us, but when I do use it with Terraform Workspaces (cli not cloud) I need to specify the .tfvars file...the documentation mentions no arguments, I had to run it a few times to actually see I could use 'args' with the 'with' statement.

@triat
Copy link
Owner

triat commented Apr 29, 2021

Hello @JafoFett,

As @SandyChoWealthsimple has explained, this is a different tool. Not all the commands are the same. I can definitively see your need and we could add this parameter to the list of Terraform security scan.

As I'm moving flat right now, I won't be able to do it this week, but I'll try to do it this weekend or next week.

@triat
Copy link
Owner

triat commented Apr 29, 2021

@kwatson-rms Could you open a new issue? I have the feeling that you have a different problem with the action and I'd be happy to help you set it up. Thanks

@figadore
Copy link
Contributor

Hoping to learn the answer here as well. How do you get around the A tfvars file was found but not automatically used. warning?

@fedeam
Copy link

fedeam commented Jul 16, 2024

any ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants