-
Notifications
You must be signed in to change notification settings - Fork 0
/
sc-elasticbeanstalk-dotnet-rds-ra.json
248 lines (246 loc) · 7.59 KB
/
sc-elasticbeanstalk-dotnet-rds-ra.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS Elastic Beanstalk Windows .NET application for Service Catalog. (fdp-1qj64b3gm)",
"Metadata": {
"Source":"https://github.com/aws-samples/aws-service-catalog-reference-architectures/blob/master/elasticbeanstalk/sc-elasticbeanstalk-ra.json",
"AWS::CloudFormation::Interface": {
"ParameterGroups": [
{
"Label": {
"default": "Code Source"
},
"Parameters": [
"S3Bucket",
"S3SourceBundle"
]
},{
"Label": {
"default": "Elastic Beanstalk Options"
},
"Parameters": [
"ApplicationName",
"DBMasterUserPassword",
"SolutionStackName",
"CNAMEPrefix",
"ClusterMinInstances",
"ClusterMaxInstances"
]
}
]
}
},
"Parameters": {
"S3Bucket":{
"Type": "String",
"Description": "Enter the name of the S3 bucket that the application source bundle is in."
},
"S3SourceBundle":{
"Type": "String",
"Description": "Enter name of application bundle within the selected S3 Bucket. Example MyApp.Zip."
},
"SolutionStackName":{
"Type": "String",
"Description": "Enter the name of the solution stack. A list of available Solution Stacks can be found here:https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html .",
"Default":"64bit Windows Server Core 2019 v2.5.9 running IIS 10.0"
},
"ApplicationName":{
"Type": "String",
"Description": "The name of the Elastic Beanstalk Application"
},
"ClusterMinInstances":{
"Description":"Minimum number of cluster instances for autoscaling",
"Type": "Number",
"Default": 1,
"AllowedValues": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},"ClusterMaxInstances":{
"Description":"Maximum number of cluster instances for autoscaling",
"Type": "Number",
"Default": 4,
"AllowedValues": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"CNAMEPrefix": {
"Type":"String",
"Description":"(Optional) The Domaain name prefix for the Elastic Beanstalk URL. Leave this blank to use an autogenerated value.",
"Default":""
},
"DBMasterUserPassword": {
"Description": "The password for the database user. The password can include any printable ASCII character except \"/\", \"\"\", or \"@\".",
"NoEcho": true,
"Type": "String",
"MinLength": "12",
"MaxLength": "41",
"AllowedPattern": "^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?\\d)(?=.*?(_|\\W))(?=.*?\\s)?.{8,}$",
"ConstraintDescription": "Minimum 12 characters, at least one of each of the following: uppercase, lowercase, number, and symbol character such as !@#$%^&*()<>[]{}|_+-=."
}
},
"Conditions":{
"CondCNAMEPrefix" : {"Fn::Not" : [ {"Fn::Equals" : [{"Ref" : "CNAMEPrefix"}, ""]} ]}
},
"Resources": {
"sampleApplication": {
"Type": "AWS::ElasticBeanstalk::Application",
"Properties": {
"ApplicationName" : {"Ref":"ApplicationName"},
"Description": "AWS Elastic Beanstalk Sample Service Catalog"
}
},
"sampleApplicationVersion": {
"Type": "AWS::ElasticBeanstalk::ApplicationVersion",
"Properties": {
"ApplicationName": { "Ref": "sampleApplication" },
"Description": "AWS Elastic Beanstalk Sample Service Catalog Version",
"SourceBundle": {
"S3Bucket": { "Ref" : "S3Bucket" },
"S3Key": { "Ref" : "S3SourceBundle" }
}
}
},
"elasticbeanstalkec2role": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"ec2.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
},
"ManagedPolicyArns": [
"arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier",
"arn:aws:iam::aws:policy/AWSElasticBeanstalkMulticontainerDocker",
"arn:aws:iam::aws:policy/AWSElasticBeanstalkWorkerTier"
],
"Path": "/"
}
},
"ElasticBeanstalkInstanceProfile": {
"Type": "AWS::IAM::InstanceProfile",
"Properties": {
"Path": "/",
"Roles": [
{"Ref": "elasticbeanstalkec2role"}
]
}
},
"sampleConfigurationTemplate": {
"Type": "AWS::ElasticBeanstalk::ConfigurationTemplate",
"Properties": {
"ApplicationName": { "Ref": "sampleApplication" },
"Description": "AWS ElasticBeanstalk Sample Configuration Template Service Catalog",
"OptionSettings": [
{
"Namespace": "aws:autoscaling:asg",
"OptionName": "MinSize",
"Value": {"Ref":"ClusterMinInstances"}
},
{
"Namespace": "aws:autoscaling:asg",
"OptionName": "MaxSize",
"Value": {"Ref":"ClusterMaxInstances"}
},
{
"Namespace": "aws:elasticbeanstalk:environment",
"OptionName": "EnvironmentType",
"Value": "LoadBalanced"
},
{
"Namespace": "aws:autoscaling:launchconfiguration",
"OptionName": "IamInstanceProfile",
"Value": { "Ref":"ElasticBeanstalkInstanceProfile"}
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "DBInstanceClass",
"Value": "db.t2.micro"
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "DBEngine",
"Value": "sqlserver-web"
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "DBAllocatedStorage",
"Value": "50"
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "MultiAZDatabase",
"Value": "false"
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "DBPassword",
"Value": {"Ref":"DBMasterUserPassword"}
},
{
"Namespace": "aws:rds:dbinstance",
"OptionName": "DBUser",
"Value": "ebroot"
}
],
"SolutionStackName": { "Ref": "SolutionStackName" }
}
},
"sampleEnvironment": {
"Type": "AWS::ElasticBeanstalk::Environment",
"Properties": {
"ApplicationName": { "Ref": "sampleApplication" },
"Description": "AWS ElasticBeanstalk Sample Environment",
"VersionLabel": { "Ref": "sampleApplicationVersion" },
"TemplateName":{ "Ref": "sampleConfigurationTemplate" },
"EnvironmentName":{"Fn::Sub":"EB-ENV-${ApplicationName}"},
"CNAMEPrefix":{ "Fn::If" : [
"CondCNAMEPrefix",
{"Ref" : "CNAMEPrefix"},
{"Ref" : "AWS::NoValue"}
]
}
}
}
},
"Outputs": {
"LoadBalancerURL" :{
"Value": {"Fn::Sub": ["http://${endpoint}", {"endpoint": { "Fn::GetAtt": ["sampleEnvironment","EndpointURL"]}} ]}
},
"ElasticBeanstalkURL" :{
"Value": {"Fn::Sub": "http://${CNAMEPrefix}.${AWS::Region}.elasticbeanstalk.com" },
"Condition":"CondCNAMEPrefix"
},
"ApplicationName":{
"Value":{ "Ref": "sampleApplication" }
},
"EnvironmentName":{
"Value": {"Fn::Sub":"EB-ENV-${sampleApplication}"}
}
}
}