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 GITHUB_TOKEN environment variable at tflint runtime #313

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

semnil
Copy link
Contributor

@semnil semnil commented Dec 20, 2022

I would like to add an environment variable for tflint --init runtime as the following error is occurring frequently.

Run suzuki-shunsuke/[email protected]
Running tflint --init
/home/runner/.local/share/aquaproj-aqua/bin/tflint --init
time="2022-12-20T03:45:22Z" level=info msg="download and unarchive the package" aqua_version=1.25.0 env=linux/amd64 exe_name=tflint exe_path=/home/runner/.local/share/aquaproj-aqua/pkgs/github_release/github.com/terraform-linters/tflint/v0.43.0/tflint_linux_amd64.zip/tflint package=terraform-linters/tflint package_name=terraform-linters/tflint package_version=v0.43.0 program=aqua registry=standard
Installing `aws` plugin...
Failed to install a plugin; Failed to fetch GitHub releases: GET https://api.github.com/repos/terraform-linters/tflint-ruleset-aws/releases/tags/v0.21.1: 403 API rate limit exceeded for **.***.**.***. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 20m11s]

Supported Information

This limitation can be a problem if you need to run --init frequently, such as in CI environments. If you want to increase the rate limit, you can send an authenticated request by setting an OAuth2 access token in the GITHUB_TOKEN environment variable.
https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting

@suzuki-shunsuke
Copy link
Owner

Thank you for your contribution!
It looks good.

@suzuki-shunsuke suzuki-shunsuke added this to the v0.1.5 milestone Dec 20, 2022
@suzuki-shunsuke suzuki-shunsuke merged commit 8537c87 into suzuki-shunsuke:main Dec 20, 2022
suzuki-shunsuke added a commit to suzuki-shunsuke/tfaction that referenced this pull request Dec 20, 2022
@suzuki-shunsuke
Copy link
Owner

Released. https://github.com/suzuki-shunsuke/github-action-tflint/releases/tag/v0.1.5

@semnil semnil deleted the semnil/add-env branch December 21, 2022 08:22
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

Successfully merging this pull request may close these issues.

2 participants