in ec/ecdatasource/deploymentsdatasource/schema.go [32:86]
func (d *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
resp.Schema = schema.Schema{
Description: "Use this data source to retrieve a list of IDs for the deployment and resource kinds, based on the specified query.",
Attributes: map[string]schema.Attribute{
"name_prefix": schema.StringAttribute{
Description: "Prefix to filter the returned deployment list by.",
Optional: true,
},
"name": schema.StringAttribute{
Description: "Filter the result by the full deployment name.",
Optional: true,
},
"healthy": schema.StringAttribute{
Description: "Filter the result set by their health status.",
Optional: true,
},
"deployment_template_id": schema.StringAttribute{
Description: "Filter the result set by the ID of the deployment template the deployment is based off.",
Optional: true,
},
"tags": schema.MapAttribute{
ElementType: types.StringType,
Description: "Filter the result set by their assigned tags.",
Optional: true,
},
"size": schema.Int64Attribute{
Description: "The maximum number of deployments to return. Defaults to 100.",
MarkdownDescription: "The maximum number of deployments to return. Defaults to `100`.",
Optional: true,
// PlanModifiers: []tfsdk.AttributePlanModifier{
// planmodifier.DefaultValue(types.Int64Value(100)),
// },
},
// Computed
"id": schema.StringAttribute{
Computed: true,
MarkdownDescription: "Unique identifier of this data source.",
},
"return_count": schema.Int64Attribute{
Description: "The number of deployments actually returned.",
Computed: true,
},
"deployments": deploymentsListSchema(),
},
Blocks: map[string]schema.Block{
// Deployment resources
"elasticsearch": resourceFiltersSchema(util.ElasticsearchResourceKind),
"kibana": resourceFiltersSchema(util.KibanaResourceKind),
"apm": resourceFiltersSchema(util.ApmResourceKind),
"integrations_server": resourceFiltersSchema(util.IntegrationsServerResourceKind),
"enterprise_search": resourceFiltersSchema(util.EnterpriseSearchResourceKind),
},
}
}