Skip to content

Commit

Permalink
adding additional attributes to vlan output
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttyso committed Aug 16, 2021
1 parent d863af6 commit 073dab7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion modules/domain_vlan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_moid"></a> [moid](#output\_moid) | Fabric VLAN Managed Object ID (moid). |
| <a name="output_vlan"></a> [vlan](#output\_vlan) | Fabric VLAN Managed Object ID (moid). |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
7 changes: 5 additions & 2 deletions modules/domain_vlan/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# Collect the moid of the Fabric VLAN as an Output
#____________________________________________________________

output "moid" {
output "vlan" {
description = "Fabric VLAN Managed Object ID (moid)."
value = intersight_fabric_vlan.vlan.moid
value = {
moid = intersight_fabric_vlan.vlan.moid
name = intersight_fabric_vlan.vlan.name
}
}
2 changes: 1 addition & 1 deletion modules/domain_vlan_list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_moid"></a> [moid](#output\_moid) | Fabric VLAN Managed Object ID (moid). |
| <a name="output_vlan"></a> [vlan](#output\_vlan) | Fabric VLAN Attributes. |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
11 changes: 8 additions & 3 deletions modules/domain_vlan_list/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
# Collect the moid of the Fabric VLAN as an Output
#____________________________________________________________

output "moid" {
description = "Fabric VLAN Managed Object ID (moid)."
value = { for v in sort(keys(intersight_fabric_vlan.vlan_list)) : v => intersight_fabric_vlan.vlan_list[v].moid }
output "vlan" {
description = "Fabric VLAN Attributes."
value = {
for v in sort(keys(intersight_fabric_vlan.vlan_list)) : v => {
moid = intersight_fabric_vlan.vlan_list[v].moid
name = intersight_fabric_vlan.vlan_list[v].name
}
}
}
2 changes: 1 addition & 1 deletion modules/domain_vlan_map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_moid"></a> [moid](#output\_moid) | Fabric VLAN Managed Object ID (moid). |
| <a name="output_vlan"></a> [vlan](#output\_vlan) | Fabric VLAN Attributes. |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
11 changes: 8 additions & 3 deletions modules/domain_vlan_map/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
# Collect the moid of the Fabric VLAN as an Output
#____________________________________________________________

output "moid" {
description = "Fabric VLAN Managed Object ID (moid)."
value = { for v in sort(keys(intersight_fabric_vlan.vlan_map)) : v => intersight_fabric_vlan.vlan_map[v].moid }
output "vlan" {
description = "Fabric VLAN Attributes."
value = {
for v in sort(keys(intersight_fabric_vlan.vlan_map)) : v => {
moid = intersight_fabric_vlan.vlan_map[v].moid
name = intersight_fabric_vlan.vlan_map[v].name
}
}
}

0 comments on commit 073dab7

Please sign in to comment.