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

Commit cbb4d42

Browse files
Beautify templates
1 parent c9b5bbd commit cbb4d42

16 files changed

+6604
-6198
lines changed

templates/Common/DB/DSDBAbstract.template

Lines changed: 194 additions & 176 deletions
Large diffs are not rendered by default.

templates/Common/DB/DSDBOracleRDS.template

Lines changed: 126 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"AWSTemplateFormatVersion" : "2010-09-09",
3-
"Description" : "v5.0: This template deploys an Oracle RDS instance for Deep Security Manager",
4-
"Parameters" : {
5-
"DBIRDSInstanceSize" : {
6-
"Default" : "db.m3.large",
7-
"Description" : "Trend Micro Deep Security Database instance class",
8-
"Type" : "String",
9-
"AllowedValues" : [
10-
"db.m4.medium",
11-
"db.m4.large",
12-
"db.m4.xlarge",
13-
"db.m4.2xlarge",
2+
"AWSTemplateFormatVersion": "2010-09-09",
3+
"Description": "v5.0: This template deploys an Oracle RDS instance for Deep Security Manager",
4+
"Parameters": {
5+
"DBIRDSInstanceSize": {
6+
"Default": "db.m3.large",
7+
"Description": "Trend Micro Deep Security Database instance class",
8+
"Type": "String",
9+
"AllowedValues": [
10+
"db.m4.medium",
11+
"db.m4.large",
12+
"db.m4.xlarge",
13+
"db.m4.2xlarge",
1414
"db.m3.medium",
1515
"db.m3.large",
1616
"db.m3.xlarge",
@@ -26,152 +26,164 @@
2626
"db.m1.medium",
2727
"db.m1.large",
2828
"db.m1.xlarge",
29-
"db.m4.large",
30-
"db.m4.xlarge"
29+
"db.m4.large",
30+
"db.m4.xlarge"
3131
],
32-
"ConstraintDescription" : "must select a valid database instance type."
32+
"ConstraintDescription": "must select a valid database instance type."
3333
},
34-
"DBIStorageAllocation" : {
35-
"Default" : 10,
36-
"Description" : "The size of the Deep Security database (Gb)",
37-
"Type" : "Number",
38-
"MinValue" : 10,
39-
"MaxValue" : 3072,
40-
"ConstraintDescription" : "must be between 10 and 3072Gb."
34+
"DBIStorageAllocation": {
35+
"Default": 10,
36+
"Description": "The size of the Deep Security database (Gb)",
37+
"Type": "Number",
38+
"MinValue": 10,
39+
"MaxValue": 3072,
40+
"ConstraintDescription": "must be between 10 and 3072Gb."
4141
},
42-
"DBPBackupDays" : {
43-
"Default" : 1,
44-
"Description" : "Days to keep automatic RDS backups (0-35)",
45-
"Type" : "Number",
46-
"MinValue" : 0,
47-
"MaxValue" : 35,
48-
"ConstraintDescription" : "must be between 0 and 35 days."
42+
"DBPBackupDays": {
43+
"Default": 1,
44+
"Description": "Days to keep automatic RDS backups (0-35)",
45+
"Type": "Number",
46+
"MinValue": 0,
47+
"MaxValue": 35,
48+
"ConstraintDescription": "must be between 0 and 35 days."
4949
},
50-
"DBICAdminName" : {
51-
"Default" : "dsadmin",
52-
"NoEcho" : false,
53-
"Description" : "Admin account username to be used for the database instance",
54-
"Type" : "String",
55-
"MinLength" : 1,
56-
"MaxLength" : 16,
57-
"AllowedPattern" : "[a-zA-Z][a-zA-Z0-9]*",
58-
"ConstraintDescription" : "must begin with a letter and contain only alphanumeric characters."
50+
"DBICAdminName": {
51+
"Default": "dsadmin",
52+
"NoEcho": false,
53+
"Description": "Admin account username to be used for the database instance",
54+
"Type": "String",
55+
"MinLength": 1,
56+
"MaxLength": 16,
57+
"AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
58+
"ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
5959
},
60-
"DBICAdminPassword" : {
61-
"NoEcho" : true,
62-
"Description" : "Password to be used for the Oracle database admin account",
63-
"Type" : "String",
64-
"MinLength" : 8,
65-
"MaxLength" : 41,
66-
"AllowedPattern" : "[a-zA-Z0-9!^*\\-_+]*",
67-
"ConstraintDescription" : "Can only contain alphanumeric characters or the following special characters !^*-_+ Min length 8, max length 41"
60+
"DBICAdminPassword": {
61+
"NoEcho": true,
62+
"Description": "Password to be used for the Oracle database admin account",
63+
"Type": "String",
64+
"MinLength": 8,
65+
"MaxLength": 41,
66+
"AllowedPattern": "[a-zA-Z0-9!^*\\-_+]*",
67+
"ConstraintDescription": "Can only contain alphanumeric characters or the following special characters !^*-_+ Min length 8, max length 41"
6868
},
69-
"DBPName" : {
70-
"Default" : "dsm",
71-
"Description" : "Name to be assigned to the database",
72-
"Type" : "String",
73-
"MinLength" : 1,
74-
"MaxLength" : 64,
75-
"AllowedPattern" : "[a-zA-Z][a-zA-Z0-9]*",
76-
"ConstraintDescription" : "must begin with a letter and contain only alphanumeric characters."
69+
"DBPName": {
70+
"Default": "dsm",
71+
"Description": "Name to be assigned to the database",
72+
"Type": "String",
73+
"MinLength": 1,
74+
"MaxLength": 64,
75+
"AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
76+
"ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
7777
},
78-
"StorageType" : {
79-
"Default" : "gp2",
80-
"Type" : "String",
81-
"AllowedValues" : [
78+
"StorageType": {
79+
"Default": "gp2",
80+
"Type": "String",
81+
"AllowedValues": [
8282
"gp2"
83-
]
83+
]
8484
},
85-
"RDSSG" : {
86-
"Type" : "AWS::EC2::SecurityGroup::Id"
85+
"RDSSG": {
86+
"Type": "AWS::EC2::SecurityGroup::Id"
87+
},
88+
"DBISubnetGroupName": {
89+
"Type": "String"
8790
},
88-
"DBISubnetGroupName" : {
89-
"Type" : "String"
90-
},
9191
"MultiAZ": {
9292
"Description": "Use Multi-AZ or SQL Mirroring Option Group for RDS Instance",
93-
"Type" : "String",
94-
"AllowedValues" : [
93+
"Type": "String",
94+
"AllowedValues": [
9595
"true",
9696
"false"
97-
],
98-
"Default" : "false"
99-
}
97+
],
98+
"Default": "false"
99+
}
100100
},
101-
"Resources" : {
102-
"DSDatabase" : {
103-
"Type" : "AWS::RDS::DBInstance",
104-
"Properties" : {
105-
"LicenseModel" : "license-included",
106-
"PubliclyAccessible" : false,
107-
"DBName" : {
108-
"Ref" : "DBPName"
101+
"Resources": {
102+
"DSDatabase": {
103+
"Type": "AWS::RDS::DBInstance",
104+
"Properties": {
105+
"LicenseModel": "license-included",
106+
"PubliclyAccessible": false,
107+
"DBName": {
108+
"Ref": "DBPName"
109109
},
110-
"AllocatedStorage" : {
111-
"Ref" : "DBIStorageAllocation"
110+
"AllocatedStorage": {
111+
"Ref": "DBIStorageAllocation"
112112
},
113-
"DBInstanceClass" : {
114-
"Ref" : "DBIRDSInstanceSize"
113+
"DBInstanceClass": {
114+
"Ref": "DBIRDSInstanceSize"
115115
},
116-
"Engine" : {
117-
"Fn::If" : [
116+
"Engine": {
117+
"Fn::If": [
118118
"RegionIsUsGovCloud",
119119
"oracle-se1",
120120
"oracle-se2"
121121
]
122122
},
123-
"MasterUsername" : {
124-
"Ref" : "DBICAdminName"
123+
"MasterUsername": {
124+
"Ref": "DBICAdminName"
125+
},
126+
"MasterUserPassword": {
127+
"Ref": "DBICAdminPassword"
125128
},
126-
"MasterUserPassword" : {
127-
"Ref" : "DBICAdminPassword"
129+
"VPCSecurityGroups": [
130+
{
131+
"Ref": "RDSSG"
132+
}
133+
],
134+
"MultiAZ": {
135+
"Ref": "MultiAZ"
136+
},
137+
"BackupRetentionPeriod": {
138+
"Ref": "DBPBackupDays"
128139
},
129-
"VPCSecurityGroups" : [{
130-
"Ref" : "RDSSG"
131-
}],
132-
"MultiAZ" : { "Ref" : "MultiAZ" },
133-
"BackupRetentionPeriod" : {
134-
"Ref" : "DBPBackupDays"
140+
"DBSubnetGroupName": {
141+
"Ref": "DBISubnetGroupName"
135142
},
136-
"DBSubnetGroupName" : { "Ref" : "DBISubnetGroupName" },
137-
"StorageType" : { "Ref" : "StorageType" },
138-
"Tags" : [
143+
"StorageType": {
144+
"Ref": "StorageType"
145+
},
146+
"Tags": [
139147
{
140-
"Key" : "Application",
141-
"Value" : "Deep Security Manager"
148+
"Key": "Application",
149+
"Value": "Deep Security Manager"
142150
}
143151
]
144152
}
145153
}
146154
},
147-
"Conditions" : {
148-
"RegionIsUsGovCloud" : {
149-
"Fn::Equals" : [
150-
{ "Ref" : "AWS::Region" },
155+
"Conditions": {
156+
"RegionIsUsGovCloud": {
157+
"Fn::Equals": [
158+
{
159+
"Ref": "AWS::Region"
160+
},
151161
"us-gov-west-1"
152162
]
153163
},
154-
"MultiAZ" : {
155-
"Fn::Equals" : [
156-
{ "Ref": "MultiAZ" },
164+
"MultiAZ": {
165+
"Fn::Equals": [
166+
{
167+
"Ref": "MultiAZ"
168+
},
157169
"true"
158170
]
159171
}
160172
},
161-
"Outputs" : {
162-
"DSDBEndpoint" : {
163-
"Description" : "Endpoint to be passed to DSM installation properties file",
164-
"Value" : {
165-
"Fn::GetAtt" : [
173+
"Outputs": {
174+
"DSDBEndpoint": {
175+
"Description": "Endpoint to be passed to DSM installation properties file",
176+
"Value": {
177+
"Fn::GetAtt": [
166178
"DSDatabase",
167179
"Endpoint.Address"
168180
]
169181
}
170182
},
171-
"DSDBPort" : {
172-
"Description" : "Port to be passed to DSM installation properties file",
173-
"Value" : {
174-
"Fn::GetAtt" : [
183+
"DSDBPort": {
184+
"Description": "Port to be passed to DSM installation properties file",
185+
"Value": {
186+
"Fn::GetAtt": [
175187
"DSDatabase",
176188
"Endpoint.Port"
177189
]

0 commit comments

Comments
 (0)