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

Fix broken Terraform example #1042

Merged
merged 1 commit into from Jan 13, 2022
Merged

Fix broken Terraform example #1042

merged 1 commit into from Jan 13, 2022

Conversation

josh-padnick
Copy link
Contributor

@josh-padnick josh-padnick commented Dec 30, 2021

The previous version of this code failed with Terraform 0.12+ on an M1 Mac with the following error:

Error: Incompatible provider version

Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a
package available for your current platform, darwin_arm64.

Provider releases are separate from Terraform CLI releases, so not all
providers are available for all platforms. Other versions of this provider
may have different platforms supported.

The issue is that the template_file resource is now deprecated and no download exists for darwin_arm64 for this provider.

I considered using the now current templatefile function, but we don't have any files from which we're reading templates in this example, so I used the more idiomatic variable interpolation.

The previous version of this code failed with Terraform 0.12+ on an M1 Mac with the following error:

│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a
│ package available for your current platform, darwin_arm64.
│
│ Provider releases are separate from Terraform CLI releases, so not all
│ providers are available for all platforms. Other versions of this provider
│ may have different platforms supported.

The issue is that the `template_file` directive is now deprecated and no download exists for darwin_amd64 for this provider.

I considered using the now current templatefile directive, but we don't have any files from which we're reading templates, so I used the more idiomatic variable interpolation.
Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

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

Why were there template_file data sources in the first place? Were we rendering any templates in the examples or tests?

Copy link
Contributor

@yorinasub17 yorinasub17 left a comment

Choose a reason for hiding this comment

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

LGTM! I suspect we had those template_file data sources to make the test more "interesting."

The build failure is unrelated to this PR, so will go ahead and merge this in.

@yorinasub17 yorinasub17 merged commit 499f904 into master Jan 13, 2022
@yorinasub17 yorinasub17 deleted the fix-test-example branch January 13, 2022 22:27
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.

None yet

3 participants