INNER CODE UNIT · Go

func

hashicorp/terraform-provider-null · internal/provider/data_source.go:26

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
same can now be achieved using [locals](https://developer.hashicorp.com/terraform/language/values/locals) ` +
			`or the [terraform_data resource type](https://developer.hashicorp.com/terraform/language/resources/terraform-data) in Terraform 1.4 and later.`,
		Attributes: map[string]schema.Attribute{
			"inputs": schema.MapAttribute{
				Description: "A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.",
				ElementType: types.StringType,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…