-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (42 loc) · 1.41 KB
/
terraform.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
---
###
### Runs checks on whole repository: lint, docs, test
###
name: terraform
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
name: "Lint"
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: "make lint"
run: |
make lint
docs:
runs-on: ubuntu-latest
name: "Terraform docs"
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: "make gen"
run: |
make gen
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
test:
runs-on: ubuntu-latest
name: "Terraform test"
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: "make test"
run: |
make test ARGS="-var role_to_assume_hub=${TF_VAR_role_to_assume} -var aws_account_id_hub=${TF_VAR_aws_account_id_hub} -var role_to_assume_hub=${TF_VAR_role_to_assume} -var aws_account_id_satellite=${TF_VAR_aws_account_id_satellite}"
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_role_to_assume: ${{ secrets.ROLE_TO_ASSUME }}
TF_VAR_aws_account_id_hub: ${{ secrets.AWS_ACCOUNT_ID_HUB }}
TF_VAR_aws_account_id_satellite: ${{ secrets.AWS_ACCOUNT_ID_SATELLITE }}