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

feat: adicionar pipeline #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/terraform-fmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: terraform-fmt
on:
pull_request:

permissions:
id-token: write
contents: read

jobs:
terraform-fmt:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.5.5"

- name: Terraform Format
run: terraform fmt -check -recursive -diff

26 changes: 26 additions & 0 deletions .github/workflows/tflint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: tflint
on:
pull_request:

permissions:
id-token: write
contents: read

jobs:
tflint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
name: Checkout source code

- uses: terraform-linters/setup-tflint@v4
name: Setup TFLint
with:
tflint_version: v0.44.1

- name: tflint init
run: tflint --init

- name: Run TFLint
run: tflint --recursive --config "$(pwd)/.tflint.hcl"
40 changes: 40 additions & 0 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: tfsec

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '32 14 * * 6'

permissions:
actions: read
contents: read
security-events: write

jobs:
tfsec:
name: Run tfsec sarif report
runs-on: ubuntu-latest


steps:
- name: Clone repo
uses: actions/checkout@v4

- name: Run tfsec
uses: aquasecurity/tfsec-sarif-action@21ded20e8ca120cd9d3d6ab04ef746477542a608
with:
sarif_file: tfsec.sarif

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: tfsec.sarif
5 changes: 5 additions & 0 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugin "aws" {
enabled = true
version = "0.33.0"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}
2 changes: 1 addition & 1 deletion backend.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform {
backend "s3" {}
backend "s3" {}
}
Loading