Skip to content

Instantly share code, notes, and snippets.

@misterjunio
Last active January 21, 2020 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save misterjunio/8323d90dea5744c79d279a7e906f08b7 to your computer and use it in GitHub Desktop.
Save misterjunio/8323d90dea5744c79d279a7e906f08b7 to your computer and use it in GitHub Desktop.
AWS CFN - get GG group ID output
if GG_GROUP_ID=$(aws cloudformation describe-stacks \
--stack-name iot-$BUILD_ENV-core$GROUP_ID \
--query "Stacks[0].Outputs[?OutputKey=='GroupId'].OutputValue" \
--output text --region $AWS_REGION) &&
[ $GG_GROUP_ID != 'None' ]
then
echo "Forcing reset deployments for existing GG group with ID $GG_GROUP_ID..."
aws greengrass reset-deployments --group-id $GG_GROUP_ID --force --region $AWS_REGION
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment