Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 91d7fd0

Browse files
authored
Merge pull request #14 from alphagov/f/PLAT-1668
Make sure the stack instance is complete before moving on
2 parents 119103e + 97f023e commit 91d7fd0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/publish-stack-set-to-service-catalog.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ jobs:
117117
done
118118
# Create the new stack instance using the new stack set
119119
aws cloudformation create-stack-instances --stack-set-name di-devplat-obv-dynatrace-iam-${{ steps.hyphenate-version.outputs.release }} --regions eu-west-2 --accounts $account_id
120+
# Make sure creation is complete before moving on
121+
status=$(aws cloudformation describe-stack-instance --stack-set-name di-devplat-obv-dynatrace-iam-${{ steps.hyphenate-version.outputs.release }} --stack-instance-account $account_id --stack-instance-region eu-west-2 --query "StackInstance.StackInstanceStatus.DetailedStatus" | tr -d '"')
122+
while [[ $status != "SUCCEEDED" ]]
123+
do
124+
sleep 3
125+
status=$(aws cloudformation describe-stack-instance --stack-set-name di-devplat-obv-dynatrace-iam-${{ steps.hyphenate-version.outputs.release }} --stack-instance-account $account_id --stack-instance-region eu-west-2 --query "StackInstance.StackInstanceStatus.DetailedStatus" | tr -d '"')
126+
done
120127
done
121128
122129
# Delete the old stack set

0 commit comments

Comments
 (0)