-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (54 loc) · 1.79 KB
/
diff.yml
File metadata and controls
61 lines (54 loc) · 1.79 KB
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
name: Diff Infrastructure Changes
permissions:
id-token: write
contents: read
issues: read
on:
workflow_dispatch:
inputs:
environment:
type: environment
required: true
description: Environment to diff
IaC:
required: true
type: choice
options:
- SM2A
jobs:
plan-sm2a:
name: '`terraform plan` sm2a'
runs-on: ubuntu-latest
env:
DIRECTORY: veda-data-airflow
AWS_REGION: "us-west-2"
ENVIRONMENT: ${{ inputs.environment }}
if: ${{ inputs.IaC == 'SM2A' }}
environment: ${{ inputs.environment }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
lfs: "true"
submodules: "false"
- name: Checkout veda-data-airflow submodule
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: "NASA-IMPACT/${{ env.DIRECTORY }}"
path: ${{ env.DIRECTORY }}
ref: ${{ vars.VEDA_SM2A_DATA_AIRFLOW_GIT_REF || 'main'}}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 #v4.1.0
with:
role-to-assume: ${{ secrets.DEPLOYMENT_ROLE_ARN }}
role-session-name: "gh-${{ env.ENVIRONMENT }}-airflow-sm2a-deployment"
aws-region: "${{ env.AWS_REGION }}"
- name: Run `terraform plan`
id: plan_sm2a
uses: "./veda-data-airflow/.github/actions/terraform-deploy-sm2a"
with:
env-file: ".env"
env_aws_secret_name: ${{ vars.SM2A_ENVS_DEPLOYMENT_SECRET_NAME }}
dir: "${{ env.DIRECTORY }}"
script_path: "${{ github.workspace }}/scripts/generate_env_file.py"
run_command: plan