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

feat: Remove dependency on deprecated hashicorp/template provider #1297

Merged
merged 6 commits into from
May 17, 2021

Conversation

dmsalomon
Copy link
Contributor

@dmsalomon dmsalomon commented Apr 12, 2021

PR o'clock

Description

hashicorp/template is deprecated, and the templatefile function should be used instead. In particular, this is problem on new Apple silicon Macs, since the hashicorp/template provider is not implemented (and I don't ever will be) for darwin_arm64.

Resolves #1294

I have replaced the "template_file" data sources with local variables that store the outputs to function calls using template. There is actually very little that has changed since the resource arguments map cleanly to the function arguments. I had to use an explicit for loop to render the templates for every node, instead of using the count meta-argument.

I'm relatively new to Terraform, so all critiques are appreciated.

Checklist

hashicorp/template is deprecated, and the templatefile function should be used instead.
@barryib
Copy link
Member

barryib commented Apr 19, 2021

This break some use cases. For the record, see hashicorp/terraform#24978

@barryib
Copy link
Member

barryib commented May 4, 2021

@dmsalomon Thanks for working on this. Can you please upgrade your branch ?

@barryib barryib self-assigned this May 4, 2021
@dmsalomon dmsalomon changed the title Remove dependency on deprecated hashicorp/template fix: remove dependency on deprecated hashicorp/template May 4, 2021
@dmsalomon
Copy link
Contributor Author

@barryib Thanks for taking a look at this, I just upgraded the branch.

@barryib barryib changed the title fix: remove dependency on deprecated hashicorp/template feat: Remove dependency on deprecated hashicorp/template May 5, 2021
versions.tf Show resolved Hide resolved
@barryib barryib changed the title feat: Remove dependency on deprecated hashicorp/template feat: Remove dependency on deprecated hashicorp/template provider May 17, 2021
@barryib barryib merged commit f7d09a2 into terraform-aws-modules:master May 17, 2021
@barryib
Copy link
Member

barryib commented May 17, 2021

Thanks @dmsalomon for your contribution.

@barryib
Copy link
Member

barryib commented May 17, 2021

This now shipped in v16.0.0

barryib pushed a commit to barryib/terraform-aws-eks that referenced this pull request May 20, 2021
…erraform-aws-modules#1297)

BREAKING CHANGES: We remove the dependency on the deprecated `hashicorp/template` provider and use the Terraform built in `templatefile` function. This will broke some workflows due to previously being able to pass in the raw contents of a template file for processing. The `templatefile` function requires a template file that exists before running a plan.
ArchiFleKs pushed a commit to ArchiFleKs/terraform-aws-eks that referenced this pull request Jun 1, 2021
…erraform-aws-modules#1297)

BREAKING CHANGES: We remove the dependency on the deprecated `hashicorp/template` provider and use the Terraform built in `templatefile` function. This will broke some workflows due to previously being able to pass in the raw contents of a template file for processing. The `templatefile` function requires a template file that exists before running a plan.
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated "registry.terraform.io/hashicorp/template"
2 participants