-
Notifications
You must be signed in to change notification settings - Fork 15
47 lines (41 loc) · 1.35 KB
/
terraform-validate.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
name: Ojd Daps Terraform Validate
on:
workflow_dispatch:
pull_request:
branches:
- dev
paths:
- ojd_daps/deploy/**
- .github/workflows/terraform-validate.yml
jobs:
ojd-daps-validate:
name: Validate Ojd-daps Terraform
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get the current DAPS version from VERSION
id: daps_version
run: |
echo ::set-output name=DAPS_VERSION::$(head -1 ojd_daps/VERSION)
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- name: Terraform configure
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.15.3
- name: Validate AWS Batch Job definition deploy
id: validate_deploy_ojd_daps_job_definition
env:
DAPS_TERRAFORM_WORKINGDIR: ojd_daps/deploy/terraform/
TF_VAR_DAPS_VERSION: ${{ steps.daps_version.outputs.DAPS_VERSION }}
run: |
echo "Validate terraform config."
cd ${DAPS_TERRAFORM_WORKINGDIR}
terraform init -input=false
terraform validate
terraform plan