hashicorp / terraform-provider-kubernetes

Terraform Kubernetes provider
https://www.terraform.io/docs/providers/kubernetes/
Mozilla Public License 2.0
1.6k stars 979 forks source link

CI: set `TF_ACC_TERRAFORM_VERSION` in workflow instead of repo variable #2550

Closed BBBmau closed 4 months ago

BBBmau commented 4 months ago

Description

configuration variables have a limited scope, preventing them from being used in pull requests. This causes the Deferred Actions workflow to fail since ${{ vars.TERRAFORM_VERSION_EXP }} doesn't return the version but instead just an empty string. This is a known issue across github: https://github.com/orgs/community/discussions/44322

This is seen in a recent review of a PR: https://github.com/hashicorp/terraform-provider-helm/actions/runs/9781860920/job/27387198282?pr=1247

Solution is to explicitly set it in the workflow rather than rely on a repo variable.

We can see the new workflow passing here: I triggered a dispatch where the input for the version is empty, this would then use the explicit tf version that's set in this PR. https://github.com/hashicorp/terraform-provider-helm/actions/runs/9959691833/job/27517098279

Acceptance tests

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

...

References

Community Note