idlc-sdk-deploy 1.0.27 → 1.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/idlc-sdk-deploy/config.rb +10 -1
- data/lib/idlc-sdk-deploy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e32fbb181f7a6f8c2eb7928b2891e6eb1cec9655adcc666f0cdb7d111bd0079a
|
4
|
+
data.tar.gz: ccaeae4f19cbdcbd59bfc755beef5623a4a1f23d1a6432b1cbb4b376991b7857
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31b1e60df40195f6fb5088617b94a1eda5a54543aaf261709168279849d490efb7b76a42cadf8263d5db468291c7f9c78a22c5165718da9d6df2f086f67ba38e
|
7
|
+
data.tar.gz: cd8859dde5433905066a5e220ca02b6d0e12978f5e398be5367978e6159158a9340c7da6612e1b2d916e9dc9eff6c33a95194b9711c3a689d2eda0a972453b15
|
@@ -26,7 +26,7 @@ module Idlc
|
|
26
26
|
# This method is meant to be run on an instance inside of a chef run to
|
27
27
|
# provision instance and environment metadata.
|
28
28
|
|
29
|
-
ENV['AWS_REGION'] =
|
29
|
+
ENV['AWS_REGION'] = get_region
|
30
30
|
|
31
31
|
# Get the current instance id from the instance metadata.
|
32
32
|
instance = get_instance
|
@@ -89,6 +89,15 @@ module Idlc
|
|
89
89
|
metadata
|
90
90
|
end
|
91
91
|
|
92
|
+
def get_region
|
93
|
+
# Get the current az from the instance metadata.
|
94
|
+
metadata_endpoint = 'http://169.254.169.254/latest/meta-data/'
|
95
|
+
az = Net::HTTP.get( URI.parse( metadata_endpoint + 'placement/availability-zone' ) )
|
96
|
+
|
97
|
+
# return
|
98
|
+
az[0..-2]
|
99
|
+
end
|
100
|
+
|
92
101
|
def get_instance
|
93
102
|
# Get the current instance id from the instance metadata.
|
94
103
|
metadata_endpoint = 'http://169.254.169.254/latest/meta-data/'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: idlc-sdk-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Cazell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|