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

Commit 92392f1

Browse files
author
Richard H Boyd
authored
Use Query flag instead of jq tool(#39)
1 parent 5c9969c commit 92392f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ aws cloudformation wait stack-create-complete \
3131
# Get the value of the ExecutionRoleArn Output
3232
export STACK_ROLE_NAME=$(aws cloudformation describe-stacks \
3333
--stack-name domain-resource-execution-role \
34-
| jq -r '.Stacks[] | select(.StackName == "domain-resource-execution-role") | .Outputs[] | select(.OutputKey == "ExecutionRoleArn") | .OutputValue')
34+
--query "Stacks[?StackName=='domain-resource-execution-role'].Outputs[0][?OutputKey=='ExecutionRoleArn'].OutputValue" \
35+
--output text)
3536
3637
# Register the domain resource
3738
aws cloudformation register-type \
@@ -58,7 +59,8 @@ aws cloudformation wait stack-create-complete \
5859
# Get the value of the ExecutionRoleArn Output
5960
export STACK_ROLE_NAME=$(aws cloudformation describe-stacks \
6061
--stack-name repository-resource-execution-role \
61-
| jq -r '.Stacks[] | select(.StackName == "repository-resource-execution-role") | .Outputs[] | select(.OutputKey == "ExecutionRoleArn") | .OutputValue')
62+
--query "Stacks[?StackName=='repository-resource-execution-role'].Outputs[0][?OutputKey=='ExecutionRoleArn'].OutputValue" \
63+
--output text)
6264
6365
# Register the repository resource
6466
aws cloudformation register-type \

0 commit comments

Comments
 (0)