From 2b165ae65f4e8c9e1c0f5d766753905aaaf3a843 Mon Sep 17 00:00:00 2001 From: cavis Date: Fri, 20 Dec 2024 11:01:25 -0700 Subject: [PATCH] Revert "Use cache.m6g.large everywhere" --- spire/templates/root.yml | 1 + spire/templates/shared-redis/cluster.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spire/templates/root.yml b/spire/templates/root.yml index 48728d2e..f551dd33 100644 --- a/spire/templates/root.yml +++ b/spire/templates/root.yml @@ -545,6 +545,7 @@ Resources: RootStackId: !Ref AWS::StackId EnvironmentType: !Ref EnvironmentType EnvironmentTypeAbbreviation: !Ref EnvironmentTypeAbbreviation + RegionMode: !FindInMap [RegionModeMap, !Ref "AWS::Region", !Ref EnvironmentType] NestedChangeSetScrubbingResourcesState: !Ref NestedChangeSetScrubbingResourcesState VpcPrivateSubnet1Id: !GetAtt SharedVpcStack.Outputs.PrivateSubnet1Id VpcPrivateSubnet2Id: !GetAtt SharedVpcStack.Outputs.PrivateSubnet2Id diff --git a/spire/templates/shared-redis/cluster.yml b/spire/templates/shared-redis/cluster.yml index bc59ab63..0f6cfc90 100644 --- a/spire/templates/shared-redis/cluster.yml +++ b/spire/templates/shared-redis/cluster.yml @@ -11,6 +11,7 @@ Parameters: RootStackId: { Type: String } EnvironmentType: { Type: String } EnvironmentTypeAbbreviation: { Type: String } + RegionMode: { Type: String } NestedChangeSetScrubbingResourcesState: { Type: String } VpcPrivateSubnet1Id: { Type: AWS::EC2::Subnet::Id } VpcPrivateSubnet2Id: { Type: AWS::EC2::Subnet::Id } @@ -19,6 +20,7 @@ Parameters: Conditions: IsProduction: !Equals [!Ref EnvironmentType, Production] + IsPrimaryRegion: !Equals [!Ref RegionMode, Primary] EnableNestedChangeSetScrubbingResources: !Equals [!Ref NestedChangeSetScrubbingResourcesState, Enabled] Resources: @@ -49,7 +51,7 @@ Resources: AtRestEncryptionEnabled: false AutomaticFailoverEnabled: true AutoMinorVersionUpgrade: false - CacheNodeType: !If [IsProduction, cache.m6g.large, cache.t4g.small] + CacheNodeType: !If [IsProduction, !If [IsPrimaryRegion, cache.m6g.large, cache.t4g.medium], cache.t4g.small] CacheParameterGroupName: default.redis7.cluster.on CacheSubnetGroupName: !Ref RedisSubnetGroup Engine: Redis