-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsamples-simple-http-server-wrapper.yml
192 lines (172 loc) · 5.24 KB
/
samples-simple-http-server-wrapper.yml
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
AWSTemplateFormatVersion: '2010-09-09'
Description: ASG of Apache HTTP Server with ALB and CloudWatch Agent
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Application Environment
Parameters:
- pEnvPurpose
- Label:
default: Application Ownership
Parameters:
- pOwnerEmail
- Label:
default: Cost Accounting
Parameters:
- pCostCenter
- Label:
default: Organization
Parameters:
- pOrg
- Label:
default: Network
Parameters:
- pVpcId
- pAlbSubnetId1
- pAlbSubnetId2
- pWebSubnetId1
- pWebSubnetId2
- Label:
default: Load Balancer
Parameters:
- pAlbIngressCidr
- pAlbIngressPrefixListId
- Label:
default: Auto Scaling
Parameters:
- pServerCount
- pInstanceType
- Label:
default: Data and Privacy Classification
Parameters:
- pDataClass
- pPrivacyClass
- Label:
default: Template Repository
Parameters:
- pArtifactBucket
ParameterLabels:
pEnvPurpose:
default: Environment Purpose (10 characters or less)
pCostCenter:
default: Enterprise Standard Cost Center (nnnnnn)
pVpcId:
default: VPC ID
pAlbSubnetId1:
default: ALB Subnet ID 1
pAlbSubnetId2:
default: ALB Subnet ID 2
pWebSubnetId1:
default: Web Server Subnet ID 1
pWebSubnetId2:
default: Web Server Subnet ID 2
pOrg:
default: Business Scope
pAlbIngressCidr:
default: Application Load Balancer (ALB) Allowed Ingress CIDR IP Range
pAlbIngressPrefixListId:
default: Application Load Balancer (ALB) Allowed Prefix List ID
pServerCount:
default: Number of EC2 Instances
pInstanceType:
default: EC2 Instance Type
pDataClass:
default: Standard Data Classification
pPrivacyClass:
default: Standard Privacy Classification
pArtifactBucket:
default: Template Repository
Parameters:
pEnvPurpose:
Type: String
Description: Used to qualify resource names. 10 characters max.
AllowedPattern: '^[a-zA-Z0-9-_]{1,10}$'
pVpcId:
Description: ID of existing VPC
Type: AWS::EC2::VPC::Id
pAlbSubnetId1:
Description: ID of 1 of 2 subnets in which ALB is to be deployed
Type: AWS::EC2::Subnet::Id
pAlbSubnetId2:
Description: ID of 2 of 2 subnets in which ALB is to be deployed
Type: AWS::EC2::Subnet::Id
pWebSubnetId1:
Description: ID or 1 or 2 subnets in which web server is to be deployed
Type: AWS::EC2::Subnet::Id
pWebSubnetId2:
Description: ID or 3 or 2 subnets in which web server is to be deployed
Type: AWS::EC2::Subnet::Id
pOrg:
Type: String
Description: Used to qualify resource tag names
Default: acme
pAlbIngressCidr:
Description: IP address range that can be used to access the ALB
Type: String
Default: ''
pAlbIngressPrefixListId:
Description: ID of the prefix list representing the service that can be used to access the ALB
Type: String
Default: ''
pServerCount:
Description: Number of Amazon EC2 instances to launch for the web server
Type: Number
Default: '1'
pInstanceType:
Description: WebServer EC2 instance type
Type: String
Default: t3a.micro
AllowedValues:
- t3a.micro
- t3a.small
- t3a.medium
ConstraintDescription: must be a valid EC2 instance type.
pOwnerEmail:
Type: String
Description: Email address of individiual or distribution list
AllowedPattern: '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'
pCostCenter:
Type: String
Description: Standard cost center
AllowedPattern: '[0-9]{6}'
pDataClass:
Type: String
Description: Standard data classification
Default: internal
pPrivacyClass:
Type: String
Description: Standard data privacy risk classification
Default: low
pArtifactBucket:
Type: String
Description: Name of existing S3 bucket where the CloudFormation template reside
Resources:
rStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: !Sub https://s3.amazonaws.com/${pArtifactBucket}/cfn-templates/samples-simple-http-server.yml
Parameters:
pEnvPurpose: !Ref pEnvPurpose
pVpcID: !Ref pVpcId
pAlbSubnetId1: !Ref pAlbSubnetId1
pAlbSubnetId2: !Ref pAlbSubnetId2
pWebSubnetId1: !Ref pWebSubnetId1
pWebSubnetId2: !Ref pWebSubnetId2
pAlbIngressCidr: !Ref pAlbIngressCidr
pAlbIngressPrefixListId: !Ref pAlbIngressPrefixListId
pServerCount: !Ref pServerCount
pInstanceType: !Ref pInstanceType
Tags:
- Key: !Sub ${pOrg}-service-id
Value: samples.http
- Key: !Sub ${pOrg}-env-purpose
Value: !Ref pEnvPurpose
- Key: !Sub ${pOrg}-owner
Value: !Ref pOwnerEmail
- Key: !Sub ${pOrg}-cost-center
Value: !Ref pCostCenter
- Key: !Sub ${pOrg}-data-class
Value: !Ref pDataClass
- Key: !Sub ${pOrg}-privacy-class
Value: !Ref pPrivacyClass