-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hub and spoke topology policy definition resource and data source
- Loading branch information
Showing
27 changed files
with
1,286 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
docs/data-sources/hub_and_spoke_topology_policy_definition.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sdwan_hub_and_spoke_topology_policy_definition Data Source - terraform-provider-sdwan" | ||
subcategory: "Centralized Policies" | ||
description: |- | ||
This data source can read the Hub and Spoke Topology policy definition. | ||
--- | ||
|
||
# sdwan_hub_and_spoke_topology_policy_definition (Data Source) | ||
|
||
This data source can read the Hub and Spoke Topology policy definition. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "sdwan_hub_and_spoke_topology_policy_definition" "example" { | ||
id = "f6b2c44c-693c-4763-b010-895aa3d236bd" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The id of the policy definition | ||
|
||
### Read-Only | ||
|
||
- `description` (String) The description of the policy definition | ||
- `name` (String) The name of the policy definition | ||
- `topologies` (Attributes List) List of topologies (see [below for nested schema](#nestedatt--topologies)) | ||
- `type` (String) The policy definition type | ||
- `version` (Number) The version of the policy definition | ||
- `vpn_list_id` (String) VPN list ID | ||
- `vpn_list_version` (Number) VPN list version | ||
|
||
<a id="nestedatt--topologies"></a> | ||
### Nested Schema for `topologies` | ||
|
||
Read-Only: | ||
|
||
- `name` (String) Topology name | ||
- `spokes` (Attributes List) List of spokes (see [below for nested schema](#nestedatt--topologies--spokes)) | ||
|
||
<a id="nestedatt--topologies--spokes"></a> | ||
### Nested Schema for `topologies.spokes` | ||
|
||
Read-Only: | ||
|
||
- `hubs` (Attributes List) List of hubs (see [below for nested schema](#nestedatt--topologies--spokes--hubs)) | ||
- `site_list_id` (String) Site list ID | ||
- `site_list_version` (Number) Site list version | ||
|
||
<a id="nestedatt--topologies--spokes--hubs"></a> | ||
### Nested Schema for `topologies.spokes.hubs` | ||
|
||
Read-Only: | ||
|
||
- `site_list_id` (String) Site list ID | ||
- `site_list_version` (Number) Site list version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
docs/resources/hub_and_spoke_topology_policy_definition.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sdwan_hub_and_spoke_topology_policy_definition Resource - terraform-provider-sdwan" | ||
subcategory: "Centralized Policies" | ||
description: |- | ||
This resource can manage a Hub and Spoke Topology policy definition. | ||
--- | ||
|
||
# sdwan_hub_and_spoke_topology_policy_definition (Resource) | ||
|
||
This resource can manage a Hub and Spoke Topology policy definition. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "sdwan_hub_and_spoke_topology_policy_definition" "example" { | ||
name = "Example" | ||
description = "My description" | ||
vpn_list_id = "04fcbb0b-efbf-43d2-a04b-847d3a7b104e" | ||
topologies = [ | ||
{ | ||
name = "Topology1" | ||
spokes = [ | ||
{ | ||
site_list_id = "e858e1c4-6aa8-4de7-99df-c3adbf80290d" | ||
hubs = [ | ||
{ | ||
site_list_id = "e858e1c4-6aa8-4de7-99df-c3adbf80290d" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `description` (String) The description of the policy definition | ||
- `name` (String) The name of the policy definition | ||
- `topologies` (Attributes List) List of topologies (see [below for nested schema](#nestedatt--topologies)) | ||
|
||
### Optional | ||
|
||
- `vpn_list_id` (String) VPN list ID | ||
- `vpn_list_version` (Number) VPN list version | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The id of the policy definition | ||
- `type` (String) The policy defintion type | ||
- `version` (Number) The version of the policy definition | ||
|
||
<a id="nestedatt--topologies"></a> | ||
### Nested Schema for `topologies` | ||
|
||
Required: | ||
|
||
- `name` (String) Topology name | ||
|
||
Optional: | ||
|
||
- `spokes` (Attributes List) List of spokes (see [below for nested schema](#nestedatt--topologies--spokes)) | ||
|
||
<a id="nestedatt--topologies--spokes"></a> | ||
### Nested Schema for `topologies.spokes` | ||
|
||
Optional: | ||
|
||
- `hubs` (Attributes List) List of hubs (see [below for nested schema](#nestedatt--topologies--spokes--hubs)) | ||
- `site_list_id` (String) Site list ID | ||
- `site_list_version` (Number) Site list version | ||
|
||
<a id="nestedatt--topologies--spokes--hubs"></a> | ||
### Nested Schema for `topologies.spokes.hubs` | ||
|
||
Optional: | ||
|
||
- `site_list_id` (String) Site list ID | ||
- `site_list_version` (Number) Site list version | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import sdwan_hub_and_spoke_topology_policy_definition.example "f6b2c44c-693c-4763-b010-895aa3d236bd" | ||
``` |
3 changes: 3 additions & 0 deletions
3
examples/data-sources/sdwan_hub_and_spoke_topology_policy_definition/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
data "sdwan_hub_and_spoke_topology_policy_definition" "example" { | ||
id = "f6b2c44c-693c-4763-b010-895aa3d236bd" | ||
} |
1 change: 1 addition & 0 deletions
1
examples/resources/sdwan_hub_and_spoke_topology_policy_definition/import.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import sdwan_hub_and_spoke_topology_policy_definition.example "f6b2c44c-693c-4763-b010-895aa3d236bd" |
20 changes: 20 additions & 0 deletions
20
examples/resources/sdwan_hub_and_spoke_topology_policy_definition/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
resource "sdwan_hub_and_spoke_topology_policy_definition" "example" { | ||
name = "Example" | ||
description = "My description" | ||
vpn_list_id = "04fcbb0b-efbf-43d2-a04b-847d3a7b104e" | ||
topologies = [ | ||
{ | ||
name = "Topology1" | ||
spokes = [ | ||
{ | ||
site_list_id = "e858e1c4-6aa8-4de7-99df-c3adbf80290d" | ||
hubs = [ | ||
{ | ||
site_list_id = "e858e1c4-6aa8-4de7-99df-c3adbf80290d" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
gen/definitions/policy_definitions/hub_and_spoke_topology.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
name: Hub and Spoke Topology | ||
type: hubAndSpoke | ||
root_element: definition | ||
doc_category: Centralized Policies | ||
attributes: | ||
- model_name: vpnList | ||
tf_name: vpn_list_id | ||
type: String | ||
description: VPN list ID | ||
example: 04fcbb0b-efbf-43d2-a04b-847d3a7b104e | ||
- tf_name: vpn_list_version | ||
tf_only: true | ||
type: Int64 | ||
description: VPN list version | ||
exclude_test: true | ||
- model_name: subDefinitions | ||
tf_name: topologies | ||
type: List | ||
mandatory: true | ||
description: List of topologies | ||
attributes: | ||
- model_name: name | ||
tf_name: name | ||
type: String | ||
mandatory: true | ||
description: Topology name | ||
example: Topology1 | ||
- model_name: spokes | ||
tf_name: spokes | ||
type: List | ||
description: List of spokes | ||
attributes: | ||
- model_name: siteList | ||
tf_name: site_list_id | ||
type: String | ||
description: Site list ID | ||
example: e858e1c4-6aa8-4de7-99df-c3adbf80290d | ||
- tf_name: site_list_version | ||
tf_only: true | ||
type: Int64 | ||
description: Site list version | ||
exclude_test: true | ||
- model_name: hubs | ||
tf_name: hubs | ||
type: List | ||
description: List of hubs | ||
attributes: | ||
- model_name: siteList | ||
tf_name: site_list_id | ||
type: String | ||
description: Site list ID | ||
example: e858e1c4-6aa8-4de7-99df-c3adbf80290d | ||
- tf_name: site_list_version | ||
tf_only: true | ||
type: Int64 | ||
description: Site list version | ||
exclude_test: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.