Skip to content

Commit 481a7c9

Browse files
PetrHeinzclaude
andauthored
T-22776 [CI] Print the validation errors when the stack fails to create (#17)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3f60224 commit 481a7c9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎.github/workflows/e2e.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ jobs:
237237
if ! aws cloudformation wait stack-create-complete --stack-name "$STACK_NAME"; then
238238
echo "::error::stack creation failed: $(aws cloudformation describe-stacks --stack-name "$STACK_NAME" --query 'Stacks[0].StackStatus' --output text)"
239239
aws cloudformation describe-stack-events --stack-name "$STACK_NAME" --query "StackEvents[?ends_with(ResourceStatus, 'FAILED')].[LogicalResourceId,ResourceStatus,ResourceStatusReason]" --output table
240+
# The stack events only say "Validation failed with N error(s)" when the pre-deployment validation fails.
241+
aws cloudformation describe-events --stack-name "$STACK_NAME" --filters FailedEvents=true \
242+
--query "OperationEvents[?EventType=='VALIDATION_ERROR'].[LogicalResourceId,ResourceType,ValidationName,ValidationPath,ValidationStatusReason]" --output table
240243
exit 1
241244
fi
242245
OUTPUTS=$(aws cloudformation describe-stacks --stack-name "$STACK_NAME" --query 'Stacks[0].Outputs' --output json)

0 commit comments

Comments
 (0)