From 57686461ba28d2b8f1b270cb2a561639ee714f1b Mon Sep 17 00:00:00 2001 From: Vadim Kazakov Date: Tue, 21 Jan 2020 10:10:46 -0700 Subject: [PATCH] Update elasticache mocking regions Add all regions specified in https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/RegionsAndAZs.html#SupportedRegions --- lib/fog/aws/elasticache.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/fog/aws/elasticache.rb b/lib/fog/aws/elasticache.rb index abdd9e39e..f542c8a20 100644 --- a/lib/fog/aws/elasticache.rb +++ b/lib/fog/aws/elasticache.rb @@ -171,8 +171,10 @@ module Fog @aws_credentials_expire_at = Time::now + 20 setup_credentials(options) @region = options[:region] || 'us-east-1' - unless ['ap-northeast-1', 'ap-southeast-1', 'eu-west-1', 'us-east-1', - 'us-west-1', 'us-west-2', 'sa-east-1'].include?(@region) + unless ['ap-south-1', 'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3', 'ap-southeast-1', 'ap-southeast-2', + 'eu-west-1', 'eu-west-2', 'eu-west-3', 'eu-central-1', + 'us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'ca-central-1', + 'sa-east-1', 'cn-north-1', 'cn-northwest-1', 'ap-east-1', 'us-gov-west-1'].include?(@region) raise ArgumentError, "Unknown region: #{@region.inspect}" end end