Skip to content

Commit

Permalink
add the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rajagopalans committed Oct 4, 2023
1 parent d48af32 commit 6158752
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
55 changes: 55 additions & 0 deletions docs/data-sources/iba_widget.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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
61 changes: 61 additions & 0 deletions docs/data-sources/iba_widgets.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

0 comments on commit 6158752

Please sign in to comment.