-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nd interface policy module (#47)
- Loading branch information
Showing
14 changed files
with
472 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
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
34 changes: 34 additions & 0 deletions
34
modules/terraform-aci-nd-interface-policy/.terraform-docs.yml
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,34 @@ | ||
version: '>= 0.0.1' | ||
|
||
formatter: markdown table | ||
|
||
content: |- | ||
# Terraform ACI ND Interface Policy Module | ||
Manages ACI ND Interface Policy | ||
Location in GUI: | ||
`Tenants` » `XXX` » `Policies` » `Protocol` » `ND Interface` | ||
## Examples | ||
```hcl | ||
{{ include "./examples/complete/main.tf" }} | ||
``` | ||
{{ .Requirements }} | ||
{{ .Providers }} | ||
{{ .Inputs }} | ||
{{ .Outputs }} | ||
{{ .Resources }} | ||
output: | ||
file: README.md | ||
mode: replace | ||
|
||
sort: | ||
enabled: false |
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,79 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
# Terraform ACI ND Interface Policy Module | ||
|
||
Manages ACI ND Interface Policy | ||
|
||
Location in GUI: | ||
`Tenants` » `XXX` » `Policies` » `Protocol` » `ND Interface` | ||
|
||
## Examples | ||
|
||
```hcl | ||
module "aci_nd_interface_policy" { | ||
source = "netascode/nac-aci/aci//modules/terraform-aci-nd-interface-policy" | ||
version = ">= 0.8.0" | ||
tenant = "ABC" | ||
name = "ND-INTF-POL1" | ||
description = "My Description" | ||
controller_state = ["other-cfg"] | ||
hop_limit = 32 | ||
ns_tx_interval = 1000 | ||
mtu = 9000 | ||
retransmit_retry_count = 3 | ||
nud_retransmit_base = 1 | ||
nud_retransmit_interval = 2000 | ||
nud_retransmit_count = 3 | ||
route_advertise_interval = 600 | ||
router_lifetime = 3600 | ||
reachable_time = 0 | ||
retransmit_timer = 0 | ||
} | ||
``` | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 | | ||
| <a name="requirement_aci"></a> [aci](#requirement\_aci) | >= 2.0.0 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aci"></a> [aci](#provider\_aci) | >= 2.0.0 | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_tenant"></a> [tenant](#input\_tenant) | Tenant name. | `string` | n/a | yes | | ||
| <a name="input_name"></a> [name](#input\_name) | ND interface policy name. | `string` | n/a | yes | | ||
| <a name="input_description"></a> [description](#input\_description) | Description. | `string` | `""` | no | | ||
| <a name="input_controller_state"></a> [controller\_state](#input\_controller_state) | Controller administrative state. Choices: `managed-cfg`, `other-cfg`, `suppress-ra`, `suppress-ra-mtu`, `unsolicit-na-glean`. | `list` | `[]` | no | | ||
| <a name="input_hop_limit"></a> [hop\_limit](#input\_hop\_limit) | Hop limit. Minimum value: 1. Maximum value: 255. | `number` | `64` | no | | ||
| <a name="input_ns_tx_interval"></a> [ns\_tx\_interval](#input\_ns\_tx\_interval) | NS transmit interval. Minimum value: 1000. Maximum value: 3600000 | `number` | `1000` | no | | ||
| <a name="input_mtu"></a> [mtu](#input\_mtu) | Maximum transmission unit. Minimum value: 1280. Maximum value: 9000. | `number` | `9000` | no | | ||
| <a name="input_retransmit_retry_count"></a> [retransmit\_retry\_count](#input\_retransmit\_retry\_count) | Retransmission retry count. Minimum value: 1. Maximum value: 100. | `number` | `3` | no | | ||
| <a name="input_nud_retransmit_base"></a> [nud\_retransmit\_base](#input\_nud\_retransmit\_base) | NUD retransmission base. Minimum value: 1. Maximum value: 3. | `number` | `1` | no | | ||
| <a name="input_nud_retransmit_interval"></a> [nud\_retransmit\_interval](#input\_nud\_retransmit\_interval) | NUD retransmission interval (msec). Minimum value: 1000. Maximum value: 10000. | `number` | `1000` | no | | ||
| <a name="input_nud_retransmit_count"></a> [nud\_retransmit\_count](#input\_nud\_retransmit\_count) | NUD retransmission count. Minimum value: 1. Maximum value: 3. | `number` | `1` | no | | ||
| <a name="input_route_advertise_interval"></a> [route\_advertise\_interval](#input\_route\_advertise\_interval) | Route advertise interval. Minimum value: 4. Maximum value: 1800. | `number` | `600` | no | | ||
| <a name="input_router_lifetime"></a> [router\_lifetime](#input\_router\_lifetime) | Router lifetime. Minimum value: 0. Maximum value: 9000. | `number` | `1800` | no | | ||
| <a name="input_reachable_time"></a> [reachable\_time](#input\_reachable\_time) | Reachable time (msec). Minimum value: 0. Maximum value: 3600000. | `number` | `0` | no | | ||
| <a name="input_retransmit_timer"></a> [retransmit\_timer](#input\_retransmit\_timer) | Retransmit timer (msec). Minimum value: 0. Maximum value: 4294967295. | `number` | `0` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_dn"></a> [dn](#output\_dn) | Distinguished name of `ndIfPol` object. | | ||
| <a name="output_name"></a> [name](#output\_name) | ND interface policy name. | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aci_rest_managed.ndIfPol](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource | | ||
<!-- END_TF_DOCS --> |
24 changes: 24 additions & 0 deletions
24
modules/terraform-aci-nd-interface-policy/examples/complete/.terraform-docs.yml
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,24 @@ | ||
version: '>= 0.0.1' | ||
|
||
formatter: markdown table | ||
|
||
content: |- | ||
# ND Interface Policy Example | ||
To run this example you need to execute: | ||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
Note that this example will create resources. Resources can be destroyed with `terraform destroy`. | ||
```hcl | ||
{{ include "./main.tf" }} | ||
``` | ||
output: | ||
file: README.md | ||
mode: replace |
36 changes: 36 additions & 0 deletions
36
modules/terraform-aci-nd-interface-policy/examples/complete/README.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,36 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
# ND Interface Policy Example | ||
|
||
To run this example you need to execute: | ||
|
||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
Note that this example will create resources. Resources can be destroyed with `terraform destroy`. | ||
|
||
```hcl | ||
module "aci_nd_interface_policy" { | ||
source = "netascode/nac-aci/aci//modules/terraform-aci-nd-interface-policy" | ||
version = ">= 0.8.0" | ||
tenant = "ABC" | ||
name = "ND-INTF-POL1" | ||
description = "My Description" | ||
controller_state = ["other-cfg"] | ||
hop_limit = 32 | ||
ns_tx_interval = 1000 | ||
mtu = 9000 | ||
retransmit_retry_count = 3 | ||
nud_retransmit_base = 1 | ||
nud_retransmit_interval = 2000 | ||
nud_retransmit_count = 3 | ||
route_advertise_interval = 600 | ||
router_lifetime = 3600 | ||
reachable_time = 0 | ||
retransmit_timer = 0 | ||
} | ||
``` | ||
<!-- END_TF_DOCS --> |
20 changes: 20 additions & 0 deletions
20
modules/terraform-aci-nd-interface-policy/examples/complete/main.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 @@ | ||
module "aci_nd_interface_policy" { | ||
source = "netascode/nac-aci/aci//modules/terraform-aci-nd-interface-policy" | ||
version = ">= 0.8.0" | ||
|
||
tenant = "ABC" | ||
name = "ND-INTF-POL1" | ||
description = "My Description" | ||
controller_state = ["other-cfg"] | ||
hop_limit = 32 | ||
ns_tx_interval = 1000 | ||
mtu = 9000 | ||
retransmit_retry_count = 3 | ||
nud_retransmit_base = 1 | ||
nud_retransmit_interval = 2000 | ||
nud_retransmit_count = 3 | ||
route_advertise_interval = 600 | ||
router_lifetime = 3600 | ||
reachable_time = 0 | ||
retransmit_timer = 0 | ||
} |
11 changes: 11 additions & 0 deletions
11
modules/terraform-aci-nd-interface-policy/examples/complete/versions.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,11 @@ | ||
|
||
terraform { | ||
required_version = ">= 1.0.0" | ||
|
||
required_providers { | ||
aci = { | ||
source = "CiscoDevNet/aci" | ||
version = ">= 2.0.0" | ||
} | ||
} | ||
} |
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 "aci_rest_managed" "ndIfPol" { | ||
dn = "uni/tn-${var.tenant}/ndifpol-${var.name}" | ||
class_name = "ndIfPol" | ||
content = { | ||
name = var.name | ||
descr = var.description | ||
ctrl = join(",", var.controller_state) | ||
hopLimit = var.hop_limit | ||
nsIntvl = var.ns_tx_interval | ||
mtu = var.mtu | ||
nsRetries = var.retransmit_retry_count | ||
nudRetryBase = var.nud_retransmit_base | ||
nudRetryInterval = var.nud_retransmit_interval | ||
nudRetryMaxAttempts = var.nud_retransmit_count | ||
raIntvl = var.route_advertise_interval | ||
raLifetime = var.router_lifetime | ||
reachableTime = var.reachable_time | ||
retransTimer = var.retransmit_timer | ||
} | ||
} |
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,9 @@ | ||
output "dn" { | ||
value = aci_rest_managed.ndIfPol.id | ||
description = "Distinguished name of `ndIfPol` object." | ||
} | ||
|
||
output "name" { | ||
value = aci_rest_managed.ndIfPol.content.name | ||
description = "ND interface policy name." | ||
} |
Oops, something went wrong.