Created
June 25, 2015 08:13
-
-
Save suz-lab/4ad5be2789b0c3fab9b2 to your computer and use it in GitHub Desktop.
MySQLのRDSを作成するCloudFormationのテンプレート
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Parameters": { | |
"ProjectName": { | |
"Type": "String", | |
"Default": "suzlab" | |
}, | |
"DbSubnetGroupName": { | |
"Type": "String", | |
"Default": "xxxxxxxx" | |
}, | |
"VpcSecurityGroup": { | |
"Type": "AWS::EC2::SecurityGroup::Id", | |
"Default": "sg-yyyyyyyy" | |
} | |
}, | |
"Resources": { | |
"DbInstance": { | |
"Type": "AWS::RDS::DBInstance", | |
"Properties": { | |
"Engine": "MySQL", | |
"AllocatedStorage": "5", | |
"MasterUsername": "root", | |
"DBInstanceClass": "db.t2.micro", | |
"DBSubnetGroupName": { "Ref": "DbSubnetGroupName" }, | |
"DBInstanceIdentifier": { "Ref": "ProjectName" }, | |
"VPCSecurityGroups": [ { "Ref": "VpcSecurityGroup"} ], | |
"MasterUserPassword": { "Fn::Join" : [ "", [ | |
{ "Ref": "ProjectName" }, | |
"!Z3" | |
] ] } | |
}, | |
"DeletionPolicy": "Snapshot" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment