Exclude stack policy when running in check mode. (#31940)

Fixes #31931
This commit is contained in:
Ted Timmons 2017-10-26 09:32:48 -07:00 committed by Sloane Hertel
parent 17a008654a
commit 9322486ac3

View file

@ -539,7 +539,8 @@ def main():
else:
stack_params['NotificationARNs'] = []
if module.params['stack_policy'] is not None:
# can't check the policy when verifying.
if module.params['stack_policy'] is not None and not module.check_mode:
stack_params['StackPolicyBody'] = open(module.params['stack_policy'], 'r').read()