[英]How to import cloudformation stack output inside another stack parameter?
We are trying to import the output value of the base stack into the new stack parameter rather than the resource itself.我们正在尝试将基本堆栈的 output 值导入新的堆栈参数而不是资源本身。 Please help us to achieve that.
请帮助我们实现这一目标。
BASE STACK - Below is the output defined in the base stack BASE STACK - 下面是在 base stack 中定义的 output
Outputs:
Asset:
Value:
Ref: Asset
Export:
Name:
'Fn::Sub': '${AWS::StackName}-Asset'
We would like to import this value into the new stack but the CFN is throwing an error that Every Default member must be a string .我们想将此值导入新堆栈,但 CFN 抛出 Every Default member must be a string的错误。
NEW STACK新堆栈
Parameters:
BaseStackNameParameter:
Type: String
Default: assetstack
AssetVal:
Type: String
Default: !ImportValue
'Fn::Sub': '${BaseStackNameParameter}-Asset'
The error is correct.错误是正确的。 You can't do this .
你不能这样做。 Such functionality is not supported by CloudFormation.
CloudFormation 不支持此类功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.