Commit Graph

24 Commits

Author SHA1 Message Date
Christian Mesh
b2bf39802a Implement the first part of RFC 20250303-linter-policy (#2577)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2025-03-10 13:16:27 -04:00
Martin Atkins
972324e5ea lang: Factor out the base function table
Whichever function were responsible for instantiating this map would
inevitably end up scaling in length based on the number of funtions and
thus violate the function length linter.

As a compromise, we'll factor out the function table into its own function
that is exempt from that linter but focused only on constructing the base
function table, and then Scope.Functions can be shorter by dealing only
with the scope-specific customizations of the returned table.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-01-06 08:39:01 -08:00
Nathan Baulch
ea558d9d4b Fix typos (#1905)
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2024-08-29 13:20:33 -04:00
Christian Mesh
a69d19d9f3 Allow configured providers to provide additional functions. (#1491)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-04-18 15:11:38 +02:00
Christian Mesh
b868012192 Integrate provider functions (#1439)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-04-10 08:04:08 -04:00
Jonas Bakken
fc5ffe4edd feat: implement issensitive function (#1381)
Signed-off-by: Jonas Bakken <jonasbakken@protonmail.com>
2024-03-13 11:22:58 +01:00
Pooria Ghaedi
b5889b10eb Feat: urldecode function #1234 (#1283)
Signed-off-by: pooriaghaedi <pooria.ghaedi@gmail.com>
2024-03-01 15:09:45 +00:00
Sanskruti Shahu
835dcb8121 Added templatestring function similar to templatefile (#1223)
Signed-off-by: sanskruti-shahu <sanskruti.shahu@harness.io>
Signed-off-by: Sanskruti Shahu <76054960+sanskruti-shahu@users.noreply.github.com>
Co-authored-by: James Humphries <James@james-humphries.co.uk>
2024-02-28 09:56:05 -05:00
namgyalangmo
cb2e9119aa Update copyright notice (#1232)
Signed-off-by: namgyalangmo <75657887+namgyalangmo@users.noreply.github.com>
2024-02-08 09:48:59 +00:00
Marcin Wyszynski
b524b6140c Implement cidrcontains function (#366) 2024-01-11 23:33:55 +01:00
Kuba Martin
47c34d05e2 Refactor base64gunzip function to be more in line with other functions. (#1077)
Signed-off-by: Jakub Martin <kubam@spacelift.io>
2024-01-08 15:05:20 +01:00
l-with
ae5ec54458 implement gunzipbase64 (#799)
Signed-off-by: Lars With <lars@with.de>
2023-12-21 11:16:15 -05:00
Yaron Yarimi
059190f273 Rename multiple packages to OpenTofu (#488) 2023-09-20 15:59:27 +03:00
Yaron Yarimi
c8acedd885 Rename github.com/placeholderplaceholderplaceholder/opentf to github.com/opentofu/opentofu (#461) 2023-09-20 14:35:35 +03:00
RLRabinowitz
650b1a339a Adjust mentions of terraform in internal/lang 2023-08-23 11:12:15 +03:00
Kuba Martin
ebcf7455eb Rename root module name. (#4)
* Rename module name from "github.com/hashicorp/terraform" to "github.com/placeholderplaceholderplaceholder/opentf".

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Gofmt.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Regenerate protobuf.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix comments.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Undo issue and pull request link changes.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Undo comment changes.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix comment.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Undo some link changes.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* make generate && make protobuf

Signed-off-by: Jakub Martin <kubam@spacelift.io>

---------

Signed-off-by: Jakub Martin <kubam@spacelift.io>
2023-08-17 14:45:11 +02:00
hashicorp-copywrite[bot]
325d18262e [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
Zac Clifton
3bb6a5896b Feat: Add strcontains function and documentation (#33069)
* add strcontains function and documentation
2023-04-26 20:41:32 +01:00
Liam Cervante
aae6990d38 Add native plantimestamp function to Terraform (#32980)
* add plantimestamp function

* documentation

* add missing links

* fix typo
2023-04-21 09:47:28 +02:00
Daniel Banck
4fd8322802 Add function descriptions (#32453)
* Add consolidated function description list

* Add function parameter descriptions

* Add descriptions to all functions

* Add sanity test for function descriptions

* Apply suggestions from code review

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>
2023-01-16 10:48:31 +00:00
Martin Atkins
2ee9589650 lang/funcs: "timecmp" function
This is a complement to "timestamp" and "timeadd" which allows
establishing the ordering of two different timestamps while taking into
account their timezone offsets, which isn't otherwise possible using the
existing primitives in the Terraform language.
2022-08-25 10:15:42 -07:00
Joshua Barton
c73c0ad63c feat: add startswith and endswith funcs 2022-06-30 18:30:32 -05:00
Alisdair McDiarmid
718b0875ef lang: Remove defaults function
Now that we are able to specify optional object attribute defaults
inline in a type constraint, the separate `defaults` function is no
longer needed.
2022-06-01 06:40:37 -04:00
Martin Atkins
cdd9464f9a Move lang/ to internal/lang/
This is part of a general effort to move all of Terraform's non-library
package surface under internal in order to reinforce that these are for
internal use within Terraform only.

If you were previously importing packages under this prefix into an
external codebase, you could pin to an earlier release tag as an interim
solution until you've make a plan to achieve the same functionality some
other way.
2021-05-17 14:09:07 -07:00