Skip to content

Commit 970e228

Browse files
authored
New: [AEA-0000] - Create new exports for cdk migration (#2237)
## Summary - Routine Change ### Details - create new cdk stacks in preperation for migration - create static exports in cdk stacks - remove set_github_secrets as moved to repo_status repo
1 parent 6a7cfed commit 970e228

23 files changed

Lines changed: 2246 additions & 1090 deletions

.github/workflows/cdk_release_code.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ on:
2121
CDK_APP_NAME:
2222
required: true
2323
type: string
24-
DEPLOYMENT_ENVIRONMENT:
25-
required: false
26-
type: string
2724
AWS_REGION:
2825
required: false
2926
type: string
@@ -46,7 +43,7 @@ jobs:
4643
run:
4744
shell: bash
4845
name: "Deploy cdk app ${{ inputs.CDK_APP_NAME }} stack ${{ inputs.DEPLOYED_STACK_NAME }}"
49-
environment: ${{ fromJSON(inputs.DEPLOYMENT_ENVIRONMENT != '' && format('"{0}"', inputs.DEPLOYMENT_ENVIRONMENT) || 'null') }}
46+
environment: ${{ inputs.TARGET_ENVIRONMENT }}
5047
permissions:
5148
id-token: write
5249
contents: write

.github/workflows/release_all_stacks.yml

Lines changed: 51 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,32 @@ jobs:
138138
cf_create_changeset_role: ${{ secrets.cf_create_changeset_role }}
139139
cf_deploy_role: ${{ secrets.cf_deploy_role }}
140140

141-
cdk_diff_monitoring:
141+
cdk_diff_iam:
142142
uses: ./.github/workflows/cdk_diff_code.yml
143143
permissions:
144144
id-token: write
145145
contents: write
146146
with:
147-
CDK_RESOURCE_STACK_NAME: Monitoring
148-
DEPLOYED_STACK_NAME: monitoring
149-
TARGET_ENVIRONMENT: ${{inputs.target_environment}}-account
147+
CDK_RESOURCE_STACK_NAME: IAM
148+
DEPLOYED_STACK_NAME: iam-cdk
149+
TARGET_ENVIRONMENT: ${{inputs.target_environment}}
150+
VERSION: ${{ inputs.version }}
151+
COMMIT_ID: ${{ inputs.commit_id }}
152+
CDK_APP_NAME: AccountResources
153+
IS_PULL_REQUEST: ${{ inputs.is_pull_request }}
154+
pinned_image: ${{ inputs.pinned_image }}
155+
secrets:
156+
CLOUD_FORMATION_DIFF_ROLE: ${{ secrets.cf_create_changeset_role }} # use create changeset role as we are just doing a diff
157+
158+
cdk_diff_secrets:
159+
uses: ./.github/workflows/cdk_diff_code.yml
160+
permissions:
161+
id-token: write
162+
contents: write
163+
with:
164+
CDK_RESOURCE_STACK_NAME: Secrets
165+
DEPLOYED_STACK_NAME: secrets-cdk
166+
TARGET_ENVIRONMENT: ${{inputs.target_environment}}
150167
VERSION: ${{ inputs.version }}
151168
COMMIT_ID: ${{ inputs.commit_id }}
152169
CDK_APP_NAME: AccountResources
@@ -163,7 +180,7 @@ jobs:
163180
with:
164181
CDK_RESOURCE_STACK_NAME: AccountResources_US
165182
DEPLOYED_STACK_NAME: account-resources-cdk-us
166-
TARGET_ENVIRONMENT: ${{inputs.target_environment}}-account
183+
TARGET_ENVIRONMENT: ${{inputs.target_environment}}
167184
VERSION: ${{ inputs.version }}
168185
COMMIT_ID: ${{ inputs.commit_id }}
169186
CDK_APP_NAME: AccountResources
@@ -182,7 +199,7 @@ jobs:
182199
with:
183200
CDK_RESOURCE_STACK_NAME: AccountResources_UK
184201
DEPLOYED_STACK_NAME: account-resources-cdk-uk
185-
TARGET_ENVIRONMENT: ${{inputs.target_environment}}-account
202+
TARGET_ENVIRONMENT: ${{inputs.target_environment}}
186203
VERSION: ${{ inputs.version }}
187204
COMMIT_ID: ${{ inputs.commit_id }}
188205
CDK_APP_NAME: AccountResources
@@ -192,21 +209,39 @@ jobs:
192209
secrets:
193210
CLOUD_FORMATION_DIFF_ROLE: ${{ secrets.cf_create_changeset_role }} # use create changeset role as we are just doing a diff
194211

195-
cdk_deploy_monitoring:
212+
cdk_deploy_iam:
213+
uses: ./.github/workflows/cdk_release_code.yml
214+
if: ${{ inputs.execute_change_set == true }}
215+
needs: [cdk_diff_iam, cdk_diff_secrets, cdk_diff_account_resources_US, cdk_diff_account_resources_UK]
216+
permissions:
217+
id-token: write
218+
contents: write
219+
with:
220+
CDK_RESOURCE_STACK_NAME: IAM
221+
DEPLOYED_STACK_NAME: iam-cdk
222+
TARGET_ENVIRONMENT: ${{inputs.target_environment}}
223+
VERSION: ${{ inputs.version }}
224+
COMMIT_ID: ${{ inputs.commit_id }}
225+
CDK_APP_NAME: AccountResources
226+
AWS_REGION: eu-west-2
227+
pinned_image: ${{ inputs.pinned_image }}
228+
secrets:
229+
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.cf_deploy_role }}
230+
231+
cdk_deploy_secrets:
196232
uses: ./.github/workflows/cdk_release_code.yml
197233
if: ${{ inputs.execute_change_set == true }}
198-
needs: cdk_diff_monitoring
234+
needs: cdk_deploy_iam
199235
permissions:
200236
id-token: write
201237
contents: write
202238
with:
203-
CDK_RESOURCE_STACK_NAME: Monitoring
204-
DEPLOYED_STACK_NAME: monitoring
205-
TARGET_ENVIRONMENT: ${{inputs.target_environment}}-account
239+
CDK_RESOURCE_STACK_NAME: Secrets
240+
DEPLOYED_STACK_NAME: secrets-cdk
241+
TARGET_ENVIRONMENT: ${{inputs.target_environment}}
206242
VERSION: ${{ inputs.version }}
207243
COMMIT_ID: ${{ inputs.commit_id }}
208244
CDK_APP_NAME: AccountResources
209-
DEPLOYMENT_ENVIRONMENT: ${{ inputs.target_environment }}-account
210245
AWS_REGION: eu-west-2
211246
pinned_image: ${{ inputs.pinned_image }}
212247
secrets:
@@ -215,18 +250,17 @@ jobs:
215250
cdk_deploy_account_resources_US:
216251
uses: ./.github/workflows/cdk_release_code.yml
217252
if: ${{ inputs.execute_change_set == true }}
218-
needs: cdk_diff_account_resources_US
253+
needs: cdk_deploy_secrets
219254
permissions:
220255
id-token: write
221256
contents: write
222257
with:
223258
CDK_RESOURCE_STACK_NAME: AccountResources_US
224259
DEPLOYED_STACK_NAME: account-resources-cdk-us
225-
TARGET_ENVIRONMENT: ${{inputs.target_environment}}-account
260+
TARGET_ENVIRONMENT: ${{inputs.target_environment}}
226261
VERSION: ${{ inputs.version }}
227262
COMMIT_ID: ${{ inputs.commit_id }}
228263
CDK_APP_NAME: AccountResources
229-
DEPLOYMENT_ENVIRONMENT: ${{ inputs.target_environment }}-account
230264
AWS_REGION: us-east-1
231265
pinned_image: ${{ inputs.pinned_image }}
232266
secrets:
@@ -235,18 +269,17 @@ jobs:
235269
cdk_deploy_account_resources_UK:
236270
uses: ./.github/workflows/cdk_release_code.yml
237271
if: ${{ inputs.execute_change_set == true }}
238-
needs: cdk_diff_account_resources_UK
272+
needs: cdk_deploy_secrets
239273
permissions:
240274
id-token: write
241275
contents: write
242276
with:
243277
CDK_RESOURCE_STACK_NAME: AccountResources_UK
244278
DEPLOYED_STACK_NAME: account-resources-cdk-uk
245-
TARGET_ENVIRONMENT: ${{inputs.target_environment}}-account
279+
TARGET_ENVIRONMENT: ${{inputs.target_environment}}
246280
VERSION: ${{ inputs.version }}
247281
COMMIT_ID: ${{ inputs.commit_id }}
248282
CDK_APP_NAME: AccountResources
249-
DEPLOYMENT_ENVIRONMENT: ${{ inputs.target_environment }}-account
250283
AWS_REGION: eu-west-2
251284
pinned_image: ${{ inputs.pinned_image }}
252285
secrets:

.trivyignore.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.vscode/account-resources.code-workspace

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@
107107
"package-lock.json",
108108
"node_modules",
109109
".vscode"
110-
],
111-
"eslint.useFlatConfig": true,
112-
"eslint.format.enable": true
110+
]
113111
},
114112
"extensions": {
115113
"recommendations": [

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,20 @@ cdk-synth:
156156
CDK_CONFIG_lambdaConcurrencyThreshold=900 \
157157
CDK_CONFIG_lambdaConcurrencyWarningThreshold=700 \
158158
CDK_CONFIG_enableAlerts=false \
159+
CDK_CONFIG_lambdaInsightsLogGroupName=foo_bar \
160+
CDK_CONFIG_splunkHECEndpoint=https://example.com:8088/services/collector/event \
161+
CDK_CONFIG_hecToken=example-token \
162+
CDK_CONFIG_deploySubjectClaimFilters=foo,bar,baz \
163+
CDK_CONFIG_checkVersionSubjectClaimFilters=foo,bar,baz \
164+
CDK_CONFIG_prepareChangesetClaimFilters=foo,bar,baz \
165+
CDK_CONFIG_releaseNotesExecuteLambdaClaimFilters=foo,bar,baz \
166+
CDK_CONFIG_artilleryLoadTestRoleClaimFilters=foo,bar,baz \
167+
CDK_CONFIG_proxygenPTLClaimFilters=foo,bar,baz \
168+
CDK_CONFIG_proxygenProdClaimFilters=foo,bar,baz \
169+
CDK_CONFIG_CDKPullImageClaimFilters=foo,bar,baz \
170+
CDK_CONFIG_CDKPushImageClaimFilters=foo,bar,baz \
171+
CDK_CONFIG_assistMeRegressionTestClaimFilters=foo,bar,baz \
172+
CDK_CONFIG_assistMeDocumentSyncClaimFilters=foo,bar,baz \
159173
npm run cdk-synth --workspace packages/cdk/
160174

161175
compile:

0 commit comments

Comments
 (0)