stack_master 2.8.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d401f198bf80974977c8b031f27422ea84aa171f18747fa6064cf6d9d2af784
4
- data.tar.gz: dd930994d8034f57d60ba1a77d8bfee0f524301501306a3d8cee64502c27029e
3
+ metadata.gz: 2ba7ee171f7c218998ce73593d18bb62165c40a201f088b51192a7cfc1d8fb10
4
+ data.tar.gz: 368a14a56b4cbd7678d71860902c1e1d360756c6272bd1fc6a7b1b6f5ac8f7c3
5
5
  SHA512:
6
- metadata.gz: de26f0ce262ef2b4b11cced8789a8093896d9bd7db6950008ad7e0e469ea43a9752fbbcb0e4b57271656442aa7bb13dc159697690d0a0754fcbc9ecce39d07b0
7
- data.tar.gz: 0ef954037a433821d09b90acbbd39da5a881044f305353267cba379a07e77bd2ffe7645700b8ce927d15d7f518c823aa17a42f0c9971ce3c37b29f5164a8b219
6
+ metadata.gz: 6eb37d06cd15fbf0852f7c798a18b35747b001d8ffe1edfcdf55c25c629e46d731c47dc5466e8af7275512f6f2dac54b492c714069dfded2c78ab6920bea04af
7
+ data.tar.gz: 03c242ee5d588b817a53d1bf74e6808c762d37047805fcd79b18c73d5f2e84ce87ed8114efe7ea583f05d71449b4d64b50f4cce7395b72784d9c44837cb9579d
@@ -219,9 +219,10 @@ module StackMaster
219
219
  c.syntax = 'stack_master drift [region_or_alias] [stack_name]'
220
220
  c.summary = 'Detects and displays stack drift using the CloudFormation Drift API'
221
221
  c.description = 'Detects and displays stack drift'
222
+ c.option '--timeout SECONDS', Integer, "The number of seconds to wait for drift detection to complete"
222
223
  c.example 'view stack drift for a stack named myapp-vpc in us-east-1', 'stack_master drift us-east-1 myapp-vpc'
223
224
  c.action do |args, options|
224
- options.default config: default_config_file
225
+ options.default config: default_config_file, timeout: 120
225
226
  execute_stacks_command(StackMaster::Commands::Drift, args, options)
226
227
  end
227
228
  end
@@ -88,17 +88,17 @@ module StackMaster
88
88
  end
89
89
 
90
90
  def wait_for_drift_results(detection_id)
91
- try_count = 0
92
91
  resp = nil
92
+ start_time = Time.now
93
93
  loop do
94
- if try_count >= 10
95
- raise 'Failed to wait for stack drift detection after 10 tries'
96
- end
97
-
98
94
  resp = cf.describe_stack_drift_detection_status(stack_drift_detection_id: detection_id)
99
95
  break if DETECTION_COMPLETE_STATES.include?(resp.detection_status)
100
96
 
101
- try_count += 1
97
+ elapsed_time = Time.now - start_time
98
+ if elapsed_time > @options.timeout
99
+ raise "Timeout waiting for stack drift detection"
100
+ end
101
+
102
102
  sleep SLEEP_SECONDS
103
103
  end
104
104
  resp
@@ -1,3 +1,3 @@
1
1
  module StackMaster
2
- VERSION = "2.8.0"
2
+ VERSION = "2.9.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Hodgkiss
@@ -541,8 +541,8 @@ licenses:
541
541
  metadata:
542
542
  bug_tracker_uri: https://github.com/envato/stack_master/issues
543
543
  changelog_uri: https://github.com/envato/stack_master/blob/master/CHANGELOG.md
544
- documentation_uri: https://www.rubydoc.info/gems/stack_master/2.8.0
545
- source_code_uri: https://github.com/envato/stack_master/tree/v2.8.0
544
+ documentation_uri: https://www.rubydoc.info/gems/stack_master/2.9.0
545
+ source_code_uri: https://github.com/envato/stack_master/tree/v2.9.0
546
546
  post_install_message:
547
547
  rdoc_options: []
548
548
  require_paths: