From 39ec933e827258bb40ee46308b1d677ebecb64ba Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Thu, 30 Jul 2026 15:20:47 +0200 Subject: [PATCH 01/15] Add support for shared VPC configuration in ECS frontend preview deployment --- .../deploy-ecs-express-service/action.yml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index d784eca4..0581fbfd 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -33,6 +33,10 @@ inputs: description: 'Custom environment variables as JSON object, e.g. {"NAME":"VALUE"}' required: false default: '{}' + use-shared-vpc: + description: "When true, fetch subnet IDs and security group ID from SSM and attach the service to the shared preview VPC" + required: false + default: 'false' outputs: service-url: @@ -52,6 +56,18 @@ runs: echo "infrastructure_role_arn=arn:aws:iam::${{ inputs.aws-account-id }}:role/${{inputs.service-name}}-preview-ecs-infrastructure" >> $GITHUB_OUTPUT echo "task_tole_arn=arn:aws:iam::${{ inputs.aws-account-id }}:role/${{inputs.service-name}}-preview-ecs-task" >> $GITHUB_OUTPUT + - name: Get shared VPC config + id: vpc-config + if: ${{ inputs.use-shared-vpc == 'true' }} + shell: bash + run: | + echo "sg_id=$(aws ssm get-parameter \ + --name /config/shared/frontend_preview_security_group_id \ + --query Parameter.Value --output text)" >> $GITHUB_OUTPUT + echo "subnet_ids=$(aws ssm get-parameter \ + --name /config/shared/frontend_preview_subnet_ids \ + --query Parameter.Value --output text)" >> $GITHUB_OUTPUT + - name: Check if Service exists id: check-service shell: bash @@ -170,6 +186,12 @@ runs: infrastructureRoleArn="${{ steps.set-service-variables.outputs.infrastructure_role_arn }}" taskRoleArn="${{ steps.set-service-variables.outputs.task_tole_arn }}" echo "Deploying Preview: ${{ steps.set-service-variables.outputs.service_name }} ($executionRoleArn, $infrastructureRoleArn, $taskRoleArn)..." + + VPC_ARGS=() + if [[ "${{ inputs.use-shared-vpc }}" == "true" ]]; then + VPC_ARGS+=(--subnet-ids "${{ steps.vpc-config.outputs.subnet_ids }}") + VPC_ARGS+=(--security-group-ids "${{ steps.vpc-config.outputs.sg_id }}") + fi aws ecs create-express-gateway-service \ --service-name "${{ steps.set-service-variables.outputs.service_name }}" \ @@ -179,7 +201,8 @@ runs: --primary-container "$primary_container" \ --health-check-path "$HEALTH_CHECK_ENDPOINT" \ --scaling-target '{"minTaskCount": 1, "maxTaskCount": 1}' \ - --region "${{ inputs.aws-region }}" + --region "${{ inputs.aws-region }}" \ + "${VPC_ARGS[@]}" serviceArn="arn:aws:ecs:${{ inputs.aws-region }}:${{ inputs.aws-account-id }}:service/default/${{ steps.set-service-variables.outputs.service_name }}" echo "Deployment started! $serviceArn" @@ -214,6 +237,12 @@ runs: SERVICE_ARN="${{ steps.check-service.outputs.service_arn }}" echo "Updating Preview: ${{ steps.set-service-variables.outputs.service_name }} ($SERVICE_ARN)..." + VPC_ARGS=() + if [[ "${{ inputs.use-shared-vpc }}" == "true" ]]; then + VPC_ARGS+=(--subnet-ids "${{ steps.vpc-config.outputs.subnet_ids }}") + VPC_ARGS+=(--security-group-ids "${{ steps.vpc-config.outputs.sg_id }}") + fi + aws ecs update-express-gateway-service \ --service-arn "$SERVICE_ARN" \ --execution-role-arn "$executionRoleArn" \ @@ -221,7 +250,8 @@ runs: --primary-container "$primary_container" \ --health-check-path "$HEALTH_CHECK_ENDPOINT" \ --scaling-target '{"minTaskCount": 1, "maxTaskCount": 1}' \ - --region "${{ inputs.aws-region }}" + --region "${{ inputs.aws-region }}" \ + "${VPC_ARGS[@]}" echo "Update started! $SERVICE_ARN" echo "service_arn=$SERVICE_ARN" >> $GITHUB_OUTPUT From 7d550791daf07f0e7f1e0621f59ce5abfadc1a0a Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Tue, 4 Aug 2026 14:33:26 +0200 Subject: [PATCH 02/15] Update deployment workflows to use shared VPC configuration for frontend previews --- .github/workflows/deployment.preview.on-comment.yml | 2 +- .github/workflows/deployment.preview.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment.preview.on-comment.yml b/.github/workflows/deployment.preview.on-comment.yml index 215ed20b..24ac3560 100644 --- a/.github/workflows/deployment.preview.on-comment.yml +++ b/.github/workflows/deployment.preview.on-comment.yml @@ -66,7 +66,7 @@ jobs: preview: needs: trigger - uses: nsbno/platform-actions/.github/workflows/deployment.preview.yml@v2 + uses: nsbno/platform-actions/.github/workflows/deployment.preview.yml@support-shared-vpc-for-frontend-previews with: health-endpoint: ${{ inputs.health-endpoint }} use-ecs-express-mode: ${{ inputs.use-ecs-express-mode }} diff --git a/.github/workflows/deployment.preview.yml b/.github/workflows/deployment.preview.yml index 459374fd..9b6a2d46 100644 --- a/.github/workflows/deployment.preview.yml +++ b/.github/workflows/deployment.preview.yml @@ -165,7 +165,7 @@ jobs: - name: Deploy Preview (ECS) if: ${{ inputs.use-ecs-express-mode == true && (inputs.only-on-preview-comment == false || steps.check-comments.outputs.continue == 'true') }} id: deploy-ecs - uses: nsbno/platform-actions/.github/actions/deployment/preview/deploy-ecs-express-service@v2 + uses: nsbno/platform-actions/.github/actions/deployment/preview/deploy-ecs-express-service@support-shared-vpc-for-frontend-previews with: health-endpoint: ${{ inputs.health-endpoint }} service-name: ${{ steps.deployment-info.outputs.ecs-service-name }} From e82e021474e91736aed661f862f60d9a0f97f65c Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Tue, 4 Aug 2026 14:48:07 +0200 Subject: [PATCH 03/15] Add support for shared VPC configuration in preview deployment workflows --- .github/workflows/deployment.preview.on-comment.yml | 6 ++++++ .github/workflows/deployment.preview.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/deployment.preview.on-comment.yml b/.github/workflows/deployment.preview.on-comment.yml index 24ac3560..51cdf1f2 100644 --- a/.github/workflows/deployment.preview.on-comment.yml +++ b/.github/workflows/deployment.preview.on-comment.yml @@ -36,6 +36,11 @@ on: type: string default: '/' required: false + use-shared-vpc: + description: 'When true, attach the ECS Express preview service to the shared preview VPC. Only used when use-ecs-express-mode is true.' + type: boolean + default: false + required: false jobs: trigger: @@ -78,6 +83,7 @@ jobs: skip-static-files-deployment: ${{ inputs.skip-static-files-deployment }} s3-static-files-path: ${{ inputs.s3-static-files-path }} custom-env-variables: ${{ inputs.custom-env-variables }} + use-shared-vpc: ${{ inputs.use-shared-vpc }} comment-handler: needs: [ trigger, preview ] diff --git a/.github/workflows/deployment.preview.yml b/.github/workflows/deployment.preview.yml index 9b6a2d46..4ffcf017 100644 --- a/.github/workflows/deployment.preview.yml +++ b/.github/workflows/deployment.preview.yml @@ -60,6 +60,11 @@ on: type: string default: '/' required: false + use-shared-vpc: + description: 'When true, attach the ECS Express preview service to the shared preview VPC. Only used when use-ecs-express-mode is true.' + type: boolean + default: false + required: false permissions: contents: read @@ -176,6 +181,7 @@ jobs: aws-region: ${{ vars.AWS_REGION }} git-event-number: ${{ inputs.git-event-number }} custom-env-variables: ${{ inputs.custom-env-variables }} + use-shared-vpc: ${{ inputs.use-shared-vpc }} - name: Push Mapping to DynamoDB and Comment domain name if: ${{ inputs.only-on-preview-comment == false || steps.check-comments.outputs.continue == 'true' }} From 25c3e00ae3338f2a40e106196fad2ee988729177 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Wed, 5 Aug 2026 18:58:13 +0200 Subject: [PATCH 04/15] Update shared VPC configuration to use service-specific security group ID in ECS deployment --- .../deployment/preview/deploy-ecs-express-service/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 0581fbfd..512e8a5f 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -62,7 +62,7 @@ runs: shell: bash run: | echo "sg_id=$(aws ssm get-parameter \ - --name /config/shared/frontend_preview_security_group_id \ + --name /config/${{ inputs.service-name }}/frontend_preview_security_group_id \ --query Parameter.Value --output text)" >> $GITHUB_OUTPUT echo "subnet_ids=$(aws ssm get-parameter \ --name /config/shared/frontend_preview_subnet_ids \ From 2a4096f2599547950577feceafd60fd6af234cd3 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Wed, 5 Aug 2026 19:46:10 +0200 Subject: [PATCH 05/15] fix: pass shared VPC config via --network-configuration instead of invalid top-level flags --- .../preview/deploy-ecs-express-service/action.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 512e8a5f..53078f74 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -189,8 +189,7 @@ runs: VPC_ARGS=() if [[ "${{ inputs.use-shared-vpc }}" == "true" ]]; then - VPC_ARGS+=(--subnet-ids "${{ steps.vpc-config.outputs.subnet_ids }}") - VPC_ARGS+=(--security-group-ids "${{ steps.vpc-config.outputs.sg_id }}") + VPC_ARGS+=(--network-configuration "awsvpcConfiguration={subnets=[${{ steps.vpc-config.outputs.subnet_ids }}],securityGroups=[${{ steps.vpc-config.outputs.sg_id }}],assignPublicIp=DISABLED}") fi aws ecs create-express-gateway-service \ @@ -239,8 +238,7 @@ runs: VPC_ARGS=() if [[ "${{ inputs.use-shared-vpc }}" == "true" ]]; then - VPC_ARGS+=(--subnet-ids "${{ steps.vpc-config.outputs.subnet_ids }}") - VPC_ARGS+=(--security-group-ids "${{ steps.vpc-config.outputs.sg_id }}") + VPC_ARGS+=(--network-configuration "awsvpcConfiguration={subnets=[${{ steps.vpc-config.outputs.subnet_ids }}],securityGroups=[${{ steps.vpc-config.outputs.sg_id }}],assignPublicIp=DISABLED}") fi aws ecs update-express-gateway-service \ From 8ac04fae3721231a20ad1fbb81b5c084cecb0626 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Wed, 5 Aug 2026 19:51:02 +0200 Subject: [PATCH 06/15] fix: update shared VPC network configuration to correct argument order --- .../deployment/preview/deploy-ecs-express-service/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 53078f74..8e5cc5cb 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -189,7 +189,7 @@ runs: VPC_ARGS=() if [[ "${{ inputs.use-shared-vpc }}" == "true" ]]; then - VPC_ARGS+=(--network-configuration "awsvpcConfiguration={subnets=[${{ steps.vpc-config.outputs.subnet_ids }}],securityGroups=[${{ steps.vpc-config.outputs.sg_id }}],assignPublicIp=DISABLED}") + VPC_ARGS+=(--network-configuration "securityGroups=[${{ steps.vpc-config.outputs.sg_id }}],subnets=[${{ steps.vpc-config.outputs.subnet_ids }}]") fi aws ecs create-express-gateway-service \ @@ -238,7 +238,7 @@ runs: VPC_ARGS=() if [[ "${{ inputs.use-shared-vpc }}" == "true" ]]; then - VPC_ARGS+=(--network-configuration "awsvpcConfiguration={subnets=[${{ steps.vpc-config.outputs.subnet_ids }}],securityGroups=[${{ steps.vpc-config.outputs.sg_id }}],assignPublicIp=DISABLED}") + VPC_ARGS+=(--network-configuration "securityGroups=[${{ steps.vpc-config.outputs.sg_id }}],subnets=[${{ steps.vpc-config.outputs.subnet_ids }}]") fi aws ecs update-express-gateway-service \ From ffba042e2691cea065d6a5d7adc8f3f7d6909e2e Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Tue, 11 Aug 2026 11:54:35 +0200 Subject: [PATCH 07/15] fix: adjust service URL retrieval based on shared VPC access type --- .../deployment/preview/deploy-ecs-express-service/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 8e5cc5cb..4f33657b 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -277,5 +277,8 @@ runs: exit 1 fi - SERVICE_URL=$(echo "$SERVICE_JSON" | jq -r '[.service.activeConfigurations[0].ingressPaths[] | select(.accessType=="PUBLIC") | .endpoint][0] | sub("^https?://"; "") | sub("/$"; "")') + ACCESS_TYPE=$([[ "${{ inputs.use-shared-vpc }}" == "true" ]] && echo "PRIVATE" || echo "PUBLIC") + SERVICE_URL=$(echo "$SERVICE_JSON" | jq -r --arg t "$ACCESS_TYPE" ' + [.service.activeConfigurations[0].ingressPaths[] | select(.accessType==$t) | .endpoint][0] + | sub("^https?://"; "") | sub("/$"; "")') echo "service_url=${SERVICE_URL}" >> $GITHUB_OUTPUT \ No newline at end of file From b7d6dd897b92bac40229bc9bffe69dda87f39916 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Wed, 12 Aug 2026 12:28:49 +0200 Subject: [PATCH 08/15] fix: enhance service URL retrieval logic for active services in ECS deployment --- .../deploy-ecs-express-service/action.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 4f33657b..7018d472 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -259,13 +259,16 @@ runs: shell: bash run: | SERVICE_ARN="${{ steps.create-service.outputs.service_arn || steps.update-service.outputs.service_arn }}" + SERVICE_URL="" for i in {1..60}; do SERVICE_JSON=$(aws ecs describe-express-gateway-service --service-arn "$SERVICE_ARN" --region ${{ inputs.aws-region }}) STATUS=$(echo "$SERVICE_JSON" | jq -r '.service.status.statusCode') STATUS_REASON=$(echo "$SERVICE_JSON" | jq -r '.service.status.statusReason // ""') - echo "Current status: $STATUS ($STATUS_REASON)" - if [[ "$STATUS" == "ACTIVE" ]]; then + SERVICE_URL=$(echo "$SERVICE_JSON" | jq -r \ + '([.service.activeConfigurations[0].ingressPaths[]? | select(.accessType=="PUBLIC") | .endpoint][0] // "") | sub("^https?://"; "") | sub("/$"; "")') + echo "Current status: $STATUS ($STATUS_REASON), URL: ${SERVICE_URL:-}" + if [[ "$STATUS" == "ACTIVE" ]] && [[ -n "$SERVICE_URL" ]]; then echo "Service is active." break fi @@ -277,8 +280,9 @@ runs: exit 1 fi - ACCESS_TYPE=$([[ "${{ inputs.use-shared-vpc }}" == "true" ]] && echo "PRIVATE" || echo "PUBLIC") - SERVICE_URL=$(echo "$SERVICE_JSON" | jq -r --arg t "$ACCESS_TYPE" ' - [.service.activeConfigurations[0].ingressPaths[] | select(.accessType==$t) | .endpoint][0] - | sub("^https?://"; "") | sub("/$"; "")') + if [[ -z "$SERVICE_URL" ]]; then + echo "Service is ACTIVE but no public ingress URL is available." + exit 1 + fi + echo "service_url=${SERVICE_URL}" >> $GITHUB_OUTPUT \ No newline at end of file From 2521f6bd6757b9db992931b0c46bdac376a19108 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Wed, 12 Aug 2026 16:12:53 +0200 Subject: [PATCH 09/15] remove unused SERVICE_URL variable in ECS deployment script --- .../deployment/preview/deploy-ecs-express-service/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 7018d472..cab23454 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -259,7 +259,6 @@ runs: shell: bash run: | SERVICE_ARN="${{ steps.create-service.outputs.service_arn || steps.update-service.outputs.service_arn }}" - SERVICE_URL="" for i in {1..60}; do SERVICE_JSON=$(aws ecs describe-express-gateway-service --service-arn "$SERVICE_ARN" --region ${{ inputs.aws-region }}) From 38bf51322daba0d5ac6014cbb973df4be03c93c6 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Thu, 13 Aug 2026 10:07:13 +0200 Subject: [PATCH 10/15] update deployment actions to use version v2 for preview workflows --- .github/workflows/deployment.preview.on-comment.yml | 2 +- .github/workflows/deployment.preview.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment.preview.on-comment.yml b/.github/workflows/deployment.preview.on-comment.yml index 51cdf1f2..2d9d9ffe 100644 --- a/.github/workflows/deployment.preview.on-comment.yml +++ b/.github/workflows/deployment.preview.on-comment.yml @@ -71,7 +71,7 @@ jobs: preview: needs: trigger - uses: nsbno/platform-actions/.github/workflows/deployment.preview.yml@support-shared-vpc-for-frontend-previews + uses: nsbno/platform-actions/.github/workflows/deployment.preview.yml@v2 with: health-endpoint: ${{ inputs.health-endpoint }} use-ecs-express-mode: ${{ inputs.use-ecs-express-mode }} diff --git a/.github/workflows/deployment.preview.yml b/.github/workflows/deployment.preview.yml index 4ffcf017..16794c75 100644 --- a/.github/workflows/deployment.preview.yml +++ b/.github/workflows/deployment.preview.yml @@ -170,7 +170,7 @@ jobs: - name: Deploy Preview (ECS) if: ${{ inputs.use-ecs-express-mode == true && (inputs.only-on-preview-comment == false || steps.check-comments.outputs.continue == 'true') }} id: deploy-ecs - uses: nsbno/platform-actions/.github/actions/deployment/preview/deploy-ecs-express-service@support-shared-vpc-for-frontend-previews + uses: nsbno/platform-actions/.github/actions/deployment/preview/deploy-ecs-express-service@v2 with: health-endpoint: ${{ inputs.health-endpoint }} service-name: ${{ steps.deployment-info.outputs.ecs-service-name }} From 6501724c62a7979e688a10f077688ff02f1e0fb6 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Thu, 13 Aug 2026 10:41:44 +0200 Subject: [PATCH 11/15] update SSM parameter paths for shared VPC configuration --- .../deployment/preview/deploy-ecs-express-service/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index cab23454..1195b097 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -62,10 +62,10 @@ runs: shell: bash run: | echo "sg_id=$(aws ssm get-parameter \ - --name /config/${{ inputs.service-name }}/frontend_preview_security_group_id \ + --name /__deployment__/${{ inputs.service-name }}/frontend_preview_security_group_id \ --query Parameter.Value --output text)" >> $GITHUB_OUTPUT echo "subnet_ids=$(aws ssm get-parameter \ - --name /config/shared/frontend_preview_subnet_ids \ + --name /__deployment__/shared/frontend_preview_subnet_ids \ --query Parameter.Value --output text)" >> $GITHUB_OUTPUT - name: Check if Service exists From 646c5291ec71b9ddb2d4085c0cb7696bb8c42431 Mon Sep 17 00:00:00 2001 From: tomarnebra <160740012+tomarnebra@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:43:33 +0200 Subject: [PATCH 12/15] Update .github/actions/deployment/preview/deploy-ecs-express-service/action.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Førde Lindhagen --- .../deployment/preview/deploy-ecs-express-service/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 1195b097..3e232605 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -61,7 +61,7 @@ runs: if: ${{ inputs.use-shared-vpc == 'true' }} shell: bash run: | - echo "sg_id=$(aws ssm get-parameter \ + echo "security_group_id=$(aws ssm get-parameter \ --name /__deployment__/${{ inputs.service-name }}/frontend_preview_security_group_id \ --query Parameter.Value --output text)" >> $GITHUB_OUTPUT echo "subnet_ids=$(aws ssm get-parameter \ From 7759b7fceecab4f70c7511f2e10d2162409e0f30 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Thu, 13 Aug 2026 12:52:54 +0200 Subject: [PATCH 13/15] Revert "update deployment actions to use version v2 for preview workflows" This reverts commit 38bf51322daba0d5ac6014cbb973df4be03c93c6. --- .github/workflows/deployment.preview.on-comment.yml | 2 +- .github/workflows/deployment.preview.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment.preview.on-comment.yml b/.github/workflows/deployment.preview.on-comment.yml index 2d9d9ffe..51cdf1f2 100644 --- a/.github/workflows/deployment.preview.on-comment.yml +++ b/.github/workflows/deployment.preview.on-comment.yml @@ -71,7 +71,7 @@ jobs: preview: needs: trigger - uses: nsbno/platform-actions/.github/workflows/deployment.preview.yml@v2 + uses: nsbno/platform-actions/.github/workflows/deployment.preview.yml@support-shared-vpc-for-frontend-previews with: health-endpoint: ${{ inputs.health-endpoint }} use-ecs-express-mode: ${{ inputs.use-ecs-express-mode }} diff --git a/.github/workflows/deployment.preview.yml b/.github/workflows/deployment.preview.yml index 16794c75..4ffcf017 100644 --- a/.github/workflows/deployment.preview.yml +++ b/.github/workflows/deployment.preview.yml @@ -170,7 +170,7 @@ jobs: - name: Deploy Preview (ECS) if: ${{ inputs.use-ecs-express-mode == true && (inputs.only-on-preview-comment == false || steps.check-comments.outputs.continue == 'true') }} id: deploy-ecs - uses: nsbno/platform-actions/.github/actions/deployment/preview/deploy-ecs-express-service@v2 + uses: nsbno/platform-actions/.github/actions/deployment/preview/deploy-ecs-express-service@support-shared-vpc-for-frontend-previews with: health-endpoint: ${{ inputs.health-endpoint }} service-name: ${{ steps.deployment-info.outputs.ecs-service-name }} From 62c0d345aca784f7b6f52c24d809428354f17297 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Thu, 13 Aug 2026 14:58:07 +0200 Subject: [PATCH 14/15] fix rename all sg_id to security_group_id --- .../deployment/preview/deploy-ecs-express-service/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 3e232605..3947ace3 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -189,7 +189,7 @@ runs: VPC_ARGS=() if [[ "${{ inputs.use-shared-vpc }}" == "true" ]]; then - VPC_ARGS+=(--network-configuration "securityGroups=[${{ steps.vpc-config.outputs.sg_id }}],subnets=[${{ steps.vpc-config.outputs.subnet_ids }}]") + VPC_ARGS+=(--network-configuration "securityGroups=[${{ steps.vpc-config.outputs.security_group_id }}],subnets=[${{ steps.vpc-config.outputs.subnet_ids }}]") fi aws ecs create-express-gateway-service \ @@ -238,7 +238,7 @@ runs: VPC_ARGS=() if [[ "${{ inputs.use-shared-vpc }}" == "true" ]]; then - VPC_ARGS+=(--network-configuration "securityGroups=[${{ steps.vpc-config.outputs.sg_id }}],subnets=[${{ steps.vpc-config.outputs.subnet_ids }}]") + VPC_ARGS+=(--network-configuration "securityGroups=[${{ steps.vpc-config.outputs.security_group_id }}],subnets=[${{ steps.vpc-config.outputs.subnet_ids }}]") fi aws ecs update-express-gateway-service \ From 7f38d648374b1c5fd8a56db9f8b665b744766437 Mon Sep 17 00:00:00 2001 From: Tom Arne Date: Fri, 21 Aug 2026 13:12:49 +0200 Subject: [PATCH 15/15] update shared VPC parameter names to use service name in parameter name --- .../deployment/preview/deploy-ecs-express-service/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml index 3947ace3..fdc0e1b8 100644 --- a/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml +++ b/.github/actions/deployment/preview/deploy-ecs-express-service/action.yml @@ -65,7 +65,7 @@ runs: --name /__deployment__/${{ inputs.service-name }}/frontend_preview_security_group_id \ --query Parameter.Value --output text)" >> $GITHUB_OUTPUT echo "subnet_ids=$(aws ssm get-parameter \ - --name /__deployment__/shared/frontend_preview_subnet_ids \ + --name /__deployment__/${{ inputs.service-name }}/frontend_preview_subnet_ids \ --query Parameter.Value --output text)" >> $GITHUB_OUTPUT - name: Check if Service exists