Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/aws-probe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: AWS Probe (read-only)

# Manual-only, read-only snapshot of what exists in the target AWS account.
# Uses the same OIDC role as the CD build job. Nothing here mutates anything.

on:
workflow_dispatch:

permissions:
contents: read
id-token: write

jobs:
probe:
name: Read account state
runs-on: ubuntu-latest
environment: build
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/webdev-deploy-build
aws-region: ap-southeast-1
- name: Identity + inventory
run: |
echo '--- caller:'
aws sts get-caller-identity --query Account --output text || true
echo '--- ECR repositories:'
aws ecr describe-repositories --query 'repositoryNames' --output text || true
echo '--- CFN stacks (ap-southeast-1):'
aws cloudformation list-stacks \
--stack-status-filter CREATE_COMPLETE UPDATE_COMPLETE CREATE_IN_PROGRESS ROLLBACK_IN_PROGRESS UPDATE_IN_PROGRESS \
--query 'StackSummaries[?starts_with(StackId,`arn:aws:cloudformation:ap-southeast-1`) || not_contains(StackId, `us-east-1`)].StackName' \
--output text || true
echo '--- CFN stacks (us-east-1):'
aws cloudformation list-stacks --region us-east-1 \
--stack-status-filter CREATE_COMPLETE UPDATE_COMPLETE \
--query 'StackSummaries[].StackName' --output text || true
echo '--- SSM /webdev params:'
aws ssm describe-parameters --parameter-filters 'Key=Name,Option=BeginsWith,Values=/webdev' --query 'ParameterConfigurations[].ParameterName' --output text || true
echo '--- ECS clusters:'
aws ecs list-clusters --query 'clusterArns' --output text || true
Loading