jflow 0.4.3 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00ce3f02a925a9d23d449d6e58d5ee6e234b5053
4
- data.tar.gz: 64979f0b07f76690b8f7f6d0705936d3c4679a6f
3
+ metadata.gz: 956d76dd7b71900c4ad74f8583f14df52fa6654d
4
+ data.tar.gz: 547c6ec4c4b1bf1decf737d5d8b9e7e008b7c85d
5
5
  SHA512:
6
- metadata.gz: 15148f66af1e2011e5f1a3bf68df900548d399fba332001abff1b308c4da304820c6f3bd201fe086dd2963438c163bb9122f5516eb8617fdc3e371b69f3dbbfb
7
- data.tar.gz: 4b254b3f1313f2e99230c265f6d184f428062111ca536b36b87beb393190fab7ec0b6da7ba21fe5d47dccc67eb0725c8608258bf848e1ac03fe96126164329c0
6
+ metadata.gz: e444bde5d6ba6daec61b05b2b0f7881b694f042db91e8be84c24e2e4deb32211ffcdd15c231a72c59e17eea39334580abde8346ae6e55085ccf2cbb5744639ba
7
+ data.tar.gz: ea5996297a3c542d4a991c05f9dc0bd84d119c6001f64069d6c21ee45866dc5984fbff02895bfefa3383d26bda7d9629819cd0bc50f9ee6d3b3e90929c649519
@@ -70,7 +70,6 @@ module JFlow
70
70
  protector = JFlow::TerminationProtector.new
71
71
  loop do
72
72
  break if Thread.current.marked_for_shutdown?
73
- JFlow.configuration.logger.debug "Should protect?: #{should_protect?}"
74
73
  protector.set_protection(should_protect?) if is_ec2_instance?
75
74
  stats.tick if enable_stats
76
75
  sleep 30
@@ -18,7 +18,7 @@ module JFlow
18
18
  end
19
19
 
20
20
  def get_asg_name
21
- ec2_client = Aws::EC2::Client.new(region: region)
21
+ ec2_client = Aws::EC2::Client.new(region: region, credentials: Aws::InstanceProfileCredentials.new)
22
22
  instance_tags = ec2_client.describe_tags(filters: [
23
23
  {
24
24
  name: "resource-id",
@@ -32,9 +32,9 @@ module JFlow
32
32
  end
33
33
 
34
34
  def set_protection(protect_status)
35
- JFlow.configuration.logger.debug "Setting termination protection status to #{protect_status} for instance #{@instance_id} in region #{@region}"
35
+ JFlow.configuration.logger.debug "Setting termination protection status to #{protect_status} for instance #{instance_id} in region #{region}"
36
36
  begin
37
- asg_client = Aws::AutoScaling::Client.new(region: region)
37
+ asg_client = Aws::AutoScaling::Client.new(region: region, credentials: Aws::InstanceProfileCredentials.new)
38
38
  asg_client.set_instance_protection({
39
39
  instance_ids: [instance_id],
40
40
  auto_scaling_group_name: get_asg_name,
@@ -1,3 +1,3 @@
1
1
  module JFlow
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christophe Verbinnen