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.2922.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2915.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2905.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2902.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2891.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2889.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2881.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2865.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2862.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2859.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2858.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2855.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2852.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2849.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2847.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2840.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2839.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2831.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2830.0 lib/bosh/stemcell/aws/region.rb
bosh-stemcell-1.2829.0 lib/bosh/stemcell/aws/region.rb