Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit e3ef188

Browse files
Beautify templates
1 parent 3aa8399 commit e3ef188

13 files changed

+1326
-1186
lines changed
Lines changed: 95 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1+
---
12
AWSTemplateFormatVersion: 2010-09-09
2-
Description: >-
3-
v5.4: This template is an abstraction layer for choosing PostgreSQL, Oracle or
4-
MSSQL when deploying Deep Security Manager (qs-1ngr590i4).
3+
Description: 'v5.4: This template is an abstraction layer for choosing PostgreSQL,
4+
Oracle or MSSQL when deploying Deep Security Manager (qs-1ngr590i4).'
55
Parameters:
66
DBIRDSInstanceSize:
77
Default: db.m3.large
88
Description: Trend Micro Deep Security Database instance class
99
Type: String
1010
AllowedValues:
11-
- db.m4.large
12-
- db.m4.xlarge
13-
- db.m4.2xlarge
14-
- db.m3.medium
15-
- db.m3.large
16-
- db.m3.xlarge
17-
- db.m3.2xlarge
18-
- db.r3.large
19-
- db.r3.xlarge
20-
- db.r3.2xlarge
21-
- db.r3.4xlarge
22-
- db.r3.8xlarge
11+
- db.m4.large
12+
- db.m4.xlarge
13+
- db.m4.2xlarge
14+
- db.m3.medium
15+
- db.m3.large
16+
- db.m3.xlarge
17+
- db.m3.2xlarge
18+
- db.r3.large
19+
- db.r3.xlarge
20+
- db.r3.2xlarge
21+
- db.r3.4xlarge
22+
- db.r3.8xlarge
2323
ConstraintDescription: must select a valid database instance type.
2424
DBIStorageAllocation:
2525
Default: 10
26-
Description: >-
27-
The Storage Allocated to Database Instance (in GB). Minimum 200 for SQL
28-
Server, 10 for Oracle.
26+
Description: The Storage Allocated to Database Instance (in GB). Minimum 200 for
27+
SQL Server, 10 for Oracle.
2928
Type: Number
3029
MinValue: 10
3130
MaxValue: 3072
@@ -44,66 +43,65 @@ Parameters:
4443
MinLength: 1
4544
MaxLength: 16
4645
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
47-
ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
46+
ConstraintDescription: must begin with a letter and contain only alphanumeric
47+
characters.
4848
DBICAdminPassword:
4949
NoEcho: true
50-
Description: >-
51-
Password to be used for the database admin account. 8-41 alphanumeric
50+
Description: Password to be used for the database admin account. 8-41 alphanumeric
5251
characters
5352
Type: String
5453
MinLength: 8
5554
MaxLength: 41
5655
AllowedPattern: '[a-zA-Z0-9!^*\-_+]*'
57-
ConstraintDescription: >-
58-
Can only contain alphanumeric characters or the following special
59-
characters !^*-_+ Min length 8, max length 41
56+
ConstraintDescription: Can only contain alphanumeric characters or the following
57+
special characters !^*-_+ Min length 8, max length 41
6058
DBPName:
6159
Default: dsm
6260
Description: Name to be assigned to the database
6361
Type: String
6462
MinLength: 1
6563
MaxLength: 64
6664
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
67-
ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
65+
ConstraintDescription: must begin with a letter and contain only alphanumeric
66+
characters.
6867
StorageType:
6968
Default: gp2
7069
Type: String
7170
RDSSG:
72-
Type: 'AWS::EC2::SecurityGroup::Id'
71+
Type: AWS::EC2::SecurityGroup::Id
7372
DBPEngine:
74-
Description: 'Choose PostgreSQL, MSSSQL or Oracle for DSM database Engine'
73+
Description: Choose PostgreSQL, MSSSQL or Oracle for DSM database Engine
7574
Type: String
7675
Default: PostgreSQL
7776
AllowedValues:
78-
- SQL
79-
- Oracle
80-
- PostgreSQL
77+
- SQL
78+
- Oracle
79+
- PostgreSQL
8180
MultiAZ:
8281
Description: Use Multi-AZ or SQL Mirroring Option Group for RDS Instance
8382
Type: String
8483
AllowedValues:
85-
- 'true'
86-
- 'false'
84+
- 'true'
85+
- 'false'
8786
Default: 'false'
8887
DBISubnetGroupName:
8988
Type: String
9089
Default: ''
9190
DBISubnet1:
9291
Description: Choose a private subnets in the same VPC for the RDS instance
93-
Type: 'AWS::EC2::Subnet::Id'
94-
ConstraintDescription: >-
95-
RDS Subnet Groups must be comprised of 2 subnets in separate availability
96-
zones with the specified VPC for deploying this template
92+
Type: AWS::EC2::Subnet::Id
93+
ConstraintDescription: RDS Subnet Groups must be comprised of 2 subnets in separate
94+
availability zones with the specified VPC for deploying this template
9795
DBISubnet2:
9896
Description: Choose private subnets in the same VPC for this RDS instance
99-
Type: 'AWS::EC2::Subnet::Id'
100-
ConstraintDescription: >-
101-
RDS Subnet Groups must be comprised of 2 subnets in separate availability
102-
zones with the specified VPC for deploying this template
97+
Type: AWS::EC2::Subnet::Id
98+
ConstraintDescription: RDS Subnet Groups must be comprised of 2 subnets in separate
99+
availability zones with the specified VPC for deploying this template
103100
QSS3BucketName:
104101
AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$
105-
ConstraintDescription: Quick Start bucket name can include numbers, lowercase letters,
106-
uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-).
102+
ConstraintDescription: Quick Start bucket name can include numbers, lowercase
103+
letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen
104+
(-).
107105
Default: quickstart-reference
108106
Description: S3 bucket name for the Quick Start assets. Quick Start bucket name
109107
can include numbers, lowercase letters, uppercase letters, and hyphens (-).
@@ -114,22 +112,23 @@ Parameters:
114112
ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters,
115113
uppercase letters, hyphens (-), and forward slash (/).",
116114
Default: trendmicro/deepsecurity/latest/
117-
Description: S3 key prefix for the Quick Start assets. Quick Start key prefix can
118-
include numbers, lowercase letters, uppercase letters, hyphens (-), and forward
119-
slash (/).
115+
Description: S3 key prefix for the Quick Start assets. Quick Start key prefix
116+
can include numbers, lowercase letters, uppercase letters, hyphens (-), and
117+
forward slash (/).
120118
Type: String
121119
Resources:
122120
DSOracleRDS:
123-
Type: 'AWS::CloudFormation::Stack'
121+
Type: AWS::CloudFormation::Stack
124122
Condition: DBTypeIsOracle
125123
Properties:
126-
TemplateURL: !Sub
127-
- >-
128-
https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}/templates/common/db/ds-db-oracle-rds.template
129-
- QSS3Region: !If
130-
- GovCloudCondition
131-
- s3-us-gov-west-1
132-
- s3
124+
TemplateURL:
125+
!Sub
126+
- https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}/templates/common/db/ds-db-oracle-rds.template
127+
- QSS3Region:
128+
!If
129+
- GovCloudCondition
130+
- s3-us-gov-west-1
131+
- s3
133132
TimeoutInMinutes: '10'
134133
Parameters:
135134
DBIRDSInstanceSize: !Ref DBIRDSInstanceSize
@@ -142,16 +141,17 @@ Resources:
142141
DBISubnetGroupName: !Ref DBISubnetGroup
143142
MultiAZ: !Ref MultiAZ
144143
DSSQLRDS:
145-
Type: 'AWS::CloudFormation::Stack'
144+
Type: AWS::CloudFormation::Stack
146145
Condition: DBTypeIsSQL
147146
Properties:
148-
TemplateURL: !Sub
149-
- >-
150-
https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}/templates/common/db/ds-db-mssql-rds.template
151-
- QSS3Region: !If
152-
- GovCloudCondition
153-
- s3-us-gov-west-1
154-
- s3
147+
TemplateURL:
148+
!Sub
149+
- https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}/templates/common/db/ds-db-mssql-rds.template
150+
- QSS3Region:
151+
!If
152+
- GovCloudCondition
153+
- s3-us-gov-west-1
154+
- s3
155155
TimeoutInMinutes: '10'
156156
Parameters:
157157
DBIRDSInstanceSize: !Ref DBIRDSInstanceSize
@@ -164,16 +164,17 @@ Resources:
164164
DBISubnetGroupName: !Ref DBISubnetGroup
165165
MultiAZ: !Ref MultiAZ
166166
DSPostgreSQLRDS:
167-
Type: 'AWS::CloudFormation::Stack'
167+
Type: AWS::CloudFormation::Stack
168168
Condition: DBTypeIsPostgreSQL
169169
Properties:
170-
TemplateURL: !Sub
171-
- >-
172-
https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}/templates/common/db/ds-db-postgresql-rds.template
173-
- QSS3Region: !If
174-
- GovCloudCondition
175-
- s3-us-gov-west-1
176-
- s3
170+
TemplateURL:
171+
!Sub
172+
- https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}/templates/common/db/ds-db-postgresql-rds.template
173+
- QSS3Region:
174+
!If
175+
- GovCloudCondition
176+
- s3-us-gov-west-1
177+
- s3
177178
TimeoutInMinutes: '10'
178179
Parameters:
179180
DBIRDSInstanceSize: !Ref DBIRDSInstanceSize
@@ -186,51 +187,58 @@ Resources:
186187
DBISubnetGroupName: !Ref DBISubnetGroup
187188
MultiAZ: !Ref MultiAZ
188189
DBISubnetGroup:
189-
Type: 'AWS::RDS::DBSubnetGroup'
190+
Type: AWS::RDS::DBSubnetGroup
190191
Properties:
191192
DBSubnetGroupDescription: DeepSecurityRDSSubnetGroup
192193
SubnetIds:
193-
- !Ref DBISubnet1
194-
- !Ref DBISubnet2
194+
- !Ref DBISubnet1
195+
- !Ref DBISubnet2
195196
Conditions:
196-
DBTypeIsOracle: !Equals
197+
DBTypeIsOracle:
198+
!Equals
197199
- !Ref DBPEngine
198200
- Oracle
199-
DBTypeIsSQL: !Equals
201+
DBTypeIsSQL:
202+
!Equals
200203
- !Ref DBPEngine
201204
- SQL
202-
DBTypeIsPostgreSQL: !Equals
205+
DBTypeIsPostgreSQL:
206+
!Equals
203207
- !Ref DBPEngine
204208
- PostgreSQL
205-
GovCloudCondition: !Equals
206-
- !Ref 'AWS::Region'
209+
GovCloudCondition:
210+
!Equals
211+
- !Ref AWS::Region
207212
- us-gov-west-1
208213
Outputs:
209214
DSDBEndpoint:
210-
Value: !If
215+
Value:
216+
!If
211217
- DBTypeIsOracle
212-
- !GetAtt
218+
- !GetAtt
213219
- DSOracleRDS
214220
- Outputs.DSDBEndpoint
215-
- !If
221+
- !If
216222
- DBTypeIsPostgreSQL
217-
- !GetAtt
223+
- !GetAtt
218224
- DSPostgreSQLRDS
219225
- Outputs.DSDBEndpoint
220-
- !GetAtt
226+
- !GetAtt
221227
- DSSQLRDS
222228
- Outputs.DSDBEndpoint
223229
DSDBPort:
224-
Value: !If
230+
Value:
231+
!If
225232
- DBTypeIsOracle
226-
- !GetAtt
233+
- !GetAtt
227234
- DSOracleRDS
228235
- Outputs.DSDBPort
229-
- !If
236+
- !If
230237
- DBTypeIsPostgreSQL
231-
- !GetAtt
238+
- !GetAtt
232239
- DSPostgreSQLRDS
233240
- Outputs.DSDBPort
234-
- !GetAtt
241+
- !GetAtt
235242
- DSSQLRDS
236243
- Outputs.DSDBPort
244+
...

0 commit comments

Comments
 (0)