mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Terraform module: pass plan_file argument correctly
Per #39611 the `terraform` module wasn't properly building plan-only files.
This commit is contained in:
@@ -255,7 +255,7 @@ def main():
|
||||
needs_application, changed = True, True
|
||||
|
||||
if state == 'planned':
|
||||
plan_file, needs_application = build_plan(command[0], project_path, variables_args, state_file)
|
||||
plan_file, needs_application = build_plan(command[0], project_path, variables_args, state_file, plan_file)
|
||||
if state == 'absent':
|
||||
# deleting cannot use a statefile
|
||||
needs_application = True
|
||||
@@ -266,7 +266,7 @@ def main():
|
||||
elif plan_file and not os.path.exists(plan_file):
|
||||
module.fail_json(msg='Could not find plan_file "{0}", check the path and try again.'.format(plan_file))
|
||||
else:
|
||||
plan_file, needs_application = build_plan(command[0], project_path, variables_args, state_file)
|
||||
plan_file, needs_application = build_plan(command[0], project_path, variables_args, state_file, plan_file)
|
||||
command.append(plan_file)
|
||||
|
||||
if needs_application and not module.check_mode and not state == 'planned':
|
||||
|
||||
Reference in New Issue
Block a user