I am not a JSON expert but I was able to manipulate the AWS Beanstalk VPC cloudformation template to pull a .WAR file from S3 and deploy as a new application. I also manipulated the script to create 2 additional subnets 1 for public and the other for private as opposed to the original script which only created 2 subnets. I am having an issue with the below piece of code. I need to manipulate so the EC2 instance and ELB use the additional subnets I created in the script.So for the value Subnets I will need to add PrivateSubnet and PrivateSubnet2. The same will be the same for the ELBs value.
"SampleEnvironment" : {
"Type" : "AWS::ElasticBeanstalk::Environment",
"Properties" : {
"ApplicationName" : { "Ref" : "SampleApplication" },
"EnvironmentName" : "Sandbox",
"Description" : "AWS Elastic Beanstalk Environment running Python Sample Application",
"SolutionStackName" : "64bit Amazon Linux 2014.02 running Tomcat 7 Java 7",
"OptionSettings" : [
{"Namespace" : "aws:autoscaling:launchconfiguration", "OptionName" : "SSHSourceRestriction", "Value" : { "Fn::Join" : [ "", ["tcp,22,22,", { "Ref" : "BastionSecurityGroup" }]]}},
{"Namespace" : "aws:autoscaling:launchconfiguration", "OptionName" : "SecurityGroups", "Value" : { "Ref" : "BeanstalkSecurityGroup" }},
{"Namespace" : "aws:autoscaling:launchconfiguration", "OptionName" : "EC2KeyName", "Value" : { "Ref" : "InstanceKeyName" }},
{"Namespace" : "aws:ec2:vpc", "OptionName" : "VPCId", "Value" : { "Ref" : "VPC" }},
{"Namespace" : "aws:ec2:vpc", "OptionName" : "Subnets", "Value" : { "Ref" : "PrivateSubnet" }},
{"Namespace" : "aws:ec2:vpc", "OptionName" : "ELBSubnets", "Value" : { "Ref" : "PublicSubnet" }}],
"VersionLabel" : "Initial Version"
}
}
},
Any help will be appreciated..