1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

Update elasticache mocking regions

Add all regions specified in https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/RegionsAndAZs.html#SupportedRegions
This commit is contained in:
Vadim Kazakov 2020-01-21 10:10:46 -07:00 committed by GitHub
parent 21dc3f3f61
commit 57686461ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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