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