【问题标题】:Finding referencing variables on Cloud formation template Fn:ImportValue在 Cloudformation 模板 Fn:ImportValue 中查找引用变量
【发布时间】:2020-08-06 14:44:06
【问题描述】:

我遇到了我们现有的 AWS Infra CF 模板之一,我在下面找到了 sn-p

 "SubnetId" : { "Fn::ImportValue" : "hw-const-GreenBSubnet" },
        "SecurityGroupIds": [
          { "Fn::ImportValue" : "hw-const-InfraSg" },
          { "Fn::ImportValue" : "hw-const-HttpsAllSg" },

我不明白变量 hw-const-InfraSg 是在阅读文档后导出的其他一些堆栈输出,但是如果我不知道创建的堆栈,我如何才能找到可变 hw-const-InfraSg 的值它。

这些变量是否可以在其他地方配置,请指教。

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation


    【解决方案1】:

    有几种方法。你可以使用 CLI 来list existing exports:

    aws cloudformation list-exports
    

    或者您可以转到 CloudFormation 控制台。在控制台中有专门的菜单 Exports 列出并允许您搜索所有导出及其值:

    【讨论】:

    • 谢谢你的帮助。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-03-21
    • 2021-04-22
    • 2015-12-08
    • 2019-11-10
    • 1970-01-01
    • 2022-11-15
    • 2013-08-04
    相关资源
    最近更新 更多