multi-Redis.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. AWSTemplateFormatVersion: 2010-09-09
  2. Resources:
  3. cachegroup1:
  4. Type: 'AWS::ElastiCache::SubnetGroup'
  5. Properties:
  6. CacheSubnetGroupName: cachegroup1
  7. Description: cachegroup1
  8. SubnetIds:
  9. - !Ref dbnet1id
  10. - !Ref dbnet2id
  11. Metadata:
  12. 'AWS::CloudFormation::Designer':
  13. id: 486b56bc-dec0-4b7b-8eef-f551f8311495
  14. cachecluster1:
  15. Type: 'AWS::ElastiCache::ReplicationGroup'
  16. Properties:
  17. AutomaticFailoverEnabled: true
  18. AutoMinorVersionUpgrade: true
  19. Engine: redis
  20. NumCacheClusters: '2'
  21. Port: '6379'
  22. CacheNodeType: cache.t2.micro
  23. SecurityGroupIds:
  24. - !Ref dbgroupid
  25. CacheSubnetGroupName: !Ref cachegroup1
  26. ReplicationGroupDescription: Redis cluster
  27. Tags:
  28. - Key: 'Name'
  29. Value:
  30. 'Fn::Join': [ ':', [ 'Cache', !Ref 'AWS::StackName' ] ]
  31. Metadata:
  32. 'AWS::CloudFormation::Designer':
  33. id: 51592334-29be-446e-a1ee-df4f7a6d3c1d
  34. Parameters:
  35. dbgroupid:
  36. Type: String
  37. dbnet1id:
  38. Type: String
  39. dbnet2id:
  40. Type: String
  41. Metadata:
  42. 'AWS::CloudFormation::Designer':
  43. 486b56bc-dec0-4b7b-8eef-f551f8311495:
  44. size:
  45. width: 240
  46. height: 240
  47. position:
  48. x: 60
  49. 'y': 90
  50. z: 1
  51. embeds:
  52. - 51592334-29be-446e-a1ee-df4f7a6d3c1d
  53. 51592334-29be-446e-a1ee-df4f7a6d3c1d:
  54. size:
  55. width: 60
  56. height: 60
  57. position:
  58. x: 90
  59. 'y': 150
  60. z: 2
  61. parent: 486b56bc-dec0-4b7b-8eef-f551f8311495
  62. embeds: []
  63. iscontainedinside:
  64. - 486b56bc-dec0-4b7b-8eef-f551f8311495
  65. - 486b56bc-dec0-4b7b-8eef-f551f8311495
  66. - 486b56bc-dec0-4b7b-8eef-f551f8311495