【问题标题】:Nested cloud formation - Passing nested stack templates into main template嵌套云形成 - 将嵌套堆栈模板传递到主模板
【发布时间】:2016-10-08 19:04:04
【问题描述】:

我有一个超过 3000 行的复杂模板。

main.json 有:

     {
       "AWSTemplateFormatVersion": "2010-09-09",
       "Parameters": {
               "param1": {
               },
               "param2": {
               },
       }
     },
        "mappings": {
         },
        "Resources": {
             "TemplateURL": "http://s3.aws.com/EC2_resource.json"
             "TemplateURL": "http://s3.aws.com/ECS_resource.json"
         }, 
         "Outputs": {
         }, 
         "Conditions": {
        }
     }

 EC2_resource.json
  {
     "AWSTemplateFormatVersion": "2010-09-09",
     "Description": "RDS DBInstance",
     "Resources": {
          "EC2_resource":{
           }
       }
     } 
 }

我认为这可能会奏效。不确定我做错了什么或我错过了什么。我遵循了这个 github 项目中提供的指导方针 这是一个链接:

Link to github example

让我想想。我猜上面描述的可能是错的?

谢谢!

【问题讨论】:

    标签: templates amazon-web-services nested amazon-cloudformation


    【解决方案1】:

    您需要将这些模板 URL 放入 Cloudformation 堆栈类型资源中。如本文档所述:docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html

    一个非常简单的例子:http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-cloudformation.html#d0e17025

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-18
      • 2021-12-29
      • 2013-09-02
      • 2018-08-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多