terraform/tfdiags
Martin Atkins a851566c56 tfdiags: Diagnostics.ToHCL
Most of the time we're converting from HCL diagnostics to tfdiags as we
expose diagnostics directly from HCL, but occasionally we need to to the
reverse.

For example, our configs package uses hcl.Diagnostics by convention
because it's primarily working with HCL, but sometimes it interacts with
functions elsewhere (like in the "addrs" package) that return
tfdiags.Diagnostics, where they need to be adapted to return in an HCL
shape.

This should be used with some care because, similar to Diagnostics.ForRPC,
it forces immediate flattening of all of the diagnostics to a single
type and so can potentially lose internal tracking information that
appears in other tfdiags.Diagnostic information, such as the additional
metadata tracked in the ConsolidateWarnings result to allow later
appending to existing groups.
2020-03-12 11:11:29 -07:00
..
config_traversals.go tfdiags: FormatErrorPrefixed 2018-10-16 19:14:11 -07:00
consolidate_warnings.go command: New -compact-warnings option 2019-12-10 11:53:14 -08:00
consolidate_warnings_test.go command: New -compact-warnings option 2019-12-10 11:53:14 -08:00
contextual.go fix diagnostics handling 2019-11-21 09:14:50 -05:00
contextual_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
diagnostic.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
diagnostic_base.go tfdiags: Expose expression evaluation information from diagnostics 2018-10-18 17:12:01 -07:00
diagnostics.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
diagnostics_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
doc.go
error.go tfdiags: Expose expression evaluation information from diagnostics 2018-10-18 17:12:01 -07:00
hcl.go tfdiags: Diagnostics.ToHCL 2020-03-12 11:11:29 -07:00
hcl_test.go tfdiags: Diagnostics.ToHCL 2020-03-12 11:11:29 -07:00
rpc_friendly.go tfdiags: Expose expression evaluation information from diagnostics 2018-10-18 17:12:01 -07:00
rpc_friendly_test.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
severity_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
simple_warning.go tfdiags: Expose expression evaluation information from diagnostics 2018-10-18 17:12:01 -07:00
source_range.go
sourceless.go