opentofu/internal
Daniel Banck 4fa77727b5
Introduce metadata functions command (#32487)
* Add metadata functions command skeleton

* Export functions as JSON via cli command

* Add metadata command

* Add tests to jsonfunction package

* WIP: Add metadata functions test

* Change return_type & type in JSON to json.RawMessage

This enables easier deserialisation of types when parsing the JSON.

* Skip is_nullable when false

* Update cli docs with metadata command

* Use tfdiags to report function marshal errors

* Ignore map, list and type functions

* Test Marshal function with diags

* Test metadata functions command output

* Simplify type marshaling by using cty.Type

* Add static function signatures for can and try

* Update internal/command/jsonfunction/function_test.go

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

---------

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>
2023-02-14 14:08:47 +00:00
..
addrs structured run output: impose canonical ordering on jsonstate and jsonplan packages (#32649) 2023-02-13 15:40:17 +01:00
backend Support assume role for cos backend (#32631) 2023-02-13 10:25:58 +01:00
builtin Added Quiet value (#32116) 2023-01-25 16:51:14 +00:00
checks core: Propagate check results accurately from plan to apply 2022-08-26 15:47:29 -07:00
cloud Merge pull request #32647 from hashicorp/TF-4390-backport-initial-remote-state-serial-fix 2023-02-10 15:35:37 -07:00
command Introduce metadata functions command (#32487) 2023-02-14 14:08:47 +00:00
communicator fix typo in upload size check 2022-11-11 14:25:34 -05:00
configs Fix accidental mutation of shared cty.Paths in ValueMarks funcs 2023-01-19 12:39:19 -08:00
copy test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
dag Clarify some comments in internal/dag 2022-10-06 15:10:33 -07:00
depsfile Ignore existing package hashes for providers lock command (#31389) 2022-07-20 13:27:24 +01:00
didyoumean didyoumean: move from "helper" to "internal" 2020-10-02 13:35:07 -07:00
e2e fix: pre allocate for composite literal 2022-11-22 02:20:54 +09:00
earlyconfig tfdiags: Expose the "extra information" concept from HCL 2022-06-23 13:52:23 -07:00
experiments build: Use Go 1.19 2022-08-22 10:59:12 -07:00
getmodules add XTerraformGetLimit to prevent redirect loops 2022-06-01 12:46:22 -04:00
getproviders build: Use Go 1.19 2022-08-22 10:59:12 -07:00
grpcwrap s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
helper/slowmessage remove wrapped streams and readline 2021-10-28 11:51:39 -04:00
httpclient backend/azurerm: removing ADAL support 2022-05-18 16:56:10 +02:00
initwd Use the apparentlymart/go-versions library to parse module constraints (#32377) 2022-12-14 17:02:11 +01:00
instances InstancesForModule should not panic 2021-12-17 13:31:41 -05:00
ipaddr build: Use Go 1.19 2022-08-22 10:59:12 -07:00
lang Add function descriptions (#32453) 2023-01-16 10:48:31 +00:00
legacy build: Use Go 1.19 2022-08-22 10:59:12 -07:00
logging cleanup panic output 2021-12-17 11:57:52 -05:00
modsdir sort modules.json for stable order (#32618) 2023-02-13 18:26:16 +01:00
moduledeps Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
moduletest fixup broken test fixtures 2022-07-06 13:47:35 -04:00
plans Merge pull request #32563 from hashicorp/jbardin/optional-computed-comparison-next 2023-01-25 15:05:50 -05:00
plugin s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
plugin6 fix: pre allocate for composite literal 2022-11-22 02:20:54 +09:00
provider-simple s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
provider-simple-v6 s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
provider-terraform/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
providercache cliconfig: Allow forcing use of the plugin cache despite the lock file 2023-01-25 08:23:01 -08:00
providers s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
provisioner-local-exec/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provisioners Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
refactoring allow cross-package move statements (#31556) 2022-08-16 16:52:57 +02:00
registry revert "run goimports" 2022-08-01 16:26:26 -05:00
repl Unify all sensitive value plan output as "(sensitive value)" 2022-10-24 12:50:46 -06:00
replacefile Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
states Update internal/states/remote/state.go 2023-02-07 17:35:56 -05:00
terminal remove the use of panicwrap 2021-10-28 11:51:39 -04:00
terraform Merge pull request #32664 from hashicorp/alisdair/do-not-add-orphan-nodes-for-deposed-instances 2023-02-13 09:50:48 -05:00
tfdiags build: Use Go 1.19 2022-08-22 10:59:12 -07:00
tfplugin5 go get cloud.google.com/go/storage@v1.28.0 (#32203) 2022-11-21 13:14:55 +00:00
tfplugin6 go get cloud.google.com/go/storage@v1.28.0 (#32203) 2022-11-21 13:14:55 +00:00