|
1 |
| -# Terraform/OpenTofu Provider: Core Functions |
| 1 | +# Core Functions |
2 | 2 |
|
3 | 3 | [](https://registry.terraform.io/providers/northwood-labs/corefunc/latest/docs)
|
4 | 4 | [](https://search.opentofu.org/provider/northwood-labs/corefunc/latest)
|
|
16 | 16 |
|
17 | 17 | ## Overview
|
18 | 18 |
|
19 |
| -Utilities that should have been Terraform/OpenTofu _core functions_. |
| 19 | +Core functions with identical implementations for [Terraform], [OpenTofu], [Terratest], and other software in the so-called _Terra/Fu_ ecosystem. |
20 | 20 |
|
21 |
| -While some of these _can_ be implemented in HCL, some of them begin to push up against the limits of Terraform and the HCL2 configuration language. We also perform testing using the [Terratest](https://terratest.gruntwork.io) framework on a regular basis. Exposing these functions as both a Go library as well as a Terraform/OpenTofu provider enables us to use the same functionality in both our Terraform/OpenTofu applies as well as while using a testing framework. |
| 21 | +While some of these _can_ be implemented in HCL, some of them begin to push up against the limits of Terraform and the HCL2 configuration language. Exposing these functions as both a Go library as well as a Terraform/OpenTofu provider enables us to use the same functionality in both our Terraform/OpenTofu applies as well as while using a testing framework. |
22 | 22 |
|
23 |
| -> [!NOTE] |
24 |
| -> While it’s common knowledge that Terraform is great at standing up and managing Cloud infrastructure, it’s also good at running _anything with an API_. People regularly manage [code repositories], [DNS records], [feature flags], [identity and access management], [content delivery], [passwords], [monitoring], [alerts], [zero trust network access], [cryptographic signatures], and can even [order a pizza]. |
25 |
| -> |
26 |
| -> This provider is more analogous to HashiCorp’s _utility_ providers such as [local], [external], and [archive]. |
27 |
| -
|
28 |
| -Since earlier versions of Terraform/OpenTofu didn't have the concept of user-defined functions, the next step to open up the possibilities was to write a custom Provider which has the functions built-in, using existing support for inputs and outputs. |
29 |
| - |
30 |
| -**This does not add new syntax or constructs.** Instead it uses the _existing_ concepts around Providers, Resources, Data Sources, Variables, Outputs, and Functions to expose new custom-built functionality. |
31 |
| - |
32 |
| -The goal of this provider is not to call any APIs, but to provide pre-built functions in the form of _Data Sources_ or _Provider Functions_. |
| 23 | +The goal of this provider is not to call any network APIs, but to provide pre-built functions in the form of _Data Sources_ or _Provider Functions_. |
33 | 24 |
|
34 | 25 | ## Vote for features!
|
35 | 26 |
|
36 |
| -[View the list of issues](https://github.com/northwood-labs/terraform-provider-corefunc/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc), and give a thumbs-up to the ones you'd like to see. This is how I prioritize the work. |
| 27 | +[View the list of issues](https://github.com/northwood-labs/terraform-provider-corefunc/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc), and give a thumbs-up to the ones you'd like to see. This is how we prioritize the work. |
37 | 28 |
|
38 | 29 | ## Compatibility testing
|
39 | 30 |
|
40 | 31 | * We have automated testing that runs on every commit and every pull request.
|
41 | 32 | * We intend for the Go libraries to work with all non-EOL versions of Go (i.e., current, current-1).
|
42 | 33 | * Built using the [Terraform Plugin Framework][TPF], which speaks [Terraform Protocol v6][tfproto6].
|
43 | 34 |
|
44 |
| -| Testing type | Details | Description | |
45 |
| -|--------------|-------------------|--------------------------------------------------------------------------------| |
46 |
| -| integration | Terraform 1.0–1.9 | Executes the provider with this release, pulling from `registry.terraform.io`. | |
47 |
| -| integration | OpenTofu 1.6–1.8 | Executes the provider with this release, pulling from `registry.opentofu.org`. | |
48 |
| -| unit | Go 1.22–1.23 | Tests using these versions. | |
49 |
| -| mutation | Go 1.22–1.23 | Tests using these versions. | |
50 |
| -| fuzz | Go 1.22–1.23 | Tests using these versions. | |
51 |
| -| terratest | Go 1.22–1.23 | Tests using these versions. | |
| 35 | +| Testing type | Details | Description | |
| 36 | +|--------------|--------------------|--------------------------------------------------------------------------------| |
| 37 | +| integration | Terraform 1.0–1.11 | Executes the provider with this release, pulling from `registry.terraform.io`. | |
| 38 | +| integration | OpenTofu 1.6–1.9 | Executes the provider with this release, pulling from `registry.opentofu.org`. | |
| 39 | +| unit | Go 1.23–1.24 | Tests using these versions. | |
| 40 | +| mutation | Go 1.23–1.24 | Tests using these versions. | |
| 41 | +| fuzz | Go 1.23–1.24 | Tests using these versions. | |
| 42 | +| terratest | Go 1.23–1.24 | Tests using these versions. | |
52 | 43 |
|
53 | 44 | ## Usage Examples
|
54 | 45 |
|
@@ -108,8 +99,11 @@ terraform-provider-corefunc version
|
108 | 99 | [identity and access management]: https://registry.terraform.io/providers/okta/okta/latest/docs
|
109 | 100 | [local]: https://registry.terraform.io/providers/hashicorp/local/latest/docs
|
110 | 101 | [monitoring]: https://registry.terraform.io/providers/DataDog/datadog/latest
|
| 102 | +[OpenTofu]: https://opentofu.org |
111 | 103 | [order a pizza]: https://registry.terraform.io/providers/MNThomson/dominos/latest/docs
|
112 | 104 | [passwords]: https://registry.terraform.io/providers/1Password/onepassword/latest/docs
|
| 105 | +[Terraform]: https://terraform.io |
| 106 | +[Terratest]: https://terratest.gruntwork.io |
113 | 107 | [tfproto6]: https://developer.hashicorp.com/terraform/plugin/terraform-plugin-protocol#protocol-version-6
|
114 | 108 | [TPF]: https://github.com/hashicorp/terraform-plugin-framework
|
115 | 109 | [zero trust network access]: https://registry.terraform.io/providers/zscaler/zpa/latest/docs
|
0 commit comments