From 766027201b332424f1b52732f7065b50cbb90583 Mon Sep 17 00:00:00 2001 From: Chris Marget Date: Thu, 11 Jul 2024 22:21:22 -0400 Subject: [PATCH] fix data source input flags: required -> optional+computed --- apstra/design/template_collapsed.go | 5 +++-- docs/data-sources/template_collapsed.md | 5 +---- 2 files changed, 4 insertions(+), 6 deletions(-) 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