Skip to content

Commit

Permalink
🔧 chore(pre-commit.yaml): remove unnecessary write permissions
Browse files Browse the repository at this point in the history
🔧 chore(pre-commit.yaml): change contents permission to read
🔧 chore(pre-commit.yaml): use github.token instead of env.GITHUB_TOKEN
🔧 chore(.pre-commit-config.yaml): uncomment terraform_validate hook
🐛 fix(examples/complete/outputs.tf): correct typo in sftp_dns variable name
The changes in pre-commit.yaml remove unnecessary write permissions and change the contents permission to read. The github.token is used instead of env.GITHUB_TOKEN. The terraform_validate hook is uncommented in .pre-commit-config.yaml. The fix in examples/complete/outputs.tf corrects a typo in the sftp_dns variable name.
  • Loading branch information
andresb39 committed Apr 21, 2023
1 parent 94d7c30 commit 40cd332
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ env:
TERRAFORM_VERSION: "1.0.11"

permissions:
contents: read
id-token: write
issues: write
contents: read
pull-requests: write

jobs:
Expand Down Expand Up @@ -59,4 +57,4 @@ jobs:
- name: tfsec
uses: aquasecurity/tfsec-pr-commenter-action@v1.3.1
with:
github_token: ${{ env.GITHUB_TOKEN }}
github_token: ${{ github.token }}
4 changes: 1 addition & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ repos:
args:
- --args=-diff
- --args=-write=false
# - id: terraform_validate
# args:
# - --args=-json
- id: terraform_validate
- id: terraform_docs
args:
- --hook-config=--path-to-file=./TFDOC.md # Valid UNIX path. I.e. ../TFDOC.md or docs/README.md etc.
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
output "dns" {
description = "SFTP DNS"
value = module.sftp.sft_dns
value = module.sftp.sftp_dns
}

output "endpoint" {
Expand Down

0 comments on commit 40cd332

Please sign in to comment.