EppO / terraform-provider-environment

The Environment Terraform Provider exposes Shell environment variables as Terraform Datasources.
43 stars 2 forks source link

Optionally implement terraform-provider-environment as a provider-defined function for Terraform 1.8+ #452

Open crw opened 6 months ago

crw commented 6 months ago

Thank you for supporting the Terraform community with this data provider! If you were using the data provider construct to work around the lack of support in Terraform for external functions, please consider the following new feature of Terraform.

Terraform version 1.8 launches with support of provider-defined functions. It is now possible to implement this functionality as a function, rather than wrap the functionality in a data provider. Provider-based functions have the advantage of a simpler in-line syntax that does not require the data block (or any other resource blocks) to use.

The caveat is that, as provider-defined functions are new to Terraform 1.8, you would need to continue to maintain the current data provider functionality if you wished to continue to support earlier versions of Terraform.

Please see the provider-defined functions documentation to learn how to implement functions in your providers. If you have any questions, please visit the Terraform topic in our official forum.

We greatly appreciate your support of the Terraform community with your contributions. If you do not wish to implement this functionality as a function, please feel free to close this issue. This issue is simply to raise awareness of the new capability. Thanks again!

EppO commented 4 months ago

Thanks for bringing this to my attention, this looks indeed interesting to make this provider simpler, I'll look at it when I have some time.