Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform template_file remediation #24

Closed
wants to merge 8 commits into from
Closed

Terraform template_file remediation #24

wants to merge 8 commits into from

Conversation

joshSpreston
Copy link

@joshSpreston joshSpreston commented Oct 11, 2022

what

  • All references to the deprecated hashicorp/template module have been replaced with the in-built function templatefile

why

  • The hashicorp/template module has been retired by HashiCorp. It is no longer under development.
  • Users with modern Macbook ARM processors, such as the M1, cannot utilize this module, as it has no arm64 build.

references

@woz5999

@joshSpreston joshSpreston requested review from a team as code owners October 11, 2022 22:50
@woz5999 woz5999 self-requested a review October 11, 2022 23:16
@joshSpreston joshSpreston requested a review from a team as a code owner October 12, 2022 01:08
@woz5999
Copy link

woz5999 commented Oct 12, 2022

/test all

@woz5999
Copy link

woz5999 commented Oct 12, 2022

/rebuild-readme

…ediation"

This reverts commit 455eb709be05228af85c2f218c47d3aeff477993.
mistakenly treated certain values as though they were from a `for_each` statement, rather than a `for`
@joshSpreston
Copy link
Author

/test all

1 similar comment
@woz5999
Copy link

woz5999 commented Oct 13, 2022

/test all

@woz5999
Copy link

woz5999 commented Oct 13, 2022

@Nuru we're trying to get M1 working and seem to be running into the same issue you came across in the past: hashicorp/terraform#26838 (comment)

I think this would be worked around by writing the remote config templates to disk using a local_file resource to write out the templates to disk and then pass them back into templatefile. any feedback on this approach?

@nitrocode
Copy link
Member

nitrocode commented Oct 17, 2022

@woz5999 have you been able to test out your PR branch?

The tests seem to have failed. Unfortunately you cannot use the local_file to write a file and then pass it to templatefile() because templatefile reads the file prior the terraform plan. There is no templatestring() function either.

Options

  1. Use a forked version of the template provider that supports arm like gxben's fork.
  2. Create a module that replaces the template string functionality and then use that module here

Reference

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.

Unable to initialize module on ARM
4 participants