Redis.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. AtRestEncryptionEnabled: true
  20. TransitEncryptionEnabled: true
  21. Engine: redis
  22. Port: '6379'
  23. CacheNodeType: cache.t2.micro
  24. NumNodeGroups: '1'
  25. ReplicasPerNodeGroup: '1'
  26. SecurityGroupIds:
  27. - !Ref dbgroupid
  28. CacheSubnetGroupName: !Ref cachegroup1
  29. ReplicationGroupDescription: Redis cluster
  30. Tags:
  31. - Key: Name
  32. Value:
  33. 'Fn::Join':
  34. - ':'
  35. - - Cache
  36. - !Ref 'AWS::StackName'
  37. Metadata:
  38. 'AWS::CloudFormation::Designer':
  39. id: 51592334-29be-446e-a1ee-df4f7a6d3c1d
  40. Parameters:
  41. dbgroupid:
  42. Type: String
  43. dbnet1id:
  44. Type: String
  45. dbnet2id:
  46. Type: String