1
1
name : deploy-quicksight
2
2
3
3
on :
4
- push :
5
- branches :
6
- - AB2D-6529/Deploy_Quicksights
7
-
8
4
workflow_call :
9
5
inputs :
10
6
apply :
47
43
deploy :
48
44
runs-on : self-hosted
49
45
50
- env :
51
- ENV : test
52
-
53
46
steps :
54
47
- name : Set environment variables
55
48
uses : cmsgov/ab2d-bcda-dpc-platform/actions/aws-params-env-action@main
@@ -71,15 +64,15 @@ jobs:
71
64
72
65
- name : Set variables for AB2D environment
73
66
run : |
74
- if [ "$ENV" = "dev" ]; then
67
+ if [ ${{ inputs.environment }} = "dev" ]; then
75
68
AB2D_ENV='ab2d-dev'
76
- elif [ "$ENV" = "test" ]; then
69
+ elif [ ${{ inputs.environment }} = "test" ]; then
77
70
AB2D_ENV='ab2d-east-impl'
78
- elif [ "$ENV" = "sbx" ]; then
71
+ elif [ ${{ inputs.environment }} = "sbx" ]; then
79
72
AB2D_ENV='ab2d-sbx-sandbox'
80
- elif [ "$ENV" = "prod_test" ]; then
73
+ elif [ ${{ inputs.environment }} = "prod_test" ]; then
81
74
AB2D_ENV='ab2d-east-prod-test'
82
- elif [ "$ENV" = "prod" ]; then
75
+ elif [ ${{ inputs.environment }} = "prod" ]; then
83
76
AB2D_ENV='ab2d-east-prod'
84
77
else
85
78
echo "Unable to determine AB2D environment";
91
84
- name : Assume role in AB2D account for this environment
92
85
uses : aws-actions/configure-aws-credentials@v4
93
86
env :
94
- # ACCOUNT: ${{ inputs.environment == 'prod_test' && 'prod' || inputs.environment }}
95
- ACCOUNT : test
87
+ ACCOUNT : ${{ inputs.environment == 'prod_test' && 'prod' || inputs.environment }}
96
88
with :
97
89
aws-region : ${{ vars.AWS_REGION }}
98
90
role-to-assume : arn:aws:iam::${{ secrets[format('{0}_ACCOUNT_ID', env.ACCOUNT)] }}:role/delegatedadmin/developer/ab2d-${{ env.ACCOUNT }}-github-actions
@@ -110,7 +102,7 @@ jobs:
110
102
terraform plan -var env=${AB2D_ENV} -out=quicksight.tfplan
111
103
112
104
- name : Terraform apply
113
- # if: ${{ inputs.apply == true }}
105
+ if : ${{ inputs.apply == true }}
114
106
run : |
115
107
set -e
116
108
cd terraform/environments/ab2d/quicksight/
0 commit comments