INNER CODE UNIT · Go
NewNullDataSource
hashicorp/terraform-provider-null · internal/provider/data_source.go:20
func NewNullDataSource() datasource.DataSource {
return &nullDataSource{}
}
type nullDataSource struct{}
func (n *nullDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
resp.TypeName = req.ProviderTypeName + "_data_source"
}
func (n *nullDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
resp.Schema = schema.Schema{
DeprecationMessage: "The null_data_source was historically used to construct intermediate values to re-use elsewhere " +
"in configuration, the same can now be achieved using locals or the terraform_data resource type in Terraform 1.4 and later.",
Description: `The ` + "`null_data_source`" + ` data source implements the standard data source lifecycle but does not
interact with any external APIs.
Historically, the ` + "`null_data_source`" + ` was typically used to construct intermediate values to re-use elsewhere in configuration. The