Passing Parameters in Nested Cloud Formation templates

I am calling CFT2 from CFT1 and I am passing a list of parameters.I recently came to know that we cant pass comma delimited list of parameters, so I am looking how to achieve that solution . This is my CFT1 :

{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Top Stack",
   "Resources": {
   "ChildStack01": {
           "Type" : "AWS::CloudFormation::Stack",
           "Properties" : {
               "TemplateURL": "https://s3.amazonaws.com/tbdchef/frontend1.json",
               "Parameters": {
                "AvailabilityZone1a": {
                    "Default": "us-east-1a",
                    "Description": "us-east-1a",
                    "Type": "String"
                },
                "AvailabilityZone1b": {
                    "Default": "us-east-1b",
                    "Description": "us-east-1b",
                    "Type": "String"
                },
                "ChefDevSNSTopic": {
                    "Description": "ARNforSNSTopic",
                    "Type": "String",
                    "Default": "arn:aws:sns:us-east-1:093937234853:Enterprise_Monitoring_SNS_Horizontal"
                }
               },
              "TimeoutInMinutes" : "5"
           }
        }
    }
}

The error I am getting :

Value of property Parameters must be an object with String (or simple type) properties

Is there a way I can pass these values to CFT2?

Answers


You can pass this in this way

{
"AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "KeyName": {
            "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance",
            "Type": "AWS::EC2::KeyPair::KeyName",
            "ConstraintDescription": "must be the name of an existing EC2 KeyPair."
        },
    },
    "Resources": {
        "ChildStack01": {
           "Type" : "AWS::CloudFormation::Stack",
           "Properties" : {
               "TemplateURL": "https://s3.amazonaws.com/tbdchef/frontend1.json",
               "Parameters": {
                         "KName":  { "Ref" : "KeyName" }
                }
            }
        }
    }
}

And then again defining the parameter KName in CFT2

{
   "AWSTemplateFormatVersion": "2010-09-09",
   "Parameters": {
        "KName": {
            "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance",
            "Type": "AWS::EC2::KeyPair::KeyName",
            "ConstraintDescription": "must be the name of an existing EC2 KeyPair."
        }
    }
}

Need Your Help

Zend Auth - Using two tables

php zend-framework zend-auth

I'm currently developing a website in Zend Framework wich uses Zend_Auth. The current design of the database is the following:

Disallowing Custom Attributes Together

.net custom-attributes

Is there a design-time mechanism to check if two attributes are being applied to the same object?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.