lib/convection/model/template/resource_attribute/update_policy.rb in convection-1.1.0 vs lib/convection/model/template/resource_attribute/update_policy.rb in convection-1.1.1
- old
+ new
@@ -7,10 +7,11 @@
# Represents {http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html}
class UpdatePolicy < ResourceAttribute
@pause = 'PT5M'
@min_in_service = 0
@max_batch = 1
+ @wait_on_res = false
def pause_time(val)
@pause = val
end
@@ -20,19 +21,23 @@
def max_batch_size(val)
@max_batch = val
end
+ def wait_on_resource_signals(val)
+ @wait_on_res = val
+ end
+
def render(resource)
resource.tap do |r|
r['UpdatePolicy'] = {
'AutoScalingScheduledAction' => {
'IgnoreUnmodifiedGroupSizeProperties' => true
},
'AutoScalingRollingUpdate' => {
'MinInstancesInService' => @min_in_service,
'MaxBatchSize' => @max_batch,
- 'WaitOnResourceSignals' => false,
+ 'WaitOnResourceSignals' => @wait_on_res,
'PauseTime' => @pause
}
}
end
end