2024-02-08 03:48:59 -06:00
|
|
|
// Copyright (c) The OpenTofu Authors
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
2023-05-02 10:33:06 -05:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2018-03-20 20:44:44 -05:00
|
|
|
package tfdiags
|
|
|
|
|
|
|
|
// Sourceless creates and returns a diagnostic with no source location
|
|
|
|
// information. This is generally used for operational-type errors that are
|
2023-09-26 12:09:27 -05:00
|
|
|
// caused by or relate to the environment where OpenTofu is running rather
|
2018-03-20 20:44:44 -05:00
|
|
|
// than to the provided configuration.
|
|
|
|
func Sourceless(severity Severity, summary, detail string) Diagnostic {
|
|
|
|
return diagnosticBase{
|
|
|
|
severity: severity,
|
|
|
|
summary: summary,
|
|
|
|
detail: detail,
|
|
|
|
}
|
|
|
|
}
|