generated from equinix-labs/terraform-equinix-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: C8KV SDWAN module onboarding * feat: C8KV SDWAN module onboarding * feat: C8KV SDWAN module onboarding
- Loading branch information
1 parent
971ecee
commit e53afb5
Showing
17 changed files
with
715 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Network Edge Device C8000V SDWAN(C8000V controller mode) HA Device Example | ||
|
||
This example demonstrates creation of Network Edge C8000V SDWAN HA device. It will: | ||
|
||
- Create a ACL template | ||
- Provision C8000V HA device | ||
|
||
## Usage | ||
|
||
To provision this example, you should clone the github repository and run terraform from within this directory: | ||
|
||
```bash | ||
git clone https://github.com/equinix/terraform-equinix-network-edge.git | ||
cd terraform-equinix-network-edge/examples/c8000v-sdwan-ha | ||
terraform init | ||
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 | | ||
|
||
## Providers | ||
|
||
| 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 | | ||
|
||
## Resources | ||
|
||
| 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 | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
| ---------------------------------------------------------------------------------- | ------------------------ | | ||
| <a name="output_device_details"></a> [device\_details](#output\_device\_details) | Virtual device details | | ||
|
||
<!-- END_TF_DOCS --> |
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,76 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
module "c8000v_sdwan_ha" { | ||
source = "../../modules/c8000v-sdwan" | ||
name = "terraform-test-c8000v-sdwan-primary" | ||
metro_code = var.metro_code_primary | ||
account_number = data.equinix_network_account.ny.number | ||
platform = "small" | ||
software_package = "network-essentials" | ||
term_length = 1 | ||
notifications = ["[email protected]"] | ||
additional_bandwidth = 50 | ||
cloud_init_file_id = equinix_network_file.c8k_bootstrap_file.uuid | ||
acl_template_id = equinix_network_acl_template.c8000v_sdwan_ha_wan_acl_template.id | ||
vendor_configuration = { | ||
hostname = "c8kv-sdwan" | ||
siteId = "1234" | ||
systemIpAddress = "10.0.0.1" | ||
} | ||
secondary = { | ||
enabled = true | ||
metro_code = var.metro_code_secondary | ||
cloud_init_file_id = equinix_network_file.c8k_bootstrap_file_sec.uuid | ||
acl_template_id = equinix_network_acl_template.c8000v_sdwan_ha_wan_acl_template.id | ||
account_number = data.equinix_network_account.ny.number | ||
vendor_configuration = { | ||
hostname = "sdwan-sec" | ||
siteId = "12345" | ||
systemIpAddress = "10.0.0.1" | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
|
||
resource "equinix_network_acl_template" "c8000v_sdwan_ha_wan_acl_template" { | ||
name = "tf-c8000v-sdwan-ha-wan-acl" | ||
description = "Primary C8000V SDWAN wan ACL template" | ||
inbound_rule { | ||
subnet = "0.0.0.0/0" | ||
protocol = "TCP" | ||
src_port = "any" | ||
dst_port = "22" | ||
} | ||
} | ||
|
||
|
||
resource "equinix_network_file" "c8k_bootstrap_file" { | ||
file_name = "C8K-6BDD255F-F75E-144B-2095-2918F995A37C.cfg" | ||
content = file("${path.module}/../../files/c8000v-sdwan/C8K-6BDD255F-F75E-144B-2095-2918F995A37C.cfg") | ||
metro_code = var.metro_code_primary | ||
device_type_code = "C8000V-SDWAN" | ||
process_type = "CLOUD_INIT" | ||
self_managed = true | ||
byol = true | ||
} | ||
|
||
resource "equinix_network_file" "c8k_bootstrap_file_sec" { | ||
file_name = "C8K-6BDD255F-F75E-144B-2095-2918F995A37C.cfg" | ||
content = file("${path.module}/../../files/c8000v-sdwan/C8K-6BDD255F-F75E-144B-2095-2918F995A37C.cfg") | ||
metro_code = var.metro_code_secondary | ||
device_type_code = "C8000V-SDWAN" | ||
process_type = "CLOUD_INIT" | ||
self_managed = true | ||
byol = true | ||
} | ||
|
||
data "equinix_network_account" "ny" { | ||
name = "test_account." | ||
metro_code = "NY" | ||
project_id = "f1a596ed-d24a-497c-92a8-44e0923cee62" | ||
} |
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,4 @@ | ||
output "device_details" { | ||
description = "Virtual device details" | ||
value = module.c8000v_sdwan_ha | ||
} |
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,17 @@ | ||
variable "equinix_client_id" { | ||
type = string | ||
description = "API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTID shell environment variable." | ||
} | ||
|
||
variable "equinix_client_secret" { | ||
type = string | ||
description = "API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTSECRET shell environment variable." | ||
} | ||
variable "metro_code_primary" { | ||
description = "Primary device location metro code" | ||
type = string | ||
} | ||
variable "metro_code_secondary" { | ||
description = "Secondary device location metro code" | ||
type = string | ||
} |
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 @@ | ||
terraform { | ||
required_version = ">= 1.3" | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
version = ">= 1.34" | ||
} | ||
} | ||
} |
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,60 @@ | ||
# Network Edge Device C8000V SDWAN(C8000V controller mode) Single Device Example | ||
|
||
This example demonstrates creation of Network Edge C8000V SDWAN single device. It will: | ||
|
||
- Create a ACL template | ||
- Provision C8000V single device | ||
|
||
## Usage | ||
|
||
To provision this example, you should clone the github repository and run terraform from within this directory: | ||
|
||
```bash | ||
git clone https://github.com/equinix/terraform-equinix-network-edge.git | ||
cd terraform-equinix-network-edge/examples/c8000v-sdwan-single | ||
terraform init | ||
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 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_equinix"></a> [equinix](#provider\_equinix) | >= 1.34 | | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_c8000v_sdwan_single"></a> [c8000v-sdwan\-single](#module\_c8000v-sdwan\_single) | ../../modules/c8000v-sdwan | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [equinix_network_acl_template.c8000v_sdwan_single_wan_acl_template](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/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 | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_device_details"></a> [device\_details](#output\_device\_details) | Virtual device details | | ||
<!-- END_TF_DOCS --> |
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,52 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
module "c8000v_single" { | ||
source = "../../modules/c8000v-sdwan" | ||
name = "terraform-test-c8000v-sdwan-primary" | ||
metro_code = data.equinix_network_account.ny.metro_code | ||
account_number = data.equinix_network_account.ny.number | ||
platform = "small" | ||
software_package = "network-essentials" | ||
term_length = 1 | ||
notifications = ["[email protected]"] | ||
additional_bandwidth = 50 | ||
cloud_init_file_id = equinix_network_file.c8k_bootstrap_file.uuid | ||
acl_template_id = equinix_network_acl_template.c8000v_sdwan_single_wan_acl_template.id | ||
vendor_configuration = { | ||
hostname = "c8kv-sdwan" | ||
siteId = "1234" | ||
systemIpAddress = "10.0.0.1" | ||
} | ||
} | ||
|
||
|
||
resource "equinix_network_acl_template" "c8000v_sdwan_single_wan_acl_template" { | ||
name = "tf-c8000v-sdwan-pri-wan-acl" | ||
description = "Primary C8000V SDWAN wan ACL template" | ||
inbound_rule { | ||
subnet = "0.0.0.0/0" | ||
protocol = "TCP" | ||
src_port = "any" | ||
dst_port = "22" | ||
} | ||
} | ||
|
||
|
||
resource "equinix_network_file" "c8k_bootstrap_file" { | ||
file_name = "C8K-6BDD255F-F75E-144B-2095-2918F995A37C.cfg" | ||
content = file("${path.module}/../../files/c8000v-sdwan/C8K-6BDD255F-F75E-144B-2095-2918F995A37C.cfg") | ||
metro_code = var.metro_code_primary | ||
device_type_code = "C8000V-SDWAN" | ||
process_type = "CLOUD_INIT" | ||
self_managed = true | ||
byol = true | ||
} | ||
|
||
data "equinix_network_account" "ny" { | ||
name = "test_account" | ||
metro_code = "NY" | ||
project_id = "f1a596ed-d24a-497c-92a8-44e0923cee62" | ||
} |
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,4 @@ | ||
output "device_details" { | ||
description = "Virtual device details" | ||
value = module.c8000v_single | ||
} |
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,14 @@ | ||
variable "equinix_client_id" { | ||
type = string | ||
description = "API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTID shell environment variable." | ||
} | ||
|
||
variable "equinix_client_secret" { | ||
type = string | ||
description = "API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTSECRET shell environment variable." | ||
} | ||
|
||
variable "metro_code_primary" { | ||
description = "Device location metro code" | ||
type = string | ||
} |
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 @@ | ||
terraform { | ||
required_version = ">= 1.3" | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
version = "~> 1.34" | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
files/c8000v-sdwan/C8K-6BDD255F-F75E-144B-2095-2918F995A37C.cfg
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,6 @@ | ||
#cloud-config | ||
vinitparam: | ||
- uuid : D9L-7ECC265E-G86F-255C-3A28E086B48D | ||
- otp : 59d2d0febc4d0dd4ddd7ed2fe6d293f9 | ||
- vbond : 10.0.0.0 | ||
- org : Test123 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.