Groovy web console

subscribe to the feed Subscribe
to this
site
sdds (via #groovywebconsole)
tweet this snippet Tweet
this
script

sdds

Published 5 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def getEnvFromUrl() { return 'PROD' }
def getAZs(env="") { 
  if (env == "") {
    env = getEnvFromUrl()
  }
  def envMap = [ 
    'PROD': [ 'ap-southeast-2a', 'ap-southeast-2b', 'ap-southeast-2c' ]
  ]
  return envMap[env]
}
println getAZs()[0]
println getAZs()[1]
println getAZs()[2]