@@ -10,7 +10,7 @@ permissions:
10
10
contents : read
11
11
12
12
jobs :
13
- plan :
13
+ Sandbox :
14
14
runs-on : ubuntu-latest
15
15
environment : Sandbox
16
16
steps :
25
25
aws-region : ${{ vars.AWS_REGION }}
26
26
27
27
- name : Plan
28
+ id : plan
28
29
uses : gruntwork-io/terragrunt-action@v2
29
30
env :
30
31
AWS_REGION : ${{ vars.AWS_REGION }}
@@ -33,37 +34,25 @@ jobs:
33
34
INPUT_POST_EXEC_0 : |
34
35
pwd
35
36
ls -al /github/workspace/
36
- find / -name "test.tfplan"
37
+ tfplan_location=$(find . -name "sandbox.tfplan")
38
+ echo "TERRAFORM_PLAN=$(cat $tfplan_location)" >> "$GITHUB_OUTPUT"
37
39
with :
38
40
tf_version : ' 1.5.5'
39
41
tg_version : ' 0.54.11'
40
42
tg_dir : ' platform/sandbox/us-east-2/000'
41
- tg_command : ' plan -out test.tfplan'
42
- deploy :
43
- runs-on : ubuntu-latest
44
- needs : [ plan ]
45
- environment : Sandbox
46
- steps :
47
- - name : Checkout
48
- uses : actions/checkout@main
49
-
50
- - name : Configure AWS credentials
51
- uses : aws-actions/configure-aws-credentials@v1.7.0
52
- with :
53
- role-to-assume : ${{ vars.DEPLOY_ROLE_ARN }}
54
- role-session-name : Test-AWS-GHA-OIDC
55
- aws-region : ${{ vars.AWS_REGION }}
56
-
57
- - uses : actions/setup-python@v5
58
- with :
59
- python-version : ' 3.13'
43
+ tg_command : ' plan -out sandbox.tfplan'
60
44
61
45
- name : Deploy
62
46
uses : gruntwork-io/terragrunt-action@v2
63
47
env :
64
48
AWS_REGION : ${{ vars.AWS_REGION }}
65
- INPUT_PRE_EXEC_1 : |
49
+ TERRAFORM_PLAN : ${{ steps.plan.outputs.TERRAFORM_PLAN }}
50
+ INPUT_PRE_EXEC_0 : |
66
51
sudo apt update -yqq && sudo apt install python3 -yqq
52
+ INPUT_PRE_EXEC_1 : |
53
+ echo $TERRAFORM_PLAN >> platform/sandbox/us-east-2/000/sandbox.tfplan
54
+ INPUT_PRE_EXEC_2 : |
55
+ cat platform/sandbox/us-east-2/000/sandbox.tfplan
67
56
with :
68
57
tf_version : ' 1.5.5'
69
58
tg_version : ' 0.54.11'
0 commit comments