Skip to content

Instantly share code, notes, and snippets.

@henrik
Created Apr 21, 2011
Embed
What would you like to do?
def aws_zone
[ ["east", "d"], ["west", "c"] ].inject([]) do |array, (zone, max)|
'a'.upto(max) { |letter| array << "us-#{zone}-1#{letter}" }
array
end.sample
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment