-
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 custom control topology policy definition resource and data source
- Loading branch information
Showing
15 changed files
with
2,741 additions
and
0 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
117 changes: 117 additions & 0 deletions
117
docs/data-sources/custom_control_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,117 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sdwan_custom_control_topology_policy_definition Data Source - terraform-provider-sdwan" | ||
subcategory: "Centralized Policies" | ||
description: |- | ||
This data source can read the Custom Control Topology policy definition. | ||
--- | ||
|
||
# sdwan_custom_control_topology_policy_definition (Data Source) | ||
|
||
This data source can read the Custom Control Topology policy definition. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "sdwan_custom_control_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 | ||
|
||
- `default_action` (String) Default action, either `accept` or `reject` | ||
- `description` (String) The description of the policy definition | ||
- `name` (String) The name of the policy definition | ||
- `sequences` (Attributes List) List of sequences (see [below for nested schema](#nestedatt--sequences)) | ||
- `type` (String) The policy definition type | ||
- `version` (Number) The version of the policy definition | ||
|
||
<a id="nestedatt--sequences"></a> | ||
### Nested Schema for `sequences` | ||
|
||
Read-Only: | ||
|
||
- `action_entries` (Attributes List) List of action entries (see [below for nested schema](#nestedatt--sequences--action_entries)) | ||
- `id` (Number) Sequence ID | ||
- `ip_type` (String) Sequence IP type, either `ipv4`, `ipv6` or `all` | ||
- `match_entries` (Attributes List) List of match entries (see [below for nested schema](#nestedatt--sequences--match_entries)) | ||
- `name` (String) Sequence name | ||
- `type` (String) Sequence type, either `route` or `tloc` | ||
|
||
<a id="nestedatt--sequences--action_entries"></a> | ||
### Nested Schema for `sequences.action_entries` | ||
|
||
Read-Only: | ||
|
||
- `export_to_vpn_list_id` (String) Export to VPN list ID | ||
- `export_to_vpn_list_version` (Number) Export to VPN list version | ||
- `set_parameters` (Attributes List) List of set parameters (see [below for nested schema](#nestedatt--sequences--action_entries--set_parameters)) | ||
- `type` (String) Type of action entry | ||
|
||
<a id="nestedatt--sequences--action_entries--set_parameters"></a> | ||
### Nested Schema for `sequences.action_entries.set_parameters` | ||
|
||
Read-Only: | ||
|
||
- `community` (String) Community value, e.g. `1000:10000` or `internet` or `local-AS` | ||
- `community_additive` (Boolean) Community additive | ||
- `omp_tag` (Number) OMP tag | ||
- `preference` (Number) Preference | ||
- `service_tloc_color` (String) Service TLOC color | ||
- `service_tloc_encapsulation` (String) Service TLOC encapsulation | ||
- `service_tloc_ip` (String) Service TLOC IP address | ||
- `service_tloc_list_id` (String) Service TLOC list ID | ||
- `service_tloc_list_version` (Number) Service TLOC list version | ||
- `service_type` (String) Service type | ||
- `service_vpn_id` (Number) Service VPN ID | ||
- `tloc_action` (String) TLOC action | ||
- `tloc_color` (String) TLOC color | ||
- `tloc_encapsulation` (String) TLOC encapsulation | ||
- `tloc_ip` (String) TLOC IP address | ||
- `tloc_list_id` (String) TLOC list ID | ||
- `tloc_list_version` (Number) TLOC list version | ||
- `type` (String) Type of action entry | ||
|
||
|
||
|
||
<a id="nestedatt--sequences--match_entries"></a> | ||
### Nested Schema for `sequences.match_entries` | ||
|
||
Read-Only: | ||
|
||
- `carrier` (String) Carrier | ||
- `color_list_id` (String) Color list ID | ||
- `color_list_version` (Number) Color list version | ||
- `community_list_id` (String) Community list ID | ||
- `community_list_version` (Number) Community list version | ||
- `domain_id` (Number) Domain ID | ||
- `expanded_community_list_id` (String) Expanded community list ID | ||
- `expanded_community_list_version` (Number) Expanded community list version | ||
- `group_id` (Number) Group ID | ||
- `omp_tag` (Number) OMP tag | ||
- `origin` (String) Origin | ||
- `originator` (String) Originator IP | ||
- `path_type` (String) Path type | ||
- `preference` (Number) Preference | ||
- `prefix_list_id` (String) Prefix list ID | ||
- `prefix_list_version` (Number) Prefix list version | ||
- `site_id` (Number) Site ID | ||
- `site_list_id` (String) Site list ID | ||
- `site_list_version` (Number) Site list version | ||
- `tloc_color` (String) TLOC color | ||
- `tloc_encapsulation` (String) TLOC encapsulation | ||
- `tloc_ip` (String) TLOC IP address | ||
- `tloc_list_id` (String) TLOC list ID | ||
- `tloc_list_version` (Number) TLOC list version | ||
- `type` (String) Type of match entry | ||
- `vpn_id` (Number) VPN ID | ||
- `vpn_list_id` (String) VPN list ID | ||
- `vpn_list_version` (Number) VPN 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
190 changes: 190 additions & 0 deletions
190
docs/resources/custom_control_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,190 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sdwan_custom_control_topology_policy_definition Resource - terraform-provider-sdwan" | ||
subcategory: "Centralized Policies" | ||
description: |- | ||
This resource can manage a Custom Control Topology policy definition. | ||
--- | ||
|
||
# sdwan_custom_control_topology_policy_definition (Resource) | ||
|
||
This resource can manage a Custom Control Topology policy definition. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "sdwan_custom_control_topology_policy_definition" "example" { | ||
name = "Example" | ||
description = "My description" | ||
default_action = "reject" | ||
sequences = [ | ||
{ | ||
id = 1 | ||
name = "Region1" | ||
type = "route" | ||
ip_type = "ipv4" | ||
match_entries = [ | ||
{ | ||
type = "ompTag" | ||
omp_tag = 100 | ||
} | ||
] | ||
action_entries = [ | ||
{ | ||
type = "set" | ||
set_parameters = [ | ||
{ | ||
type = "preference" | ||
preference = 100 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `description` (String) The description of the policy definition | ||
- `name` (String) The name of the policy definition | ||
- `sequences` (Attributes List) List of sequences (see [below for nested schema](#nestedatt--sequences)) | ||
|
||
### Optional | ||
|
||
- `default_action` (String) Default action, either `accept` or `reject` | ||
- Choices: `accept`, `reject` | ||
|
||
### 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--sequences"></a> | ||
### Nested Schema for `sequences` | ||
|
||
Required: | ||
|
||
- `id` (Number) Sequence ID | ||
- `name` (String) Sequence name | ||
|
||
Optional: | ||
|
||
- `action_entries` (Attributes List) List of action entries (see [below for nested schema](#nestedatt--sequences--action_entries)) | ||
- `ip_type` (String) Sequence IP type, either `ipv4`, `ipv6` or `all` | ||
- Choices: `ipv4`, `ipv6`, `all` | ||
- `match_entries` (Attributes List) List of match entries (see [below for nested schema](#nestedatt--sequences--match_entries)) | ||
- `type` (String) Sequence type, either `route` or `tloc` | ||
- Choices: `route`, `tloc` | ||
|
||
<a id="nestedatt--sequences--action_entries"></a> | ||
### Nested Schema for `sequences.action_entries` | ||
|
||
Required: | ||
|
||
- `type` (String) Type of action entry | ||
- Choices: `set`, `exportTo` | ||
|
||
Optional: | ||
|
||
- `export_to_vpn_list_id` (String) Export to VPN list ID | ||
- `export_to_vpn_list_version` (Number) Export to VPN list version | ||
- `set_parameters` (Attributes List) List of set parameters (see [below for nested schema](#nestedatt--sequences--action_entries--set_parameters)) | ||
|
||
<a id="nestedatt--sequences--action_entries--set_parameters"></a> | ||
### Nested Schema for `sequences.action_entries.set_parameters` | ||
|
||
Required: | ||
|
||
- `type` (String) Type of action entry | ||
- Choices: `tlocList`, `tloc`, `tlocAction`, `preference`, `ompTag`, `community`, `communityAdditive`, `service` | ||
|
||
Optional: | ||
|
||
- `community` (String) Community value, e.g. `1000:10000` or `internet` or `local-AS` | ||
- `community_additive` (Boolean) Community additive | ||
- `omp_tag` (Number) OMP tag | ||
- Range: `0`-`4294967295` | ||
- `preference` (Number) Preference | ||
- Range: `0`-`4294967295` | ||
- `service_tloc_color` (String) Service TLOC color | ||
- `service_tloc_encapsulation` (String) Service TLOC encapsulation | ||
- Choices: `ipsec`, `gre` | ||
- `service_tloc_ip` (String) Service TLOC IP address | ||
- `service_tloc_list_id` (String) Service TLOC list ID | ||
- `service_tloc_list_version` (Number) Service TLOC list version | ||
- `service_type` (String) Service type | ||
- Choices: `FW`, `IDP`, `IDS`, `netsvc1`, `netsvc2`, `netsvc3`, `netsvc4`, `netsvc5` | ||
- `service_vpn_id` (Number) Service VPN ID | ||
- Range: `0`-`65536` | ||
- `tloc_action` (String) TLOC action | ||
- Choices: `strict`, `primary`, `backup`, `ecmp` | ||
- `tloc_color` (String) TLOC color | ||
- `tloc_encapsulation` (String) TLOC encapsulation | ||
- Choices: `ipsec`, `gre` | ||
- `tloc_ip` (String) TLOC IP address | ||
- `tloc_list_id` (String) TLOC list ID | ||
- `tloc_list_version` (Number) TLOC list version | ||
|
||
|
||
|
||
<a id="nestedatt--sequences--match_entries"></a> | ||
### Nested Schema for `sequences.match_entries` | ||
|
||
Required: | ||
|
||
- `type` (String) Type of match entry | ||
- Choices: `colorList`, `community`, `expandedCommunity`, `ompTag`, `origin`, `originator`, `preference`, `siteList`, `pathType`, `tlocList`, `vpnList`, `prefixList`, `vpn`, `tloc`, `siteId`, `carrier`, `domainId`, `groupId` | ||
|
||
Optional: | ||
|
||
- `carrier` (String) Carrier | ||
- Choices: `default`, `carrier1`, `carrier2`, `carrier3`, `carrier4`, `carrier5`, `carrier6`, `carrier7`, `carrier8` | ||
- `color_list_id` (String) Color list ID | ||
- `color_list_version` (Number) Color list version | ||
- `community_list_id` (String) Community list ID | ||
- `community_list_version` (Number) Community list version | ||
- `domain_id` (Number) Domain ID | ||
- Range: `0`-`4294967295` | ||
- `expanded_community_list_id` (String) Expanded community list ID | ||
- `expanded_community_list_version` (Number) Expanded community list version | ||
- `group_id` (Number) Group ID | ||
- Range: `0`-`4294967295` | ||
- `omp_tag` (Number) OMP tag | ||
- Range: `0`-`4294967295` | ||
- `origin` (String) Origin | ||
- Choices: `igp`, `egp`, `incomplete` | ||
- `originator` (String) Originator IP | ||
- `path_type` (String) Path type | ||
- Choices: `hierarchical-path`, `direct-path`, `transport-gateway-path` | ||
- `preference` (Number) Preference | ||
- Range: `0`-`4294967295` | ||
- `prefix_list_id` (String) Prefix list ID | ||
- `prefix_list_version` (Number) Prefix list version | ||
- `site_id` (Number) Site ID | ||
- Range: `0`-`4294967295` | ||
- `site_list_id` (String) Site list ID | ||
- `site_list_version` (Number) Site list version | ||
- `tloc_color` (String) TLOC color | ||
- `tloc_encapsulation` (String) TLOC encapsulation | ||
- Choices: `ipsec`, `gre` | ||
- `tloc_ip` (String) TLOC IP address | ||
- `tloc_list_id` (String) TLOC list ID | ||
- `tloc_list_version` (Number) TLOC list version | ||
- `vpn_id` (Number) VPN ID | ||
- Range: `0`-`65536` | ||
- `vpn_list_id` (String) VPN list ID | ||
- `vpn_list_version` (Number) VPN list version | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import sdwan_custom_control_topology_policy_definition.example "f6b2c44c-693c-4763-b010-895aa3d236bd" | ||
``` |
3 changes: 3 additions & 0 deletions
3
examples/data-sources/sdwan_custom_control_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_custom_control_topology_policy_definition" "example" { | ||
id = "f6b2c44c-693c-4763-b010-895aa3d236bd" | ||
} |
1 change: 1 addition & 0 deletions
1
examples/resources/sdwan_custom_control_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_custom_control_topology_policy_definition.example "f6b2c44c-693c-4763-b010-895aa3d236bd" |
30 changes: 30 additions & 0 deletions
30
examples/resources/sdwan_custom_control_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,30 @@ | ||
resource "sdwan_custom_control_topology_policy_definition" "example" { | ||
name = "Example" | ||
description = "My description" | ||
default_action = "reject" | ||
sequences = [ | ||
{ | ||
id = 1 | ||
name = "Region1" | ||
type = "route" | ||
ip_type = "ipv4" | ||
match_entries = [ | ||
{ | ||
type = "ompTag" | ||
omp_tag = 100 | ||
} | ||
] | ||
action_entries = [ | ||
{ | ||
type = "set" | ||
set_parameters = [ | ||
{ | ||
type = "preference" | ||
preference = 100 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.