[英]AWS CloudFormation - Import condition from other template
模板A是否可以导入模板B中定义的条件?
No. You cannot import 'Conditions". The only thing you can import is the output variables (Exports using "Export" : { "Name" : "Value"}
) from another Cloudformation (CF) template using Fn::ImportValue
. 不可以,您不能导入'Conditions'。您唯一可以导入的是使用
Fn::ImportValue
从另一个Cloudformation(CF)模板输出的输出变量(使用"Export" : { "Name" : "Value"}
导出)。
If you can configure the CF template A to output a variable based on internal condition, CF template B could conditionally evaluate its value imported within, to differentiate its output. 如果可以将CF模板A配置为根据内部条件输出变量,则CF模板B可以有条件地评估其内部导入的值,以区分其输出。
You can use the intrinsic function Fn::ImportValue
in template A to import some values from another template B. In template B use the "Export" : { "Name" : "Value"}
in the Outputs
section to export that value. 您可以在模板A中使用内部函数
Fn::ImportValue
从另一个模板B导入一些值。在模板B中,使用Outputs
部分中的"Export" : { "Name" : "Value"}
导出该值。 For more details see the aws docs 有关更多详细信息,请参见aws文档。
AWS Cloudformation Import and Export Values AWS Cloudformation导入和导出值
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.