-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathportabilityandresue.yaml
67 lines (67 loc) · 1.97 KB
/
portabilityandresue.yaml
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
Parameters:
EnvironmentSize:
Type: String
Default: SMALL
AllowedValues:
- SMALL
- MEDIUM
- LARGE
Description: Select Environment Size (S,M,L)
Mappings:
RegionMap:
us-east-1:
"AMALINUX" : "ami-c481fad3" # AMALINUX SEP 2016
us-east-2:
"AMALINUX" : "ami-71ca9114" # AMALINUX SEP 2016
us-west-1:
"AMALINUX" : "ami-de347abe" # AMALINUX SEP 2016
us-west-2:
"AMALINUX" : "ami-b04e92d0" # AMALINUX SEP 2016
ca-central-1:
"AMALINUX" : "ami-eb20928f" # AMALINUX SEP 2016 v01
eu-west-1:
"AMALINUX" : "ami-d41d58a7" # AMALINUX SEP 2016
eu-central-1:
"AMALINUX" : "ami-0044b96f" # AMALINUX SEP 2016
eu-west-2:
"AMALINUX" : "ami-bfe0eadb" # AMALINUX SEP 2016 v01
ap-southeast-1:
"AMALINUX" : "ami-7243e611" # AMALINUX SEP 2016
ap-southeast-2:
"AMALINUX" : "ami-55d4e436" # AMALINUX SEP 2016
ap-northeast-2:
"AMALINUX" : "ami-a04297ce" # AMALINUX SEP 2016
ap-northeast-1:
"AMALINUX" : "ami-1a15c77b" # AMALINUX SEP 2016
ap-south-1:
"AMALINUX" : "ami-cacbbea5" # AMALINUX SEP 2016
sa-east-1:
"AMALINUX" : "ami-b777e4db" # AMALINUX SEP 2016
InstanceSize:
SMALL:
"EC2" : "t2.micro"
"DB" : "db.t2.micro"
MEDIUM:
"EC2" : "t2.small"
"DB" : "db.t2.small"
LARGE:
"EC2" : "t2.medium"
"DB" : "db.t2.medium"
Resources:
DB:
Type: "AWS::RDS::DBInstance"
Properties:
AllocatedStorage: 5
StorageType: gp2
DBInstanceClass: !FindInMap [InstanceSize, !Ref EnvironmentSize, DB] # Dynamic mapping + Pseudo Parameter
DBName: wordpress
Engine: MySQL
MasterUsername: wordpress
MasterUserPassword: w0rdpr355
EC2:
Type: "AWS::EC2::Instance"
Properties:
ImageId: !FindInMap [RegionMap, !Ref "AWS::Region", AMALINUX] # Dynamic mapping + Pseudo Parameter
InstanceType: !FindInMap [InstanceSize, !Ref EnvironmentSize, EC2]
S3:
Type: "AWS::S3::Bucket"