Skip to content

Commit

Permalink
Fix typo (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomezve authored Jun 7, 2024
1 parent 15cc97f commit 10b8747
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module "nxos_ospf" {
|------|-------------|------|---------|:--------:|
| <a name="input_device"></a> [device](#input\_device) | A device name from the provider configuration. | `string` | `null` | no |
| <a name="input_name"></a> [name](#input\_name) | OSPF Process Name. | `string` | n/a | yes |
| <a name="input_vrfs"></a> [vrfs](#input\_vrfs) | OSPF VRF list.<br> Default value `admin_state`: `true`.<br> Default value `bandwidth_reference`: `40000`.<br> Choices `banwidth_reference_unit`: `mbps`, `gbps`. Default value `banwidth_reference_unit`: `mbps`.<br> Default value `distance`: `110`.<br> List `areas`:<br> Allowed formats `area`: `0.0.0.10`. Default value `area`: `0.0.0.0`.<br> Choices `authentication_type`: `unspecified`, `simple`, `md5`, `none`. Default value `authentication_type`: `unspecified`.<br> Default value `cost`: `110`.<br> List `interfaces`:<br> Default value `advertise_secondaries`: `true`.<br> Allowed formats `area`: `0.0.0.10`. Default value `area`: `0.0.0.0`.<br> Default value `advertise_secondaries`: `true`.<br> Choices `bfd`: `unspecified`, `enabled`, `disabled`. Default value `bfd`: `unspecified`.<br> Default value `cost`: `0`.<br> Default value `dead_interval`: `0`.<br> Default value `hello_interval`: `10`.<br> Choices `network_type`: `unspecified`, `p2p`, `bcast`. Default value `network_type`: `unspecified`.<br> Choices `passive`: `unspecified`, `enabled`, `disabled`. Default value `passive`: `unspecified`.<br> Default value `priority`: `1`.<br> Allowed formats `authentication_key`: '0 <unencrypted-key>', '3 <3DES-format-encrypted-key>', '7 <Cisco-type-encrypted-key>'. Default value `area`: `0.0.0.0`.<br> Default value `authentication_key_id`: `0`.<br> Default value `authentication_key_secure_mode`: `false`.<br> Default value `authentication_md5_key_secure_mode`: `false`.<br> Choices `authentication_type`: `unspecified`, `simple`, `md5`, `none`. Default value `authentication_type`: `unspecified`. | <pre>list(object({<br> vrf = string<br> admin_state = optional(bool, true)<br> bandwidth_reference = optional(number, 40000)<br> banwidth_reference_unit = optional(string, "mbps")<br> distance = optional(number, 110)<br> router_id = optional(string, "0.0.0.0")<br> # adjancency_logging_level = optional(string)<br> areas = optional(list(object({<br> area = string<br> authentication_type = optional(string, "unspecified")<br> cost = optional(number, 1)<br> type = optional(string, "regular")<br> })))<br> interfaces = optional(list(object({<br> interface = string<br> advertise_secondaries = optional(bool, true)<br> area = optional(string, "0.0.0.0")<br> bfd = optional(string, "unspecified")<br> cost = optional(number, 0)<br> dead_interval = optional(number, 0)<br> hello_interval = optional(number, 10)<br> network_type = optional(string, "unspecified")<br> passive = optional(string, "unspecified")<br> priority = optional(number, 1)<br> authentication_key = optional(string)<br> authentication_key_id = optional(number, 0)<br> authentication_key_secure_mode = optional(bool, false)<br> authentication_keychain = optional(string)<br> authentication_md5_key = optional(string)<br> authentication_md5_key_secure_mode = optional(bool, false)<br> authentication_type = optional(string)<br> })))<br> }))</pre> | `[]` | no |
| <a name="input_vrfs"></a> [vrfs](#input\_vrfs) | OSPF VRF list.<br> Default value `admin_state`: `true`.<br> Default value `bandwidth_reference`: `40000`.<br> Choices `bandwidth_reference_unit`: `mbps`, `gbps`. Default value `bandwidth_reference_unit`: `mbps`.<br> Default value `distance`: `110`.<br> List `areas`:<br> Allowed formats `area`: `0.0.0.10`. Default value `area`: `0.0.0.0`.<br> Choices `authentication_type`: `unspecified`, `simple`, `md5`, `none`. Default value `authentication_type`: `unspecified`.<br> Default value `cost`: `110`.<br> List `interfaces`:<br> Default value `advertise_secondaries`: `true`.<br> Allowed formats `area`: `0.0.0.10`. Default value `area`: `0.0.0.0`.<br> Default value `advertise_secondaries`: `true`.<br> Choices `bfd`: `unspecified`, `enabled`, `disabled`. Default value `bfd`: `unspecified`.<br> Default value `cost`: `0`.<br> Default value `dead_interval`: `0`.<br> Default value `hello_interval`: `10`.<br> Choices `network_type`: `unspecified`, `p2p`, `bcast`. Default value `network_type`: `unspecified`.<br> Choices `passive`: `unspecified`, `enabled`, `disabled`. Default value `passive`: `unspecified`.<br> Default value `priority`: `1`.<br> Allowed formats `authentication_key`: '0 <unencrypted-key>', '3 <3DES-format-encrypted-key>', '7 <Cisco-type-encrypted-key>'. Default value `area`: `0.0.0.0`.<br> Default value `authentication_key_id`: `0`.<br> Default value `authentication_key_secure_mode`: `false`.<br> Default value `authentication_md5_key_secure_mode`: `false`.<br> Choices `authentication_type`: `unspecified`, `simple`, `md5`, `none`. Default value `authentication_type`: `unspecified`. | <pre>list(object({<br> vrf = string<br> admin_state = optional(bool, true)<br> bandwidth_reference = optional(number, 40000)<br> bandwidth_reference_unit = optional(string, "mbps")<br> distance = optional(number, 110)<br> router_id = optional(string, "0.0.0.0")<br> # adjancency_logging_level = optional(string)<br> areas = optional(list(object({<br> area = string<br> authentication_type = optional(string, "unspecified")<br> cost = optional(number, 1)<br> type = optional(string, "regular")<br> })))<br> interfaces = optional(list(object({<br> interface = string<br> advertise_secondaries = optional(bool, true)<br> area = optional(string, "0.0.0.0")<br> bfd = optional(string, "unspecified")<br> cost = optional(number, 0)<br> dead_interval = optional(number, 0)<br> hello_interval = optional(number, 10)<br> network_type = optional(string, "unspecified")<br> passive = optional(string, "unspecified")<br> priority = optional(number, 1)<br> authentication_key = optional(string)<br> authentication_key_id = optional(number, 0)<br> authentication_key_secure_mode = optional(bool, false)<br> authentication_keychain = optional(string)<br> authentication_md5_key = optional(string)<br> authentication_md5_key_secure_mode = optional(bool, false)<br> authentication_type = optional(string)<br> })))<br> }))</pre> | `[]` | no |

## Outputs

Expand Down
18 changes: 9 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ resource "nxos_ospf_instance" "ospfInst" {
}

resource "nxos_ospf_vrf" "ospfDom" {
for_each = local.vrf_map
device = var.device
instance_name = var.name
name = each.value.vrf
admin_state = each.value.admin_state == true ? "enabled" : "disabled"
bandwidth_reference = each.value.bandwidth_reference
banwidth_reference_unit = each.value.banwidth_reference_unit
distance = each.value.distance
router_id = each.value.router_id
for_each = local.vrf_map
device = var.device
instance_name = var.name
name = each.value.vrf
admin_state = each.value.admin_state == true ? "enabled" : "disabled"
bandwidth_reference = each.value.bandwidth_reference
bandwidth_reference_unit = each.value.bandwidth_reference_unit
distance = each.value.distance
router_id = each.value.router_id

depends_on = [
nxos_ospf_instance.ospfInst
Expand Down
18 changes: 9 additions & 9 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ variable "vrfs" {
OSPF VRF list.
Default value `admin_state`: `true`.
Default value `bandwidth_reference`: `40000`.
Choices `banwidth_reference_unit`: `mbps`, `gbps`. Default value `banwidth_reference_unit`: `mbps`.
Choices `bandwidth_reference_unit`: `mbps`, `gbps`. Default value `bandwidth_reference_unit`: `mbps`.
Default value `distance`: `110`.
List `areas`:
Allowed formats `area`: `0.0.0.10`. Default value `area`: `0.0.0.0`.
Expand All @@ -43,12 +43,12 @@ variable "vrfs" {
Choices `authentication_type`: `unspecified`, `simple`, `md5`, `none`. Default value `authentication_type`: `unspecified`.
EOT
type = list(object({
vrf = string
admin_state = optional(bool, true)
bandwidth_reference = optional(number, 40000)
banwidth_reference_unit = optional(string, "mbps")
distance = optional(number, 110)
router_id = optional(string, "0.0.0.0")
vrf = string
admin_state = optional(bool, true)
bandwidth_reference = optional(number, 40000)
bandwidth_reference_unit = optional(string, "mbps")
distance = optional(number, 110)
router_id = optional(string, "0.0.0.0")
# adjancency_logging_level = optional(string)
areas = optional(list(object({
area = string
Expand Down Expand Up @@ -80,9 +80,9 @@ variable "vrfs" {

validation {
condition = alltrue([
for v in var.vrfs : try(contains(["mbps", "gbps"], v.banwidth_reference_unit), v.banwidth_reference_unit == null)
for v in var.vrfs : try(contains(["mbps", "gbps"], v.bandwidth_reference_unit), v.bandwidth_reference_unit == null)
])
error_message = "`banwidth_reference_unit`: Allowed values are: `mbps` or `gbps`."
error_message = "`bandwidth_reference_unit`: Allowed values are: `mbps` or `gbps`."
}

validation {
Expand Down

0 comments on commit 10b8747

Please sign in to comment.