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

docs: Include tfversion checking in function acceptance testing #945

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

bflad
Copy link
Member

@bflad bflad commented Mar 6, 2024

Provider-defined functions are only supported in Terraform 1.8 and later. Provider developers that run acceptance testing across multiple Terraform versions will likely want to know how to setup their tests to avoid test failures in earlier versions of Terraform.

The terraform-plugin-testing v1.7.0 release earlier this week contains the tfversion.Version1_8_0 variable which makes this setup easier. Other recent terraform-plugin-testing versions support the TerraformVersionChecks handling, although developers would need to "manually" create the version with go-version via version.Must(version.NewVersion("1.8.0")).

Provider-defined functions are only supported in Terraform 1.8 and later. Provider developers that run acceptance testing across multiple Terraform versions will likely want to know how to setup their tests to avoid test failures in earlier versions of Terraform.

The terraform-plugin-testing v1.7.0 release earlier this week contains the `tfversion.Version1_8_0` variable which makes this setup easier. Other recent terraform-plugin-testing versions support the `TerraformVersionChecks` handling, although developers would need to "manually" create the version with `go-version` via `version.Must(version.NewVersion("1.8.0"))`.
@bflad bflad added the documentation Improvements or additions to documentation label Mar 6, 2024
@bflad bflad requested a review from a team as a code owner March 6, 2024 14:39
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Contributor

@bendbennett bendbennett left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@bflad bflad added this to the v1.7.0 milestone Mar 6, 2024
@bflad bflad merged commit 4ca1115 into main Mar 6, 2024
4 checks passed
@bflad bflad deleted the bflad/function-testing-tfversion branch March 6, 2024 21:01
Copy link

github-actions bot commented Apr 6, 2024

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 contributions.
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 Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants