-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (36 loc) · 1.21 KB
/
terraform-bridgecrew.yml
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
name: "Terraform Plan Bridgecrew"
# Trigger when a pull request is received
on:
push:
branches:
- main
pull_request:
jobs:
terraform-plan-prisma-bridgecrew:
name: "Terraform + BridgeCrew/Prisma Scan"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
# Checkout the code
# Marketplace: https://github.com/marketplace/actions/checkout
- name: "Setup - Checkout"
uses: actions/[email protected]
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: "Run - Terraform Init"
run: terraform init -input=false
# The id value is used for reference in the comment step via "steps.plan.outputs.stdout"
# Note: Color is disabled to prevent messy characters from appearing in the pull request comment
- name: "Run - Terraform Plan"
id: plan
run: terraform plan -input=false -no-color
- name: Run Bridgecrew
id: Bridgecrew
uses: bridgecrewio/bridgecrew-action@master
with:
api-key: ${{ secrets.BRIDGECREW_API_KEY }}
directory: ./