-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(iam): Fix IAM permissions * ci: Satisfy pre-commit * ci: Satisfy pre-commit * ci: Satisfy pre-commit
- Loading branch information
Showing
20 changed files
with
168 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
name: pre-commit | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
@@ -8,36 +11,42 @@ on: | |
- master | ||
|
||
env: | ||
PYTHON_VERSION: "3.10" | ||
TERRAFORM_DOCS_VERSION: "v0.16.0" | ||
TFLINT_VERSION: "v0.36.2" | ||
TFLINT_VERSION: "v0.48.0" | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
|
||
- name: Install additional pre-commit hooks | ||
shell: bash | ||
run: | | ||
echo "########### Install Checkov ####################" | ||
pip install checkov | ||
echo "########### Install Terraform-docs #############" | ||
wget https://github.com/terraform-docs/terraform-docs/releases/download/${{ env.TERRAFORM_DOCS_VERSION }}/terraform-docs-${{ env.TERRAFORM_DOCS_VERSION }}-linux-amd64.tar.gz | ||
tar xvzf terraform-docs-${{ env.TERRAFORM_DOCS_VERSION }}-linux-amd64.tar.gz | ||
mkdir -p ~/terraform-docs/bin/ | ||
install terraform-docs ~/terraform-docs/bin/ | ||
echo '~/terraform-docs/bin/' >> $GITHUB_PATH | ||
echo "########### Install Terraform-linters ##########" | ||
wget https://github.com/terraform-linters/tflint/releases/download/${{ env.TFLINT_VERSION }}/tflint_linux_amd64.zip | ||
unzip tflint_linux_amd64.zip | ||
mkdir -p ~/tflint/bin/ | ||
echo '~/tflint/bin/' >> $GITHUB_PATH | ||
install tflint ~/tflint/bin/ | ||
~/tflint/bin/tflint --init | ||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: pip | ||
|
||
- name: Install Python dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Install terraform-docs | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
repo: terraform-docs/terraform-docs | ||
tag: ${{ env.TERRAFORM_DOCS_VERSION }} | ||
cache: enable | ||
|
||
- name: TFLint cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.tflint.d/plugins | ||
key: ${{ runner.os }}-tflint-${{ hashFiles('.tflint.hcl') }} | ||
|
||
- name: Install TFLint | ||
uses: terraform-linters/setup-tflint@v2 | ||
with: | ||
tflint_version: ${{ env.TFLINT_VERSION }} | ||
|
||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,5 +109,5 @@ | |
} | ||
], | ||
"results": {}, | ||
"generated_at": "2022-07-28T10:50:47Z" | ||
"generated_at": "2022-10-10T14:52:48Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
formatter: markdown table | ||
|
||
output: | ||
mode: inject | ||
template: |- | ||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
{{ .Content }} | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
sections: | ||
hide: | ||
- providers | ||
|
||
sort: | ||
by: required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugin "terraform" { | ||
enabled = true | ||
version = "0.4.0" | ||
source = "github.com/terraform-linters/tflint-ruleset-terraform" | ||
preset = "recommended" | ||
} | ||
|
||
plugin "aws" { | ||
enabled = true | ||
version = "0.26.0" | ||
source = "github.com/terraform-linters/tflint-ruleset-aws" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.