diff --git a/changelogs/fragments/6497-terraform-fix.yml b/changelogs/fragments/6497-terraform-fix.yml new file mode 100644 index 0000000000..8b5119722c --- /dev/null +++ b/changelogs/fragments/6497-terraform-fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - "terraform - fix broken ``warn()`` call (https://github.com/ansible-collections/community.general/pull/6497)." diff --git a/plugins/modules/terraform.py b/plugins/modules/terraform.py index bbafad0e9e..554bb48f8b 100644 --- a/plugins/modules/terraform.py +++ b/plugins/modules/terraform.py @@ -315,7 +315,7 @@ def _state_args(state_file): if not state_file: return [] if not os.path.exists(state_file): - module.warn(msg='Could not find state_file "{0}", the process will not destroy any resources, please check your state file path.'.format(state_file)) + module.warn('Could not find state_file "{0}", the process will not destroy any resources, please check your state file path.'.format(state_file)) return ['-state', state_file]