-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 2.41 KB
/
terraform_plan.yaml
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
name: Plan terraform changes for base branch
on: [pull_request]
jobs:
plan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Grant Permission
run: |
chmod +x ./scripts/*
- name: Plan production
if: github.base_ref == 'production'
env:
ENV: production
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_production }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_production }}
AWS_REGION: ${{ secrets.aws_region_production }}
EXPORTS_S3_ACCESS_KEY_ID: ${{ secrets.exports_s3_access_key_id }}
EXPORTS_S3_SECRET_ACCESS_KEY: ${{ secrets.exports_s3_secret_access_key }}
SPARKPOST_API_KEY: ${{ secrets.SPARKPOST_API_KEY }}
run: "./scripts/infra plan -var \"s3_access_key_id=${EXPORTS_S3_ACCESS_KEY_ID}\"
-var \"s3_secret_access_key=${EXPORTS_S3_SECRET_ACCESS_KEY}\"
-var \"SPARKPOST_API_KEY=${SPARKPOST_API_KEY}\""
- name: Plan staging
if: github.base_ref == 'staging'
env:
ENV: staging
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_staging }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_staging }}
AWS_REGION: ${{ secrets.aws_region_staging }}
EXPORTS_S3_ACCESS_KEY_ID: ${{ secrets.exports_s3_access_key_id }}
EXPORTS_S3_SECRET_ACCESS_KEY: ${{ secrets.exports_s3_secret_access_key }}
SPARKPOST_API_KEY: ${{ secrets.SPARKPOST_API_KEY }}
run: "./scripts/infra plan -var \"s3_access_key_id=${EXPORTS_S3_ACCESS_KEY_ID}\"
-var \"s3_secret_access_key=${EXPORTS_S3_SECRET_ACCESS_KEY}\"
-var \"SPARKPOST_API_KEY=${SPARKPOST_API_KEY}\""
- name: Plan dev
if: github.base_ref == 'dev'
env:
ENV: dev
AWS_ACCESS_KEY_ID: ${{ secrets.aws_key_dev }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_dev }}
AWS_REGION: ${{ secrets.aws_region_dev }}
EXPORTS_S3_ACCESS_KEY_ID: ${{ secrets.exports_s3_access_key_id }}
EXPORTS_S3_SECRET_ACCESS_KEY: ${{ secrets.exports_s3_secret_access_key }}
SPARKPOST_API_KEY: ${{ secrets.SPARKPOST_API_KEY }}
run: "./scripts/infra plan -var \"s3_access_key_id=${EXPORTS_S3_ACCESS_KEY_ID}\"
-var \"s3_secret_access_key=${EXPORTS_S3_SECRET_ACCESS_KEY}\"
-var \"SPARKPOST_API_KEY=${SPARKPOST_API_KEY}\""