terramate-io / terramate

Terramate CLI is an open-source Infrastructure as Code (IaC) Orchestration and Code Generation tool for Terraform, OpenTofu and Terragrunt.
https://terramate.io
Mozilla Public License 2.0
3.12k stars 85 forks source link

[FEATURE] Support for Terraform functions #1754

Open crileroro opened 3 weeks ago

crileroro commented 3 weeks ago

Currently Terramate supports all functions available up to Terraform 1.5.3. It could be useful to support Terraform functions available in Terraform > 1.5.3 An example is strcontains: https://developer.hashicorp.com/terraform/language/v1.5.x/functions/strcontains

i4ki commented 2 weeks ago

Small correction: Terramate supports all functions up to Terraform v0.15.3.

Thanks for this feature request, it makes sense and we are checking the options. The problem is that v0.15.3 was the latest Terraform version with those functions exported, after this one they put them behind an internal package, which is impossible to import. The Opentofu maintainers are not interested in solving this problem in the near future also, see the issues below:

It seems we will have to fork the latest MPL version of Terraform (v1.5.5) or fork Opentofu or implement all the functions ourselves. It would be more convenient for our users if we reused their code, because we want the exact same experience but unfortunately, this is not possible atm.