【发布时间】:2018-10-27 15:06:00
【问题描述】:
我知道我可以通过以下方式获得堆栈资源:-
aws cloudformation describe-stack-resources \
--stack-name MYSTACKNAME \
--query 'StackResources[*].{Type:ResourceType,LogicalID:LogicalResourceId}' \
--output table
如果我的堆栈仅包含 NESTED STACKS,我如何获取 Cloudformation 中堆栈的所有嵌套堆栈的资源?
我可以看到如何查询我的父堆栈的所有堆栈。
aws cloudformation list-stacks \
--query 'StackSummaries[?contains(StackName, `MYSTACKNAME`) && (StackStatus==`CREATE_COMPLETE`||StackStatus==`UPDATE_COMPLETE`)].{Stack:StackName}' \
--output json
我不知道如何使用它来提供仅显示单个值的 describe-stack-resources。
我可以将它构建到一个 python 脚本中,但我想我会先检查一下。
谢谢
【问题讨论】:
标签: amazon-web-services amazon-cloudformation