-
Notifications
You must be signed in to change notification settings - Fork 417
Expand file tree
/
Copy pathcreatedb.json
More file actions
51 lines (51 loc) · 1.41 KB
/
Copy pathcreatedb.json
File metadata and controls
51 lines (51 loc) · 1.41 KB
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
{
"AWSTemplateFormatVersion":"2010-09-09",
"Resources":{
"myDBSubnetGroup" : {
"Type" : "AWS::RDS::DBSubnetGroup",
"Properties" : {
"DBSubnetGroupDescription" : "description",
"SubnetIds" : ["subnet-03e68567", "subnet-ce8f5de1"],
"Tags" : [ {"Key" : "String", "Value" : "String"} ]
}
},
"dbsg" : {
"Type" : "AWS::EC2::SecurityGroup",
"Properties" : {
"GroupDescription" : "Allow http to client host",
"VpcId" : "vpc-3df96045",
"SecurityGroupIngress" : [{
"IpProtocol" : "tcp",
"FromPort" : "3306",
"ToPort" : "3306",
"CidrIp" : "0.0.0.0/0"
}],
"SecurityGroupEgress" : [{
"IpProtocol" : "tcp",
"FromPort" : "0",
"ToPort" : "65535",
"CidrIp" : "0.0.0.0/0"
}]
}
},
"MyDB" : {
"Type" : "AWS::RDS::DBInstance",
"Properties" : {
"DBName" : "userdb",
"AllocatedStorage" : "5",
"DBInstanceClass" : "db.t2.micro",
"DBSubnetGroupName": { "Ref": "myDBSubnetGroup" },
"Engine" : "MySQL",
"EngineVersion" : "5.5",
"MasterUsername" : "mysvcuser",
"MasterUserPassword" : "redhat12345",
"VPCSecurityGroups": [ { "Ref": "dbsg" } ],
"Tags" : [ { "Key" : "Name", "Value" : "My SQL Database" } ]
}
}
},
"Outputs":
{
"dbname": {"Value":{"Fn::GetAtt": ["MyDB","Endpoint.Address"]}}
}
}