opentofu/internal
Martin Atkins 8405f46bc5 tfdiags: Expose the "extra information" concept from HCL
HCL's diagnostic model now includes the idea of "extra information" which
works by attaching an initially-opaque interface value to each diagnostic
and then asking callers to type-assert against that value to sniff for
particular interfaces in order to discover additional machine-readable
context about a certain diagnostic message.

This commit echoes that idea into our tfdiags API, for now only for
diagnostics that are backed by an hcl.Diagnostic. All other implementations
of the diagnostic interface just always return nil, which means they never
carry any "extra information".

As is typical for our wrapping abstraction, we have here also a modified
copy of HCL's helper function for conveniently probing a diagnostic for
information of a particular type, designed to work with our diagnostic
interface instead of HCL's concrete diagnostic type.
2022-06-23 13:52:23 -07:00
..
addrs addrs: Add tests for Module.String 2022-06-23 10:42:07 -04:00
backend http-backend: http backend lock error return LockError instead of generic error 2022-06-16 11:01:01 -04:00
builtin return diagnostics from provisioners 2021-05-19 11:24:54 -04:00
cloud add url to summary and check for optional values (#30993) 2022-05-31 13:48:07 -07:00
command Merge pull request #31283 from hashicorp/jbardin/plan-import 2022-06-23 13:26:59 -04:00
communicator communicator/ssh: Fix crash using SSH+HTTP proxy 2022-05-03 08:24:59 -04:00
configs configs: Fix check block configuration diagnostics 2022-06-21 12:13:45 -04:00
copy test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
dag do not use pointer addr strings as map keys in set 2022-01-05 11:28:47 +00:00
depsfile test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
didyoumean didyoumean: move from "helper" to "internal" 2020-10-02 13:35:07 -07:00
e2e test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
earlyconfig tfdiags: Expose the "extra information" concept from HCL 2022-06-23 13:52:23 -07:00
experiments Conclude module variable optional attrs experiment 2022-06-13 12:27:21 -04:00
getmodules add XTerraformGetLimit to prevent redirect loops 2022-06-01 12:46:22 -04:00
getproviders internal/getproviders: Add URL to error message for clarity (#30810) 2022-04-14 16:14:50 +01:00
grpcwrap Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
helper/slowmessage remove wrapped streams and readline 2021-10-28 11:51:39 -04:00
httpclient Move httpclient/ to internal/httpclient/ 2021-05-17 14:09:07 -07:00
initwd test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
instances InstancesForModule should not panic 2021-12-17 13:31:41 -05:00
ipaddr lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
lang lang: Remove defaults function 2022-06-01 06:40:37 -04:00
legacy Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
logging cleanup panic output 2021-12-17 11:57:52 -05:00
modsdir Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
moduledeps Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
moduletest Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
plans core: Report reason for deferring data read until apply 2022-05-09 11:12:47 -07:00
plugin Return early on GetProviderSchema RPC responses with error diagnostics 2022-06-03 14:27:55 -04:00
plugin6 Return early on GetProviderSchema RPC responses with error diagnostics 2022-06-03 14:27:55 -04:00
provider-simple Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-simple-v6 Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provider-terraform/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
providercache test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
providers providers: A type for all schemas for a particular provider 2022-03-04 15:51:36 -05: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 refactoring: Use addrs.Map for maps with addresses as keys 2022-06-16 07:03:36 -07:00
registry command: make module installation interruptible 2021-11-11 12:28:10 +00:00
repl lang: Further limit the console-only type function 2022-02-10 06:12:58 -05:00
replacefile Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
states states/remote: Check for LockError error type 2022-06-17 10:51:00 -04:00
terminal remove the use of panicwrap 2021-10-28 11:51:39 -04:00
terraform Merge pull request #31283 from hashicorp/jbardin/plan-import 2022-06-23 13:26:59 -04:00
tfdiags tfdiags: Expose the "extra information" concept from HCL 2022-06-23 13:52:23 -07:00
tfplugin5 go.mod: go get google.golang.org/protobuf@v1.27.1 2021-10-11 16:37:39 -07:00
tfplugin6 Introduce Terraform Plugin Protocol 6.2 with legacy_type_system fields from Protocol 5 (#30375) 2022-01-20 09:57:42 -05:00
typeexpr configs: Add default argument to optional() 2022-05-31 12:11:15 -04:00