Skip to content

Commit a3aedeb

Browse files
committed
handle SnapshotArns as a list of strings better
1 parent a683770 commit a3aedeb

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

redis.cfhighlander.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ComponentParam 'SnapshotName', '',
1919
description: 'The name of a snapshot from which to restore data into the new replication group'
2020

21-
ComponentParam 'SnapshotArns', '', type: 'CommaDelimitedList',
21+
ComponentParam 'SnapshotArns', '',
2222
description: 'A list of ARNs that uniquely identify the Redis RDB snapshot files stored in S3'
2323

2424
ComponentParam 'SnapshotRetentionLimit',

redis.cfndsl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
end
115115

116116
SnapshotName FnIf('NoSnapshotNamEnabled', Ref('AWS::NoValue'), Ref(:SnapshotName))
117-
SnapshotArns FnIf('NoSnapshotArnsEnabled', Ref('AWS::NoValue'), Ref(:SnapshotArns))
117+
SnapshotArns FnIf('NoSnapshotArnsEnabled', Ref('AWS::NoValue'), FnSplit(",", Ref(:SnapshotArns)))
118118
SnapshotRetentionLimit Ref(:SnapshotRetentionLimit)
119119

120120
SnapshotWindow snapshot_window unless snapshot_window.nil?

spec/cache-cluster_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"NumCacheClusters" => {"Ref"=>"NumCacheClusters"},
2828
"ReplicationGroupDescription" => {"Fn::Sub"=>"${EnvironmentName}-redis"},
2929
"SecurityGroupIds" => [{"Ref"=>"SecurityGroupRedis"}],
30-
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotArns"}]},
30+
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Fn::Split" => [",", {"Ref" => "SnapshotArns"}]}]},
3131
"SnapshotName" => {"Fn::If" => ["NoSnapshotNamEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotName"}]},
3232
"SnapshotRetentionLimit" => {"Ref"=>"SnapshotRetentionLimit"},
3333
"Tags" => [

spec/clustered_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"ReplicasPerNodeGroup" => {"Ref"=>"ReplicasPerNodeGroup"},
3131
"ReplicationGroupDescription" => {"Fn::Sub"=>"${EnvironmentName}-redis"},
3232
"SecurityGroupIds" => [{"Ref"=>"SecurityGroupRedis"}],
33-
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotArns"}]},
33+
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Fn::Split" => [",", {"Ref" => "SnapshotArns"}]}]},
3434
"SnapshotName" => {"Fn::If" => ["NoSnapshotNamEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotName"}]},
3535
"SnapshotRetentionLimit" => {"Ref"=>"SnapshotRetentionLimit"},
3636
"SnapshotWindow" => "00:30-02:30",

spec/default_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"ReplicasPerNodeGroup" => {"Ref"=>"ReplicasPerNodeGroup"},
2929
"ReplicationGroupDescription" => {"Fn::Sub"=>"${EnvironmentName}-redis"},
3030
"SecurityGroupIds" => [{"Ref"=>"SecurityGroupRedis"}],
31-
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotArns"}]},
31+
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Fn::Split" => [",", {"Ref" => "SnapshotArns"}]}]},
3232
"SnapshotName" => {"Fn::If" => ["NoSnapshotNamEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotName"}]},
3333
"SnapshotRetentionLimit" => {"Ref"=>"SnapshotRetentionLimit"},
3434
"Tags" => [

spec/node-group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"ReplicasPerNodeGroup" => {"Ref"=>"ReplicasPerNodeGroup"},
2929
"ReplicationGroupDescription" => {"Fn::Sub"=>"${EnvironmentName}-redis"},
3030
"SecurityGroupIds" => [{"Ref"=>"SecurityGroupRedis"}],
31-
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotArns"}]},
31+
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Fn::Split" => [",", {"Ref" => "SnapshotArns"}]}]},
3232
"SnapshotName" => {"Fn::If" => ["NoSnapshotNamEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotName"}]},
3333
"SnapshotRetentionLimit" => {"Ref"=>"SnapshotRetentionLimit"},
3434
"Tags" => [

spec/non-clustered_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"ReplicasPerNodeGroup" => {"Ref"=>"ReplicasPerNodeGroup"},
2929
"ReplicationGroupDescription" => {"Fn::Sub"=>"${EnvironmentName}-redis"},
3030
"SecurityGroupIds" => [{"Ref"=>"SecurityGroupRedis"}],
31-
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotArns"}]},
31+
"SnapshotArns" => {"Fn::If" => ["NoSnapshotArnsEnabled", {"Ref" => "AWS::NoValue"}, {"Fn::Split" => [",", {"Ref" => "SnapshotArns"}]}]},
3232
"SnapshotName" => {"Fn::If" => ["NoSnapshotNamEnabled", {"Ref" => "AWS::NoValue"}, {"Ref" => "SnapshotName"}]},
3333
"SnapshotRetentionLimit" => {"Ref"=>"SnapshotRetentionLimit"},
3434
"Tags" => [

0 commit comments

Comments
 (0)