Skip to content

fix: build strings for complex types differently for Terraform/Packer commands#5

Merged
chris-aavang merged 2 commits intomasterfrom
fix/handling_complex_types_for_terraform_commands
Mar 9, 2026
Merged

fix: build strings for complex types differently for Terraform/Packer commands#5
chris-aavang merged 2 commits intomasterfrom
fix/handling_complex_types_for_terraform_commands

Conversation

@chris-aavang
Copy link
Copy Markdown
Contributor

@chris-aavang chris-aavang commented Mar 2, 2026

fix(terraform,packer,cli): build strings for lists and dicts differently

Simply str()'ing complex types does not create strings in the format that Terraform requires. I also tested and fixed dicts. The fixes apply to Packer as well.

Also mentioned in the docs are sets and objects. In my testing, the changes for map and list handle those as well. Makes sense; objects are dicts with defined keys, and sets are unique list's.

Type of Change

  • Bug fix
  • New feature
  • Performance Improvement
  • Documentation update
  • Other (please describe):

Checklist

  • I have read the contributing guidelines.
  • My code follows the code style of this project.
  • I have tested my changes.
  • I have updated the documentation accordingly.
  • All tests pass successfully.
  • My changes generate no new warnings or errors.

Checklist for Reviewers

  • Code follows project standards.
  • Changesets are adequately tested.
  • Documentation is updated and accurate.
  • The purpose of the PR is clearly stated.
  • The PR title is descriptive.

@chris-aavang chris-aavang self-assigned this Mar 2, 2026
@chris-aavang chris-aavang changed the title fix: build strings for lists and dicts differently fix: build strings for lists and dicts differently for Terraform commands Mar 2, 2026
@chris-aavang chris-aavang force-pushed the fix/handling_complex_types_for_terraform_commands branch 2 times, most recently from 63c69b7 to 9b35b26 Compare March 6, 2026 00:36
Simply str()'ing complex types does not create strings in the format that Terraform requires. I also tested and fixed dicts. The fixes apply to Packer as well.
@chris-aavang chris-aavang force-pushed the fix/handling_complex_types_for_terraform_commands branch from 9b35b26 to a1dca39 Compare March 6, 2026 00:58
@chris-aavang chris-aavang marked this pull request as ready for review March 6, 2026 00:59
@chris-aavang chris-aavang requested a review from uadnan March 6, 2026 00:59
@chris-aavang chris-aavang changed the title fix: build strings for lists and dicts differently for Terraform commands fix: build strings for complex types differently for Terraform/Packer commands Mar 6, 2026
uadnan
uadnan previously approved these changes Mar 6, 2026
Copy link
Copy Markdown
Member

@uadnan uadnan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Just a minor suggestion

@chris-aavang
Copy link
Copy Markdown
Contributor Author

Thank you, Adnan. I'll merge and publish to PyPI on Monday.

If you have any other changes you'd like, feel free to make them yourself or comment.

@chris-aavang chris-aavang merged commit 906ee4e into master Mar 9, 2026
10 checks passed
@chris-aavang chris-aavang deleted the fix/handling_complex_types_for_terraform_commands branch March 9, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants