diff --git a/apstra/design/template_collapsed.go b/apstra/design/template_collapsed.go index 152d1ebc..4786bf23 100644 --- a/apstra/design/template_collapsed.go +++ b/apstra/design/template_collapsed.go @@ -41,8 +41,9 @@ func (o TemplateCollapsed) AttrTypes() map[string]attr.Type { func (o TemplateCollapsed) DataSourceAttributes() map[string]dataSourceSchema.Attribute { return map[string]dataSourceSchema.Attribute{ "id": dataSourceSchema.StringAttribute{ - MarkdownDescription: "Apstra Template ID. Required when `id` is omitted.", - Required: true, + MarkdownDescription: "Apstra Template ID. Required when `name` is omitted.", + Optional: true, + Computed: true, Validators: []validator.String{ stringvalidator.LengthAtLeast(1), stringvalidator.ExactlyOneOf(path.Expressions{ diff --git a/docs/data-sources/template_collapsed.md b/docs/data-sources/template_collapsed.md index ad066fab..29f0b51a 100644 --- a/docs/data-sources/template_collapsed.md +++ b/docs/data-sources/template_collapsed.md @@ -27,12 +27,9 @@ data "apstra_template_collapsed" "example" { ## Schema -### Required - -- `id` (String) Apstra Template ID. Required when `id` is omitted. - ### Optional +- `id` (String) Apstra Template ID. Required when `name` is omitted. - `name` (String) Web UI name of the Template. Required when `id` is omitted. ### Read-Only