Skip to content

Commit

Permalink
docs: docs for plugin_release_cache, plugin_reduce_gh_api
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedam committed Nov 9, 2024
1 parent a2d7412 commit b851fef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/user-guide/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ tflint {
config {
format = "compact"
plugin_dir = "~/.tflint.d/plugins"
plugin_release_cache = ".plugin-release-cache.json"
plugin_reduce_gh_api = true
call_module_type = "local"
force = false
Expand Down Expand Up @@ -72,6 +74,14 @@ In recursive mode (`--recursive`), this field will be ignored in configuration f

Set the plugin directory. The default is `~/.tflint.d/plugins` (or `./.tflint.d/plugins`). See also [Configuring Plugins](plugins.md#advanced-usage)

### `plugin_release_cache`

Set the file to cache release metadata from GitHub API. The default is not set, and the cache feature is not enabled. This is useful for avoiding [GitHub rate limit issue](plugins.md#avoiding-rate-limiting).

### `plugin_reduce_gh_api`

Download the plugin not with GitHub API, but with the URL provided by release metadata. The default is not enabled (use GitHub API). This is useful for avoiding [GitHub rate limit issue](plugins.md#avoiding-rate-limiting).

### `call_module_type`

CLI flag: `--call-module-type`
Expand Down
2 changes: 2 additions & 0 deletions docs/user-guide/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ plugin "bar" {
}
```

You can reduce the usage of GitHub API with [`plugin_release_cache`](config.md#plugin_release_cache) and [`plugin_reduce_gh_api`](config.md#plugin_reduce_gh_api) in the configuration.

## Keeping plugins up to date

We recommend using automatic updates to keep your plugin version up-to-date. [Renovate supports TFLint plugins](https://docs.renovatebot.com/modules/manager/tflint-plugin/) to easily set up automated update workflows.
Expand Down

0 comments on commit b851fef

Please sign in to comment.