diff --git a/changelogs/fragments/4368-reverts-4281.yml b/changelogs/fragments/4368-reverts-4281.yml new file mode 100644 index 0000000000..b179ac7801 --- /dev/null +++ b/changelogs/fragments/4368-reverts-4281.yml @@ -0,0 +1,3 @@ +bugfixes: + - "terraform - revert bugfix https://github.com/ansible-collections/community.general/pull/4281 that tried to fix ``variable`` handling to allow complex values. + It turned out that this was breaking several valid use-cases (https://github.com/ansible-collections/community.general/issues/4367, https://github.com/ansible-collections/community.general/pull/4370)." diff --git a/plugins/modules/cloud/misc/terraform.py b/plugins/modules/cloud/misc/terraform.py index 310dd77c8e..8eca14e712 100644 --- a/plugins/modules/cloud/misc/terraform.py +++ b/plugins/modules/cloud/misc/terraform.py @@ -443,7 +443,7 @@ def main(): for k, v in variables.items(): variables_args.extend([ '-var', - '{0}={1}'.format(k, json.dumps(v)) + '{0}={1}'.format(k, v) ]) if variables_files: for f in variables_files: