terraform/tfdiags
Martin Atkins e25f79ed28 plugin/convert: Show approximate location context for all provider errors
Even if a provider doesn't indicate a specific attribute as the cause of
a resource operation error, we know the error relates to some aspect of
the resource, so we'll include that approximate information in the result
so that we don't produce user-hostile error messages with no context
whatsoever.

Later we can hopefully refine this to place the source range on the header
of the configuration block rather than on an empty part of the body, but
that'll require some more complex rework here and so for now we'll just
accept this as an interim state so that the user can at least figure out
which resource block the error is coming from.
2018-10-16 19:14:54 -07:00
..
config_traversals.go tfdiags: FormatErrorPrefixed 2018-10-16 19:14:11 -07:00
contextual.go plugin/convert: Show approximate location context for all provider errors 2018-10-16 19:14:54 -07:00
contextual_test.go add tfdiags.GetAttribute 2018-10-16 18:50:29 -07:00
diagnostic.go tfdiags: new package for normalizing error and warning messages 2017-10-06 11:46:07 -07:00
diagnostic_base.go tfdiags: Contextual diagnostics 2018-10-16 18:24:10 -07:00
diagnostics.go tfdiags: Sort order for diagnostics 2018-10-16 18:50:29 -07:00
diagnostics_test.go tfdiags: Diagnostics.ErrWithWarnings and .NonFatalErr 2018-10-16 18:44:26 -07:00
doc.go tfdiags: new package for normalizing error and warning messages 2017-10-06 11:46:07 -07:00
error.go tfdiags: helper functions for nicer display of cty.PathError 2018-10-16 18:24:10 -07:00
hcl.go tfdiags: Helper to construct SourceRange from hcl.Range 2017-10-16 17:51:16 -07:00
rpc_friendly.go tfdiags: Allow construction of RPC-friendly Diagnostics 2017-10-06 11:46:07 -07:00
rpc_friendly_test.go tfdiags: Allow construction of RPC-friendly Diagnostics 2017-10-06 11:46:07 -07:00
severity_string.go Update various files for new version of "stringer" 2017-12-11 13:26:29 -08:00
simple_warning.go tfdiags: new package for normalizing error and warning messages 2017-10-06 11:46:07 -07:00
source_range.go tfdiags: SourceRange.StartString 2017-10-06 11:46:07 -07:00
sourceless.go tfdiags: Simple helper for creating "sourceless" diagnostics 2018-10-16 18:24:10 -07:00