terraform-linters / tflint

A Pluggable Terraform Linter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for Github auth token via environment variable

dgibbard-cisco opened this issue · comments

Introduction

Hoping I haven't missed this in the docs, but we're getting rate limited by Github, when running tflint --init which is trying to pull (for example) the AWS plugin.

Example Output:

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.30.0: 403 API rate limit exceeded for 146.112.163.42. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 43m44s]

Proposal

add support for GITHUB_API_TOKEN or similar to allow users to provide authentication tokens for github to reduce impact of anonymous rate limiting.

Support is supported in the go-github module: in the WithAuthToken method: https://github.com/google/go-github#authentication

References

N/A