Skip to content

Commit

Permalink
add virtual_network to provider.go and make docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bwJuniper committed Nov 15, 2023
1 parent 6ccbb63 commit 1f968b4
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions apstra/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ func (p *Provider) DataSources(_ context.Context) []func() datasource.DataSource
func() datasource.DataSource { return &dataSourceDatacenterSystemNode{} },
func() datasource.DataSource { return &dataSourceDatacenterSystemNodes{} },
func() datasource.DataSource { return &dataSourceDatacenterSvis{} },
func() datasource.DataSource { return &dataSourceDatacenterVirtualNetwork{} },
func() datasource.DataSource { return &dataSourceDatacenterVirtualNetworks{} },
func() datasource.DataSource { return &dataSourceBlueprintIbaPredefinedProbe{} },
func() datasource.DataSource { return &dataSourceBlueprintIbaWidget{} },
Expand Down
62 changes: 62 additions & 0 deletions docs/data-sources/datacenter_virtual_network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
page_title: "apstra_datacenter_virtual_network Data Source - terraform-provider-apstra"
subcategory: "Reference Design: Datacenter"
description: |-
This resource returns details of a Virtual Network within a Datacenter Blueprint.
At least one optional attribute is required.
---

# apstra_datacenter_virtual_network (Data Source)

This resource returns details of a Virtual Network within a Datacenter Blueprint.

At least one optional attribute is required.


## Example Usage

```terraform
# Returns the data Attributes associated with the specified Virtual Network
# id
data "apstra_datacenter_virtual_network" "vnet_blue" {
blueprint_id = "b726704d-f80e-4733-9103-abd6ccd8752c"
name = "vnet_b"
}
locals {
vnet_b_id = data.apstra_datacenter_virtual_network.vnet_blue.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `blueprint_id` (String) The blueprint ID where the Virtual Network is present.

### Optional

- `id` (String) The id of the Virtual Network
- `name` (String) Virtual Network Name

### Read-Only

- `bindings` (Attributes Map) Details availability of the virtual network on leaf and access switches (see [below for nested schema](#nestedatt--bindings))
- `dhcp_service_enabled` (Boolean) Enables a DHCP relay agent.
- `had_prior_vni_config` (Boolean) Not applicable in data source context. Ignore.
- `ipv4_connectivity_enabled` (Boolean) Enables IPv4 within the Virtual Network.
- `ipv4_subnet` (String) IPv4 subnet associated with the Virtual Network.
- `ipv4_virtual_gateway` (String) Specifies the IPv4 virtual gateway address within the Virtual Network.
- `ipv4_virtual_gateway_enabled` (Boolean) Controls and indicates whether the IPv4 gateway within the Virtual Network is enabled.
- `ipv6_connectivity_enabled` (Boolean) Enables IPv6 within the Virtual Network.
- `ipv6_subnet` (String) IPv6 subnet associated with the Virtual Network. Note that this attribute will not appear in the `graph_query` output because IPv6 zero compression rules are problematic for mechanisms which rely on string matching.
- `ipv6_virtual_gateway` (String) Specifies the IPv6 virtual gateway address within the Virtual Network. Note that this attribute will not appear in the `graph_query` output because IPv6 zero compression rules are problematic for mechanisms which rely on string matching.
- `ipv6_virtual_gateway_enabled` (Boolean) Controls and indicates whether the IPv6 gateway within the Virtual Network is enabled.
- `reserve_vlan` (Boolean) For use only with `vxlan` type Virtual networks when all `bindings` use the same VLAN ID. This option reserves the VLAN fabric-wide, even on switches to which the Virtual Network has not yet been deployed.
- `routing_zone_id` (String) Routing Zone ID (only applies when `type == vxlan`
- `type` (String) Virtual Network Type
- `vni` (Number) EVPN Virtual Network ID to be associated with this Virtual Network.

<a id="nestedatt--bindings"></a>
### Nested Schema for `bindings`

0 comments on commit 1f968b4

Please sign in to comment.