aws-ec2 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/aws_ec2/create.rb +8 -2
- data/lib/aws_ec2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caac59da7ff1ea2c83844e88b669b3caf2593b59b12caf6c18d1816849a9d6a5
|
4
|
+
data.tar.gz: 9f1490cc65e80777efd29cb97da53bedd5109d3c504c9a08bf2f638fcb6da17c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7468e5b0d35b5fa2e1cbe357da384ea425ea49167d7d3069a9772e85925b717ec2835a1585e1be6ad9eadb87f72e593cfab81bc7e2ca0de4ce830277e2b440a3
|
7
|
+
data.tar.gz: 8d9061387cc4be3ea55fea1623c3208734bbd1721efbb87acba774743395dfe25d3d784886bc5a22011978728ce5c699a9bc64b68f2f8d6577d5366f8941881d
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [1.4.4]
|
7
|
+
- add AWS_EC2_REGION env to set the region for the cloudwatch log displayed url
|
8
|
+
|
6
9
|
## [1.4.3]
|
7
10
|
- fix get_region when aws-ec2 called from an ec2 instance
|
8
11
|
|
data/lib/aws_ec2/create.rb
CHANGED
@@ -107,14 +107,20 @@ module AwsEc2
|
|
107
107
|
end
|
108
108
|
|
109
109
|
def get_region
|
110
|
-
# Highest precedence
|
110
|
+
# Highest precedence: AWS_EC2_REGION env variable. Only really used here.
|
111
|
+
if ENV['AWS_EC2_REGION']
|
112
|
+
return ENV['AWS_EC2_REGION']
|
113
|
+
end
|
114
|
+
|
115
|
+
# Pretty high in precedence: AWS_PROFILE and ~/.aws/config and
|
111
116
|
aws_found = system("type aws > /dev/null")
|
112
117
|
if aws_found
|
113
118
|
region = `aws configure get region`.strip
|
114
119
|
return region
|
115
120
|
end
|
116
121
|
|
117
|
-
# Assumes
|
122
|
+
# Assumes instance same region as the calling ec2 instance.
|
123
|
+
# It is possible for curl not to be installed.
|
118
124
|
curl_found = system("type curl > /dev/null")
|
119
125
|
if curl_found
|
120
126
|
region = `curl --connect-timeout 3 -s 169.254.169.254/latest/meta-data/placement/availability-zone | sed s'/.$//'`
|
data/lib/aws_ec2/version.rb
CHANGED