-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathvalidate_config.go
30 lines (27 loc) · 1.2 KB
/
validate_config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package datasource
import (
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
)
// ValidateConfigRequest represents a request to validate the
// configuration of a data source. An instance of this request struct is
// supplied as an argument to the DataSource ValidateConfig receiver method
// or automatically passed through to each ConfigValidator.
type ValidateConfigRequest struct {
// Config is the configuration the user supplied for the data source.
//
// This configuration may contain unknown values if a user uses
// interpolation or other functionality that would prevent Terraform
// from knowing the value at request time.
Config tfsdk.Config
}
// ValidateConfigResponse represents a response to a
// ValidateConfigRequest. An instance of this response struct is
// supplied as an argument to the DataSource ValidateConfig receiver method
// or automatically passed through to each ConfigValidator.
type ValidateConfigResponse struct {
// Diagnostics report errors or warnings related to validating the data
// source configuration. An empty slice indicates success, with no warnings
// or errors generated.
Diagnostics diag.Diagnostics
}