forked from joaoasrosa/quickstart-magento
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rdsmysql-only.yaml.template
171 lines (170 loc) · 4.86 KB
/
rdsmysql-only.yaml.template
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
---
AWSTemplateFormatVersion: '2010-09-09'
Description: RDS MySQL Template
Parameters:
DBAllocatedStorage:
ConstraintDescription: must be between 5 and 4096 GiB. If Iops specified, AllocatedStorage
must be at least 100 GiB and with minimum Iops value of 1000
Default: '5'
Description: The size of the database in gigabytes (GiB)
MaxValue: '4096'
MinValue: '5'
Type: Number
DBAutoMinorVersionUpgrade:
AllowedValues:
- 'true'
- 'false'
Default: 'true'
Description: Select true/false to setup Auto Minor Version upgrade
Type: String
DBBackupRetentionPeriod:
Default: '7'
Description: The number of days for which automatic DB snapshots are retained.
Type: String
DBInstanceClass:
AllowedValues:
- db.t1.micro
- db.m1.small
- db.m3.medium
- db.m3.large
- db.m3.xlarge
- db.m3.2xlarge
- db.m4.2xlarge
- db.r3.large
- db.r3.xlarge
- db.r3.2xlarge
- db.r3.4xlarge
- db.r3.8xlarge
- db.t2.micro
- db.t2.small
- db.t2.medium
- db.m2.xlarge
- db.m2.2xlarge
- db.m2.4xlarge
- db.cr1.8xlarge
- db.m1.medium
- db.m1.large
- db.m1.xlarge
ConstraintDescription: Must select a valid database instance type.
Default: db.m3.medium
Description: The name of the compute and memory capacity class of the DB instance.
Type: String
DBIops:
AllowedValues:
- '1000'
- '2000'
- '3000'
- '4000'
- '5000'
- '6000'
- '7000'
- '8000'
- '9000'
- '10000'
ConstraintDescription: '1000 Iops min and increased in 1K increments. '
Default: '1000'
Description: DB Iops. Used only when io1 specified for the StorageType property
Type: Number
DBMasterUserPassword:
AllowedPattern: (?=^.{6,255}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*
ConstraintDescription: Min 8 chars.
Description: The database admin account password
MaxLength: '64'
MinLength: '8'
NoEcho: 'True'
Type: String
DBMasterUsername:
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
ConstraintDescription: must begin with a letter and contain only alphanumeric
characters.
Default: admin
Description: The database admin account username
MaxLength: '16'
MinLength: '1'
NoEcho: 'true'
Type: String
DBMultiAZ:
AllowedValues:
- 'true'
- 'false'
Default: 'true'
Description: Specifies if the database instance is a multiple Availability Zone
deployment.
Type: String
DBName:
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
Default: QuickstartMySQLDB
Description: Name of MySQL DB for Magento Stack
MaxLength: '64'
MinLength: '5'
Type: String
DBStorageType:
AllowedValues:
- standard
- gp2
- io1
Default: standard
Description: The storage type associated with this database instance
Type: String
RDSSecurityGroup:
Description: MySql Security Group
Type: AWS::EC2::SecurityGroup::Id
Subnets:
ConstraintDescription: must be list of existing subnet Ids
Description: Atleast two existing Subnets in separate Availability Zones your
Virtual Private Cloud (VPC)
Type: List<AWS::EC2::Subnet::Id>
VPCID:
Description: VPC ID of your existing Virtual Private Cloud (VPC) where you want
to depoy RDS.
Type: AWS::EC2::VPC::Id
Conditions:
IOPSStorageType:
!Equals
- !Ref DBStorageType
- io1
Resources:
MySQLDBSubnetGroup:
Type: AWS::RDS::DBSubnetGroup
Properties:
DBSubnetGroupDescription: Subnets available for the RDS MySQL DB Instance
SubnetIds: !Ref Subnets
MySQLDB:
Type: AWS::RDS::DBInstance
Properties:
DBName: !Ref DBName
AllocatedStorage: !Ref DBAllocatedStorage
DBInstanceClass: !Ref DBInstanceClass
Engine: MySQL
EngineVersion: '5.6'
MasterUsername: !Ref DBMasterUsername
MasterUserPassword: !Ref DBMasterUserPassword
DBSubnetGroupName: !Ref MySQLDBSubnetGroup
VPCSecurityGroups:
- !Ref RDSSecurityGroup
MultiAZ: !Ref DBMultiAZ
StorageType: !Ref DBStorageType
AutoMinorVersionUpgrade: !Ref DBAutoMinorVersionUpgrade
BackupRetentionPeriod: !Ref DBBackupRetentionPeriod
Iops:
!If
- IOPSStorageType
- !Ref DBIops
- !Ref AWS::NoValue
Tags:
- Key: Name
Value: !Sub MySQLDB-${AWS::StackName}
Outputs:
RDSEndPoints:
Description: Amazon RDS Endpoint to connect
Value: !Sub ${MySQLDB.Endpoint.Address}:${MySQLDB.Endpoint.Port}/${DBName}
DBName:
Description: MySQL DBName
Value: !Ref DBName
RDSEndPointAddress:
Description: Amazon RDS Endpoint to connect
Value: !Sub ${MySQLDB.Endpoint.Address}
RDSEndPointPort:
Description: Amazon RDS Endpoint to connect
Value: !Sub ${MySQLDB.Endpoint.Port}
...