1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Allow complex values in variables parameter of terraform module (#4281) (#4341)

* Allow complex values in variables parameter

Signed-off-by: Webster Mudge <wmudge@gmail.com>

* Add changelog fragment

Signed-off-by: Webster Mudge <wmudge@gmail.com>

* Update changelogs fragments formatting

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4cc7f41395)

Co-authored-by: Webster Mudge <wmudge@cloudera.com>
This commit is contained in:
patchback[bot] 2022-03-11 06:56:07 +01:00 committed by GitHub
parent 14d43b10c1
commit d02b8507d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- terraform - fix ``variable`` handling to allow complex values (https://github.com/ansible-collections/community.general/pull/4281).

View file

@ -443,7 +443,7 @@ def main():
for k, v in variables.items(): for k, v in variables.items():
variables_args.extend([ variables_args.extend([
'-var', '-var',
'{0}={1}'.format(k, v) '{0}={1}'.format(k, json.dumps(v))
]) ])
if variables_files: if variables_files:
for f in variables_files: for f in variables_files: