From 6158752ff08f21ba0287138b23a3410284307694 Mon Sep 17 00:00:00 2001 From: Rajagopalan Subrahmanian Date: Wed, 4 Oct 2023 11:58:12 -0400 Subject: [PATCH] add the docs --- docs/data-sources/iba_widget.md | 55 ++++++++++++++++++++++++++++ docs/data-sources/iba_widgets.md | 61 ++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 docs/data-sources/iba_widget.md create mode 100644 docs/data-sources/iba_widgets.md diff --git a/docs/data-sources/iba_widget.md b/docs/data-sources/iba_widget.md new file mode 100644 index 00000000..b5af8ebe --- /dev/null +++ b/docs/data-sources/iba_widget.md @@ -0,0 +1,55 @@ +--- +page_title: "apstra_iba_widget Data Source - terraform-provider-apstra" +subcategory: "" +description: |- + This data source provides details of a specific IBA Widget in a Blueprint. + At least one optional attribute is required. +--- + +# apstra_iba_widget (Data Source) + +This data source provides details of a specific IBA Widget in a Blueprint. + +At least one optional attribute is required. + +## Example Usage + +```terraform +# This example pulls one iba widget from a blueprint + +data "apstra_datacenter_blueprint" "b" { + name = "test" +} + +data "apstra_iba_widget" "i" { + blueprint_id = data.apstra_datacenter_blueprint.b.id + name = "Fabric ECMP Imbalance" +} +output "o" { + value = data.apstra_iba_widget.i +} + +#Output looks like this +#o = { +# "blueprint_id" = "cff966ad-f85f-478f-bae5-b64c1e58d31f" +# "description" = "Number of systems with ECMP imbalance." +# "id" = "d03ba5ad-77f4-4198-8901-3c03fea7e341" +# "name" = "Fabric ECMP Imbalance" +#} +``` + + +## Schema + +### Required + +- `blueprint_id` (String) Apstra Blueprint ID. Used to identify the Blueprint that the IBA Widget belongs to. + +### Optional + +- `id` (String) Populate this field to look up a IBA Widget by ID. Required when `name` is omitted. +- `name` (String) Populate this field to look up a IBA Widget by name. Required when `id` is omitted. + +### Read-Only + +- `description` (String) Description of the IBA Widget diff --git a/docs/data-sources/iba_widgets.md b/docs/data-sources/iba_widgets.md new file mode 100644 index 00000000..16e138f7 --- /dev/null +++ b/docs/data-sources/iba_widgets.md @@ -0,0 +1,61 @@ +--- +page_title: "apstra_iba_widgets Data Source - terraform-provider-apstra" +subcategory: "" +description: |- + This data source returns the IDs of the IBA Widgets in a Blueprint. +--- + +# apstra_iba_widgets (Data Source) + +This data source returns the IDs of the IBA Widgets in a Blueprint. + +## Example Usage + +```terraform +data "apstra_datacenter_blueprint" "b" { + name = "test" +} + +data "apstra_iba_widgets" "all" { + blueprint_id = data.apstra_datacenter_blueprint.b.id +} + + +data "apstra_iba_widget" "all" { + for_each = data.apstra_iba_widgets.all.ids + blueprint_id = data.apstra_datacenter_blueprint.b.id + id = each.key +} + +output "o" { + value = data.apstra_iba_widget.all +} + +#Output looks something like this +# +#o = { +# "2e6466ad-ed96-4773-9b55-87c7607e30ed" = { +# "blueprint_id" = "cff966ad-f85f-478f-bae5-b64c1e58d31f" +# "description" = "" +# "id" = "2e6466ad-ed96-4773-9b55-87c7607e30ed" +# "name" = "Systems with high interface utilization" +# } +# "555fcdd7-ce9b-4bbb-9f90-43b921afe1d2" = { +# "blueprint_id" = "cff966ad-f85f-478f-bae5-b64c1e58d31f" +# "description" = "" +# "id" = "555fcdd7-ce9b-4bbb-9f90-43b921afe1d2" +# "name" = "Systems with high memory utilization" +# } +#} +``` + + +## Schema + +### Required + +- `blueprint_id` (String) Apstra Blueprint ID. Used to identify the Blueprint that the IBA Widgets belongs to. + +### Read-Only + +- `ids` (Set of String) A set of Apstra object ID numbers representing the IBA Widgets in the blueprint.