Sha256: cef4a3f58d2a47b8ac3dc50b15c3aab1cc5ddd6e5f4a38ae23326f52a2c74bcd

Contents?: true

Size: 269 Bytes

Versions: 227

Compression:

Stored size: 269 Bytes

Contents

require 'net/http'

module Bosh
  module Stemcell
    module Aws
      class Region
        DEFAULT = 'us-east-1'

        def name
          Net::HTTP.get('169.254.169.254', '/latest/meta-data/placement/availability-zone').chop
        end
      end
    end
  end
end

Version data entries

227 entries across 227 versions & 1 rubygems

Version Path
bosh-stemcell-1.2827.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2824.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2820.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2818.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2811.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2810.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2809.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2807.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2801.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2798.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2797.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2792.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2789.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2788.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2787.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2786.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2785.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2781.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2780.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2778.0 lib/bosh/stemcell/aws/region.rb