mobilefish

Untitled

Jul 20th, 2020
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. {
  2. "AWSTemplateFormatVersion":"2010-09-09",
  3. "Parameters":{
  4. "PrivateSubnet1":{
  5. "Type":"String"
  6. },
  7. "PrivateSubnet2":{
  8. "Type":"String"
  9. },
  10. "VPCId":{
  11. "Type":"String"
  12. }
  13. },
  14. "Resources":{
  15. "DB":{
  16. "Type":"AWS::RDS::DBInstance",
  17. "Properties":{
  18. "DBName":"TestDB",
  19. "Engine":"mysql",
  20. "EngineVersion":"5.7.21",
  21. "DBInstanceClass":"db.t1.micro",
  22. "DBInstanceIdentifier":"testdb",
  23. "MasterUsername":"root",
  24. "MasterUserPassword":"test#west#345",
  25. "AllocatedStorage":"100",
  26. "Iops":"1000",
  27. "BackupRetentionPeriod":"7",
  28. "DBSubnetGroupName":{
  29. "Ref":"DBSubnetGroup"
  30. },
  31. "MultiAZ":false,
  32. "PubliclyAccessible":false,
  33. "AutoMinorVersionUpgrade":false,
  34. "VPCSecurityGroups":[
  35. {
  36. "Ref":"SecurityGroup"
  37. }
  38. ]
  39. }
  40. },
  41. "DBSubnetGroup":{
  42. "Type":"AWS::RDS::DBSubnetGroup",
  43. "Properties":{
  44. "DBSubnetGroupDescription":"DB subnet group description",
  45. "SubnetIds":[
  46. {
  47. "Ref":"PrivateSubnet1"
  48. },
  49. {
  50. "Ref":"PrivateSubnet2"
  51. }
  52. ]
  53. }
  54. },
  55. "DBSecurityGroup":{
  56. "Type":"AWS::RDS::DBSecurityGroup",
  57. "Properties":{
  58. "EC2VpcId":{
  59. "Ref":"VPCId"
  60. },
  61. "DBSecurityGroupIngress":{
  62. "EC2SecurityGroupName":{
  63. "Ref":"SecurityGroup"
  64. }
  65. },
  66. "GroupDescription":"Database Access"
  67. }
  68. },
  69. "SecurityGroup":{
  70. "Type":"AWS::EC2::SecurityGroup",
  71. "Properties":{
  72. "VpcId":{
  73. "Ref":"VPCId"
  74. },
  75. "GroupDescription":"Enable database access for application",
  76. "SecurityGroupIngress":[
  77. {
  78. "IpProtocol":"tcp",
  79. "FromPort":"3306",
  80. "ToPort":"3306",
  81. "CidrIp":"0.0.0.0/0"
  82. }
  83. ]
  84. }
  85. }
  86. }
  87. }
Add Comment
Please, Sign In to add comment