-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.43 KB
/
deploy-infra.yml
File metadata and controls
59 lines (47 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# name: Terraform Plan & Apply
# on:
# push:
# branches:
# - main
# env:
# AWS_REGION: eu-west-2
# jobs:
# terraform:
# runs-on: ubuntu-latest
# permissions:
# id-token: write
# contents: read
# defaults:
# run:
# working-directory: ./infra
# steps:
# - name: Checkout repo
# uses: actions/checkout@v4
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
# aws-region: eu-west-2
# - name: Setup Terraform
# uses: hashicorp/setup-terraform@v3.1.2
# with:
# terraform_version: 1.11.1
# - name: Checkov
# uses: bridgecrewio/checkov-action@master
# with:
# framework: terraform
# soft_fail: true
# output_format: cli,sarif
# output_file_path: checkov-results-terraform.sarif
# - name: Upload Checkov scan results to GitHub Security tab
# uses: github/codeql-action/upload-sarif@v3
# if: success() || failure()
# with:
# sarif_file: checkov-results-terraform.sarif
# wait-for-processing: true
# - name: Terraform Init
# run: terraform init
# - name: Terraform Plan
# run: terraform plan -out=tfplan
# - name: Terraform Apply
# run: terraform apply -auto-approve tfplan