Skip to content

Commit

Permalink
Add fabric virtual network with scalable groups resource and data sou…
Browse files Browse the repository at this point in the history
…rce (#42)
  • Loading branch information
kuba-mazurkiewicz authored Feb 27, 2024
1 parent 40c1f0c commit d7a90bd
Show file tree
Hide file tree
Showing 12 changed files with 794 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/data-sources/fabric_virtual_network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_fabric_virtual_network Data Source - terraform-provider-catalystcenter"
subcategory: "SDA"
description: |-
This data source can read the Fabric Virtual Network.
---

# catalystcenter_fabric_virtual_network (Data Source)

This data source can read the Fabric Virtual Network.

## Example Usage

```terraform
data "catalystcenter_fabric_virtual_network" "example" {
id = "SDA_VN1"
}
```

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

### Required

- `id` (String) The id of the object

### Read-Only

- `is_guest` (Boolean) Guest Virtual Network enablement flag
- `sg_names` (List of String) Scalable Groups to be associated to virtual network
- `virtual_network_name` (String) Virtual Network Name to be assigned at global level
- `vmanage_vpn_id` (String) vManage vpn id for SD-WAN
47 changes: 47 additions & 0 deletions docs/resources/fabric_virtual_network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_fabric_virtual_network Resource - terraform-provider-catalystcenter"
subcategory: "SDA"
description: |-
This resource can manage a Fabric Virtual Network.
---

# catalystcenter_fabric_virtual_network (Resource)

This resource can manage a Fabric Virtual Network.

## Example Usage

```terraform
resource "catalystcenter_fabric_virtual_network" "example" {
virtual_network_name = "SDA_VN1"
is_guest = false
sg_names = ["Employees"]
}
```

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

### Required

- `virtual_network_name` (String) Virtual Network Name to be assigned at global level

### Optional

- `is_guest` (Boolean) Guest Virtual Network enablement flag
- Default value: `false`
- `sg_names` (List of String) Scalable Groups to be associated to virtual network
- `vmanage_vpn_id` (String) vManage vpn id for SD-WAN

### Read-Only

- `id` (String) The id of the object

## Import

Import is supported using the following syntax:

```shell
terraform import catalystcenter_fabric_virtual_network.example "SDA_VN1"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "catalystcenter_fabric_virtual_network" "example" {
id = "SDA_VN1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import catalystcenter_fabric_virtual_network.example "SDA_VN1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "catalystcenter_fabric_virtual_network" "example" {
virtual_network_name = "SDA_VN1"
is_guest = false
sg_names = ["Employees"]
}
29 changes: 29 additions & 0 deletions gen/definitions/fabric_virtual_network.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Fabric Virtual Network
rest_endpoint: /dna/intent/api/v1/virtual-network
id_query_param: virtualNetworkName
delete_id_query_param: virtualNetworkName
id_from_attribute: true
doc_category: SDA
attributes:
- model_name: virtualNetworkName
type: String
id: true
description: Virtual Network Name to be assigned at global level
example: SDA_VN1
- model_name: isGuestVirtualNetwork
tf_name: is_guest
type: Bool
description: Guest Virtual Network enablement flag
default_value: false
example: false
- model_name: scalableGroupNames
tf_name: sg_names
type: StringList
description: Scalable Groups to be associated to virtual network
example: "Employees"
- model_name: vManageVpnId
tf_name: vmanage_vpn_id
type: String
description: vManage vpn id for SD-WAN
exclude_test: true
126 changes: 126 additions & 0 deletions internal/provider/data_source_catalystcenter_fabric_virtual_network.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d7a90bd

Please sign in to comment.