Sha256: 9a52a22d5a3c92873a6c46b745d4c7204e612fac0f8b097816e129b667e1d35a

Contents?: true

Size: 1.96 KB

Versions: 8

Compression:

Stored size: 1.96 KB

Contents

{
  "AWSTemplateFormatVersion" : "2010-09-09",
  "Description": <%= j stack.description %>,

  "Parameters" : {
    "BaseAMIVar": {"Type": "String", "Default": "ami-ddaed3ed"},
    "InstanceAMIVar": {"Type": "String", "Default": "ami-ddaed3ed"},

    "IAMKeypairNameVar": {"Type": "String", "MinLength": "5"},

    <% stack.roles.each do |role_name| %>
      <%= j "#{role_name}RoleScriptVar" %>: {"Type": "String"},
    <% end %>

    "DBAdminUsernameVar": {"Type": "String"},
    "DBAdminPasswordVar": {"Type": "String"},

    <%= layers.map{ |layer| layer.parameter_definitions }.compact.inject({}, &:update).map{ |k, v| [k.to_json, v.to_json].join(': ') + ",\n" }.join %>

    "EnvironmentTypeVar": {"Type": "String", "Default": "development"},
    "UserDataEnvironmentVar": {"Type": "String"}
  },

  "Mappings" : {
    "CloudFrontHostedZone" : {
      "us-west-2"      : { "HostedZoneId" : "Z2FDTNDATAQYW2" }
    },

    "S3HostedZone" : {
      "us-west-2"      : { "HostedZoneId" : "Z3BJ6K6RIION7M" }
    },

    "StackZoneRecords": <%= j Hash[ *(
      stack.subdomains.map do |subdomain|
        [subdomain.logical_name, {
          "DNSName" => subdomain.to_s,
          "HostedZoneId" => subdomain.hosted_zone.id,
          "ServerCertificateARN" => subdomain.server_certificate.arn
        }]
      end
    ).flatten ] %>,

    "SubnetConfig" : {
      "VPC": {
        "CIDR": "10.0.0.0/16"
      },

      "Public": {
        "CIDR": "10.0.0.0/24",
        "AvailabilityZone": "a"
      },
      "Private": {
        "CIDR": "10.0.1.0/24",
        "AvailabilityZone": "a"
      },
      "DB": {
        "CIDR": "10.0.2.0/24",
        "AvailabilityZone": "b"
      }
    }
  },

  "Conditions" : <%= j layers.map{ |layer| layer.condition_definitions }.compact.inject({}, &:update) %>,

  "Resources" : <%= j layers.map{ |layer| layer.resource_definitions }.compact.inject({}, &:update) %>,

  "Outputs" : <%= j layers.map{ |layer| layer.output_definitions }.compact.inject({}, &:update) %>
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stacco-0.1.46 ./priv/stack.json.erb
stacco-0.1.44 ./priv/stack.json.erb
stacco-0.1.43 ./priv/stack.json.erb
stacco-0.1.42 ./priv/stack.json.erb
stacco-0.1.41 ./priv/stack.json.erb
stacco-0.1.40 ./priv/stack.json.erb
stacco-0.1.39 ./priv/stack.json.erb
stacco-0.1.38 ./priv/stack.json.erb