Fix error on ec2 status change
Both `source_dest_check` and `termination_protection` variables are not available within the scope of the startstopec2 instance method. This just pulls them from module.params.
This commit is contained in:
parent
3a9d046f96
commit
7fd3262c3c
1 changed files with 2 additions and 0 deletions
|
@ -1228,6 +1228,8 @@ def startstop_instances(module, ec2, instance_ids, state, instance_tags):
|
||||||
wait_timeout = int(module.params.get('wait_timeout'))
|
wait_timeout = int(module.params.get('wait_timeout'))
|
||||||
changed = False
|
changed = False
|
||||||
instance_dict_array = []
|
instance_dict_array = []
|
||||||
|
source_dest_check = module.params.get('source_dest_check')
|
||||||
|
termination_protection = module.params.get('termination_protection')
|
||||||
|
|
||||||
if not isinstance(instance_ids, list) or len(instance_ids) < 1:
|
if not isinstance(instance_ids, list) or len(instance_ids) < 1:
|
||||||
# Fail unless the user defined instance tags
|
# Fail unless the user defined instance tags
|
||||||
|
|
Loading…
Reference in a new issue