{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "Creates all of the Elastic Beanstalk resouces to deploy portal-prod-226-0", "Parameters": { "AwsKey": { "Description": "Depricated. Will be removed", "Type": "String", "NoEcho": true }, "AwsSecret": { "Description": "Depricated. Will be removed", "Type": "String", "NoEcho": true }, "EncryptionKey": { "Description": "Depricated. Will be removed", "Type": "String", "NoEcho": true } }, "Resources": { "PortalProd2260Version": { "Type": "AWS::ElasticBeanstalk::ApplicationVersion", "Properties": { "ApplicationName": {"Fn::ImportValue": "us-east-1-prod-226-shared-resources-Beanstalk-Application-Name"}, "Description": "Artifact for portal-prod-226-0", "SourceBundle": { "S3Bucket": "prod-configuration.sagebase.org", "S3Key": "versions/portal/portal-226.0-1-g35e12f028.war" } } }, "PortalProd2260Tempalte": { "Type": "AWS::ElasticBeanstalk::ConfigurationTemplate", "Properties": { "ApplicationName": {"Fn::ImportValue": "us-east-1-prod-226-shared-resources-Beanstalk-Application-Name"}, "Description": "ConfigurationTemplate for portal-prod-226-0", "SolutionStackName": "64bit Amazon Linux 2018.03 v2.8.0 running Tomcat 8 Java 8", "OptionSettings": [ { "Namespace": "aws:autoscaling:asg", "OptionName": "Cooldown", "Value": "360" }, { "Namespace": "aws:autoscaling:asg", "OptionName": "MinSize", "Value": "4" }, { "Namespace": "aws:autoscaling:asg", "OptionName": "MaxSize", "Value": "8" }, { "Namespace": "aws:autoscaling:launchconfiguration", "OptionName": "EC2KeyName", "Value": "prod-key-pair" }, { "Namespace": "aws:autoscaling:launchconfiguration", "OptionName": "IamInstanceProfile", "Value": "prod-s3-log-rolling" }, { "Namespace": "aws:autoscaling:launchconfiguration", "OptionName": "InstanceType", "Value": "m1.small" }, { "Namespace": "aws:autoscaling:launchconfiguration", "OptionName": "MonitoringInterval", "Value": "1 minute" }, { "Namespace": "aws:autoscaling:launchconfiguration", "OptionName": "SecurityGroups", "Value": {"Fn::ImportValue": "us-east-1-prod-226-shared-resources-Beanstalk-Security-Group-ID"} }, { "Namespace": "aws:autoscaling:launchconfiguration", "OptionName": "SSHSourceRestriction", "Value": {"Fn::Join": [ ",", [ "tcp,22,22", {"Fn::ImportValue": "us-east-1-synapse-prod-vpc-VpnCidr"} ] ]} }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "BreachDuration", "Value": "10" }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "LowerBreachScaleIncrement", "Value": "-1" }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "LowerThreshold", "Value": "60" }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "MeasureName", "Value": "CPUUtilization" }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "Period", "Value": "10" }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "Statistic", "Value": "Average" }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "Unit", "Value": "Percent" }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "UpperBreachScaleIncrement", "Value": "1" }, { "Namespace": "aws:autoscaling:trigger", "OptionName": "UpperThreshold", "Value": "90" }, { "Namespace": "aws:ec2:vpc", "OptionName": "VPCId", "Value": {"Fn::ImportValue": "us-east-1-synapse-prod-vpc-VPCId"} }, { "Namespace": "aws:ec2:vpc", "OptionName": "Subnets", "Value": {"Fn::ImportValue": "us-east-1-synapse-prod-vpc-Red-Private-Subnets"} }, { "Namespace": "aws:ec2:vpc", "OptionName": "ELBSubnets", "Value": {"Fn::ImportValue": "us-east-1-synapse-prod-vpc-Public-Subnets"} }, { "Namespace": "aws:ec2:vpc", "OptionName": "AssociatePublicIpAddress", "Value": "false" }, { "Namespace": "aws:elasticbeanstalk:environment", "OptionName": "EnvironmentType", "Value": "LoadBalanced" }, { "Namespace": "aws:elasticbeanstalk:environment", "OptionName": "LoadBalancerType", "Value": "classic" }, { "Namespace": "aws:elasticbeanstalk:application", "OptionName": "Application Healthcheck URL", "Value": "/" }, { "Namespace": "aws:elasticbeanstalk:sns:topics", "OptionName": "Notification-Endpoint", "Value": {"Fn::ImportValue": "us-east-1-prod-226-shared-resources-DB-SNS-Topic-ID"} }, { "Namespace": "aws:elb:healthcheck", "OptionName": "HealthyThreshold", "Value": "3" }, { "Namespace": "aws:elb:healthcheck", "OptionName": "Interval", "Value": "30" }, { "Namespace": "aws:elb:healthcheck", "OptionName": "Timeout", "Value": "5" }, { "Namespace": "aws:elb:healthcheck", "OptionName": "UnhealthyThreshold", "Value": "5" }, { "Namespace": "aws:elb:loadbalancer", "OptionName": "CrossZone", "Value": "false" }, { "Namespace": "aws:elb:loadbalancer", "OptionName": "SecurityGroups", "Value": {"Fn::ImportValue": "us-east-1-prod-226-shared-resources-Load-Balancer-Security-Group-ID"} }, { "Namespace": "aws:elb:listener:443", "OptionName": "ListenerProtocol", "Value": "HTTPS" }, { "Namespace": "aws:elb:listener:443", "OptionName": "InstancePort", "Value": "80" }, { "Namespace": "aws:elb:listener:443", "OptionName": "InstanceProtocol", "Value": "HTTP" }, { "Namespace": "aws:elb:listener:443", "OptionName": "SSLCertificateId", "Value": "arn:aws:acm:us-east-1:325565585839:certificate/d65c54e0-6389-4025-ac29-9c5c7a5d3fd6" }, { "Namespace": "aws:elb:listener:443", "OptionName": "ListenerEnabled", "Value": "true" }, { "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", "OptionName": "Xms", "Value": "256m" }, { "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", "OptionName": "Xmx", "Value": "1024m" }, { "Namespace": "aws:elasticbeanstalk:application:environment", "OptionName": "AWS_ACCESS_KEY_ID", "Value": {"Ref": "AwsKey"} }, { "Namespace": "aws:elasticbeanstalk:application:environment", "OptionName": "AWS_SECRET_KEY", "Value": {"Ref": "AwsSecret"} }, { "Namespace": "aws:elasticbeanstalk:application:environment", "OptionName": "PARAM1", "Value": "https://s3.amazonaws.com/prod-configuration.sagebase.org/Stack/prod226-stack.properties" }, { "Namespace": "aws:elasticbeanstalk:application:environment", "OptionName": "PARAM2", "Value": {"Ref": "EncryptionKey"} }, { "Namespace": "aws:elasticbeanstalk:application:environment", "OptionName": "PARAM3", "Value": "prod" }, { "Namespace": "aws:elasticbeanstalk:application:environment", "OptionName": "PARAM4", "Value": "226" } ] } }, "PortalProd2260": { "Type": "AWS::ElasticBeanstalk::Environment", "Properties": { "ApplicationName": {"Fn::ImportValue": "us-east-1-prod-226-shared-resources-Beanstalk-Application-Name"}, "CNAMEPrefix": "portal-prod-226-0-synapse-org", "Description": "Environment for portal-prod-226-0", "EnvironmentName": "portal-prod-226-0", "TemplateName": {"Ref": "PortalProd2260Tempalte"}, "VersionLabel": {"Ref": "PortalProd2260Version"} } }, "PortalProd2260CNAME": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneName": "synapse.org.", "Name": "portal-prod-226-0.synapse.org.", "ResourceRecords": ["portal-prod-226-0-synapse-org.us-east-1.elasticbeanstalk.com"], "TTL": "300", "Type": "CNAME" } } } }