@@ -335,9 +335,10 @@ jobs:
335335 id : create-markdown-cs
336336 uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
337337 with :
338+ mode : " create-only"
338339 name : test-markdown-${{ github.run_number }}
339- template : markdown-test-template.yaml
340- parameter-overrides : " Environment=gamma " # Change parameter to trigger update
340+ template : markdown-test-template-updated .yaml
341+ parameter-overrides : " Environment=test "
341342
342343 - name : Verify markdown output format
343344 run : |
@@ -462,27 +463,36 @@ jobs:
462463 role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
463464 aws-region : us-east-1
464465
465- - name : Test stack creation with ID retrieval
466- id : create-stack
466+ - name : Test stack creation that fails to retrieve stack ID
467+ id : create-failing- stack
467468 uses : aws-actions/aws-cloudformation-github-deploy@v2.0.0-beta
468469 with :
469- name : test-stack-id-${{ github.run_number }}
470- template : stack.yaml
471- parameter-overrides : " Environment=beta"
470+ name : test-failing-stack-id-${{ github.run_number }}
471+ template : failing-stack.yaml
472+ parameter-overrides : " Environment=test"
473+ continue-on-error : true
472474
473- - name : Verify stack ID format
475+ - name : Verify stack ID retrieval on failure
474476 run : |
475- STACK_ID="${{ steps.create-stack.outputs.stack-id }}"
477+ STACK_ID="${{ steps.create-failing- stack.outputs.stack-id }}"
476478 echo "Stack ID: $STACK_ID"
479+ echo "Deployment outcome: ${{ steps.create-failing-stack.outcome }}"
477480
478- if [[ $STACK_ID == arn:aws:cloudformation:* ]]; then
479- echo "✅ Stack ID is in correct ARN format"
481+ # For failed deployments, we should get a stack ID (ARN) for debugging
482+ if [[ "${{ steps.create-failing-stack.outcome }}" == "failure" ]]; then
483+ if [[ $STACK_ID == arn:aws:cloudformation:* ]]; then
484+ echo "✅ Stack ID retrieved successfully for failed deployment"
485+ # Verify we can access the failed stack for debugging
486+ aws cloudformation describe-stacks --stack-name "$STACK_ID"
487+ echo "✅ Failed stack is accessible for debugging"
488+ else
489+ echo "❌ Expected stack ARN for failed deployment, got: $STACK_ID"
490+ exit 1
491+ fi
480492 else
481- echo "❌ Stack ID format is incorrect: $STACK_ID "
493+ echo "❌ Expected deployment to fail for this test "
482494 exit 1
483495 fi
484-
485- aws cloudformation describe-stacks --stack-name "$STACK_ID"
486496
487497 test-execute-only-with-events :
488498 runs-on : ubuntu-latest
0 commit comments