hashicorp / setup-terraform

Sets up Terraform CLI in your GitHub Actions workflow.
https://developer.hashicorp.com/terraform/tutorials/automation/github-actions
Mozilla Public License 2.0
1.35k stars 237 forks source link

replace null_resource with terraform_data #354

Closed rdhar-tc closed 10 months ago

rdhar-tc commented 11 months ago

The terraform_data resource type is the native null_resource replacement.

hashicorp-cla commented 11 months ago

CLA assistant check
All committers have signed the CLA.

austinvalle commented 10 months ago

Hey there @rdhar 👋🏻 , thanks for the suggestion!

While terraform_data should be preferred over null_resource as you mentioned, in our use-case here it's being used to test the terraform init and terraform apply workflow (which using null_resource will actually install a provider here): https://github.com/hashicorp/setup-terraform/blob/e192cfcbae6c6ed207c277ed7624131996c9bf13/.github/workflows/setup-terraform.yml#L248-L279

I'm going to close this for now, but eventually if null_resource is ever deprecated we can come back and update this with a different provider, like say hashicorp/random.

github-actions[bot] commented 3 months ago

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.