Skip to content

Commit

Permalink
feat: C8KV SDWAN module onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
schadalawada committed May 10, 2024
1 parent a22e23e commit a97fb90
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 33 deletions.
42 changes: 22 additions & 20 deletions examples/c8000v-sdwan-ha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,45 @@ terraform apply
Note that this example may create resources which cost money. Run 'terraform destroy' when you don't need these resources.

<!-- BEGIN_TF_DOCS -->

## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_equinix"></a> [equinix](#requirement\_equinix) | >= 1.34 |
| Name | Version |
| --------------------------------------------------------------------------- | --------- |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_equinix"></a> [equinix](#requirement\_equinix) | >= 1.34 |

## Providers

| Name | Version |
|------|---------|
| Name | Version |
| --------------------------------------------------------------- | --------- |
| <a name="provider_equinix"></a> [equinix](#provider\_equinix) | >= 1.34 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_c8000v_sdwan_ha"></a> [c8000v-sdwan\-ha](#module\_c8000v-sdwan\_ha) | ../../modules/c8000v-sdwan | n/a |
| Name | Source | Version |
| ------------------------------------------------------------------------------------- | ---------------------------- | --------- |
| <a name="module_c8000v_sdwan_ha"></a> [c8000v-sdwan\-ha](#module\_c8000v-sdwan\_ha) | ../../modules/c8000v-sdwan | n/a |

## Resources

| Name | Type |
|------|------|
| [equinix_network_acl_template.c8000v_sdwan_ha_wan_acl_template](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/network_acl_template) | resource |
| Name | Type |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| [equinix_network_acl_template.c8000v_sdwan_ha_wan_acl_template](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_acl_template) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_equinix_client_id"></a> [equinix\_client\_id](#input\_equinix\_client\_id) | API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTID shell environment variable. | `string` | n/a | yes |
| <a name="input_equinix_client_secret"></a> [equinix\_client\_secret](#input\_equinix\_client\_secret) | API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTSECRET shell environment variable. | `string` | n/a | yes |
| <a name="input_metro_code_primary"></a> [metro\_code\_primary](#input\_metro\_code\_primary) | Device location metro code | `string` | n/a | yes |
| <a name="input_ssh_rsa_public_key"></a> [ssh\_rsa\_public\_key](#input\_ssh\_rsa\_public\_key) | SSH RSA public key | `string` | n/a | yes |
| Name | Description | Type | Default | Required |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | --------- | :--------: |
| <a name="input_equinix_client_id"></a> [equinix\_client\_id](#input\_equinix\_client\_id) | API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTID shell environment variable. | `string` | n/a | yes |
| <a name="input_equinix_client_secret"></a> [equinix\_client\_secret](#input\_equinix\_client\_secret) | API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTSECRET shell environment variable. | `string` | n/a | yes |
| <a name="input_metro_code_primary"></a> [metro\_code\_primary](#input\_metro\_code\_primary) | Device location metro code | `string` | n/a | yes |
| <a name="input_ssh_rsa_public_key"></a> [ssh\_rsa\_public\_key](#input\_ssh\_rsa\_public\_key) | SSH RSA public key | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| Name | Description |
| ---------------------------------------------------------------------------------- | ------------------------ |
| <a name="output_device_details"></a> [device\_details](#output\_device\_details) | Virtual device details |

<!-- END_TF_DOCS -->
2 changes: 1 addition & 1 deletion examples/c8000v-sdwan-single/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ resource "equinix_network_file" "c8k_bootstrap_file" {
}

data "equinix_network_account" "ny" {
name = "test_account."
name = "test_account"
metro_code = "NY"
project_id = "f1a596ed-d24a-497c-92a8-44e0923cee62"
}
14 changes: 7 additions & 7 deletions modules/c8000v-sdwan/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Network Edge Virtual Device NGINX SubModule
# Network Edge Virtual Device C8000V SDWAN SubModule

The Network Edge Virtual Device C8000V SDWAN(C8000V controller mode) Module will create C8000V SDWAN devices on the Equinix
Network edge platform.
Expand Down Expand Up @@ -40,12 +40,12 @@ No modules.

## Resources

| Name | Type |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| [equinix_network_device.non_cluster](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/network_device) | resource |
| [equinix_network_device_platform.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/network_device_platform) | data source |
| [equinix_network_device_software.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/network_device_software) | data source |
| [equinix_network_device_type.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/network_device_type) | data source |
| Name | Type |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| [equinix_network_device.non_cluster](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_device) | resource |
| [equinix_network_device_platform.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_platform) | data source |
| [equinix_network_device_software.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_software) | data source |
| [equinix_network_device_type.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_type) | data source |

## Inputs

Expand Down
13 changes: 8 additions & 5 deletions modules/c8000v-sdwan/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ variable "metro_code" {
variable "account_number" {
description = "Billing account number for a device"
type = string
default = 0
validation {
condition = length(var.account_number) > 0 && var.account_number != null
error_message = "Account number must not be blank or null."
}
}

variable "platform" {
Expand Down Expand Up @@ -68,11 +71,11 @@ variable "notifications" {
}

variable "acl_template_id" {
description = "Identifier of an ACL template that will be applied on a device"
description = "Identifier of an ACL template that will be applied on a device."
type = string
validation {
condition = length(var.acl_template_id) > 0
error_message = "acl_template_id is mandatory"
error_message = "acl template is mandatory."
}
}

Expand All @@ -81,7 +84,7 @@ variable "additional_bandwidth" {
type = number
default = 0
validation {
condition = var.additional_bandwidth == 0 || (var.additional_bandwidth >= 25 && var.additional_bandwidth <= 2001)
condition = var.additional_bandwidth == 0 || (var.additional_bandwidth >= 25 && var.additional_bandwidth <= 5001)
error_message = "Additional internet bandwidth should be between 25 and 2001 Mbps."
}
}
Expand Down Expand Up @@ -151,7 +154,7 @@ variable "secondary" {
error_message = "Key 'metro_code' has to be defined for secondary device. Valid metro code consists of two capital letters, i.e. SV, DC."
}
validation {
condition = try(var.secondary.additional_bandwidth >= 25 && var.secondary.additional_bandwidth <= 2001, true)
condition = try(var.secondary.additional_bandwidth >= 25 && var.secondary.additional_bandwidth <= 5001, true)
error_message = "Key 'additional_bandwidth' has to be between 25 and 2001 Mbps."
}
validation {
Expand Down

0 comments on commit a97fb90

Please sign in to comment.