[英]What is the proper way to deploy a multi-region CloudFormation stack that includes global resources?
[英]What is the proper way to describe resources of a nested CloudFormation stack?
我們有一個CloudFormation腳本,它有四個嵌套堆棧。 我試圖描述那些嵌套堆棧的資源。 但是,當我使用其中一個嵌套堆棧的物理ID describe-stack-resources
時,它只返回“父”堆棧(誰的資源只是嵌套堆棧)。 此行為在JavaScript SDK和AWS CLI中是一致的。
我這樣做了嗎? 這是一個錯誤嗎? 有解決方法嗎?
AWS CLI請求示例:
(注意:請求的物理資源ID是返回的第二個)
aws cloudformation describe-stack-resources --physical-resource-id arn:aws:cloudformation:us-west-2:58701038XXXX:stack/pelorus-vk-DatabaseStack-W12E3SAXPG6K/b0197770-7519-11e6-9518-50aXXXXXca9a
{
"StackResources": [
{
"StackId": "arn:aws:cloudformation:us-west-2:58701038XXXX:stack/pelorus-vk/f93b5960-7518-11e6-8939-XXXXX0f2ad1e",
"ResourceStatus": "UPDATE_COMPLETE",
"ResourceType": "AWS::CloudFormation::Stack",
"Timestamp": "2016-09-07T16:53:11.305Z",
"StackName": "pelorus-vk",
"PhysicalResourceId": "arn:aws:cloudformation:us-west-2:58701038XXXX:stack/pelorus-vk-DashboardStack-1GDLBCAFE6U3F/fb9c53d0-7518-11e6-bd48-50dXXXXX84d2",
"LogicalResourceId": "DashboardStack"
},
{
"StackId": "arn:aws:cloudformation:us-west-2:58701038XXXX:stack/pelorus-vk/f93b5960-7518-11e6-8939-XXXXX0f2ad1e",
"ResourceStatus": "CREATE_COMPLETE",
"ResourceType": "AWS::CloudFormation::Stack",
"Timestamp": "2016-09-07T16:53:04.667Z",
"StackName": "pelorus-vk",
"PhysicalResourceId": "arn:aws:cloudformation:us-west-2:58701038XXXX:stack/pelorus-vk-DatabaseStack-W12E3SAXPG6K/b0197770-7519-11e6-9518-50aXXXXXca9a",
"LogicalResourceId": "DatabaseStack"
},
{
"StackId": "arn:aws:cloudformation:us-west-2:58701038XXXX:stack/pelorus-vk/f93b5960-7518-11e6-8939-XXXXX0f2ad1e",
"ResourceStatus": "UPDATE_COMPLETE",
"ResourceType": "AWS::CloudFormation::Stack",
"Timestamp": "2016-09-07T16:53:13.293Z",
"StackName": "pelorus-vk",
"PhysicalResourceId": "arn:aws:cloudformation:us-west-2:58701038XXXX:stack/pelorus-vk-EventProcessingStack-GB814FASNNV4/fb8f3470-7518-11e6-a2c5-503XXXXXadae",
"LogicalResourceId": "EventProcessingStack"
},
{
"StackId": "arn:aws:cloudformation:us-west-2:587010381366:stack/pelorus-vk/f93b5960-7518-11e6-8939-XXXXX0f2ad1e",
"ResourceStatus": "UPDATE_COMPLETE",
"ResourceType": "AWS::CloudFormation::Stack",
"Timestamp": "2016-09-07T16:53:11.496Z",
"StackName": "pelorus-vk",
"PhysicalResourceId": "arn:aws:cloudformation:us-west-2:587010381366:stack/pelorus-vk-StreamStack-NAA3DJMELCFG/04990c30-7519-11e6-934e-50aXXXXX12f2",
"LogicalResourceId": "StreamStack"
}
]
}
一個潛在的解決方法:使用--stack-name
替換--physical-resource-id
導致我預期的行為,即使我提供了物理ID
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.