-
Notifications
You must be signed in to change notification settings - Fork 11
74 lines (68 loc) · 1.97 KB
/
main.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
on: [push]
jobs:
regula_tf_job:
runs-on: ubuntu-latest
name: Regula Terraform
steps:
- uses: actions/checkout@master
- uses: fugue/[email protected]
with:
input_path: infra_tf
rego_paths: example_custom_rule
regula_cfn_job:
runs-on: ubuntu-latest
name: Regula CloudFormation
steps:
- uses: actions/checkout@master
- uses: fugue/[email protected]
with:
input_path: infra_cfn/cloudformation.yaml
regula_valid_cfn_job:
runs-on: ubuntu-latest
name: Regula Valid CloudFormation
steps:
- uses: actions/checkout@master
- uses: fugue/[email protected]
with:
input_path: infra_valid_cfn/cloudformation.yaml
regula_multi_cfn_job:
runs-on: ubuntu-latest
name: Regula multiple CloudFormation templates
steps:
- uses: actions/checkout@master
- uses: fugue/[email protected]
with:
input_path: '*/cloudformation.yaml'
regula_input_list_job:
runs-on: ubuntu-latest
name: Regula on CloudFormation and Terraform
steps:
- uses: actions/checkout@master
- uses: fugue/[email protected]
with:
input_path: |
infra_cfn/cloudformation.yaml
infra_valid_cfn/cloudformation.yaml
infra_tf
regula_tf_plan_job:
runs-on: ubuntu-latest
name: Regula on a Terraform plan JSON
steps:
- uses: actions/checkout@master
- uses: hashicorp/setup-terraform@v1
with:
terraform_wrapper: false
terraform_version: 1.0.8
- run: |
cd infra_tf
terraform init
terraform plan -refresh=false -out="plan.tfplan"
terraform show -json plan.tfplan > plan.json
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- uses: fugue/[email protected]
with:
input_path: infra_tf/plan.json
input_type: tf-plan
rego_paths: example_custom_rule