-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adds Fabric cloud router to IPWAN network connection support (#408
) - Adds support for a new connection type: FCR to IPWAN - Includes changes to the connection schema to support the above type - Incudes tests and terraform examples
- Loading branch information
1 parent
53e84e5
commit 7846729
Showing
8 changed files
with
162 additions
and
5 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
39 changes: 39 additions & 0 deletions
39
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2wan/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,39 @@ | ||
# ECX Fabric Layer2 Connection from fabric cloud router to ipwan | ||
|
||
This example shows how create connection from Fabric Cloud Router to ipwan, on ECX Fabric ports. | ||
|
||
## Adjust variables | ||
At minimum, you must set below variables in `terraform.tfvars` file: | ||
|
||
* `equinix_client_id` - Equinix client ID (consumer key), obtained after | ||
registering app in the developer platform | ||
* `equinix_client_secret` - Equinix client secret ID (consumer secret), | ||
obtained same way as above | ||
|
||
`fcr_uuid` - UUID of ECX Fabric Cloud Router on a-side | ||
`network_uuid` - UUID of ipwan network on z-side | ||
`connection_name` - the name of the connection | ||
`connection_type` - connection type, please refer schema | ||
`notifications_type` - notification type | ||
`notifications_emails` - List of emails | ||
`purchase_order_number` - Purchase order number | ||
`bandwidth` - bandwidth in MBs | ||
`aside_ap_type` - Fabric Cloud Router type | ||
`zside_ap_type` - Z side access point type, ipwan | ||
|
||
## Initialize | ||
- First step is to initialize the terraform directory/resource we are going to work on. | ||
In the given example, the folder to perform CRUD operations on a fcr2wan connection can be found at examples/fcr2port/. | ||
|
||
- Change directory into - `CD examples/fabric/v4/cloudRouterConnectivity/cloudRouter2wan/` | ||
- Initialize Terraform plugins - `terraform init` | ||
|
||
## Fabric Cloud Router to wan connection : Create, Read, Update and Delete(CRUD) operations | ||
Note: `–auto-approve` command does not prompt the user for validating the applying config. Remove it to get a prompt to confirm the operation. | ||
|
||
| Operation | Command | Description | | ||
|:----------|:---------------------------------:|----------------------------------------------------------------------:| | ||
| CREATE | `terraform apply –auto-approve` | Creates a fcr2wan connection resource | | ||
| READ | `terraform show` | Reads/Shows the current state of the fcr2wan connection resource | | ||
| UPDATE | `terraform apply -refresh` | Updates the fcr2wan with values provided in the terraform.tfvars file | | ||
| DELETE | `terraform destroy –auto-approve` | Deletes the created fcr2wan connection resource | |
40 changes: 40 additions & 0 deletions
40
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2wan/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,40 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
|
||
resource "equinix_fabric_connection" "fcr2ipwan"{ | ||
name = var.connection_name | ||
type = var.connection_type | ||
notifications{ | ||
type=var.notifications_type | ||
emails=var.notifications_emails | ||
} | ||
bandwidth = var.bandwidth | ||
|
||
order { | ||
purchase_order_number= var.purchase_order_number | ||
} | ||
a_side { | ||
access_point { | ||
type= var.aside_ap_type | ||
router { | ||
uuid= var.fcr_uuid | ||
} | ||
} | ||
} | ||
z_side { | ||
access_point { | ||
type = var.zside_ap_type | ||
network { | ||
uuid = var.network_uuid | ||
} | ||
} | ||
} | ||
} | ||
|
||
output "connection_result" { | ||
value = equinix_fabric_connection.fcr2ipwan.id | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2wan/terraform.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,7 @@ | ||
terraform { | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2wan/terraform.tfvar.example
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,12 @@ | ||
equinix_client_id = “” | ||
equinix_client_secret = “” | ||
notifications_type = “ALL” | ||
notifications_emails = [“[email protected]”,“[email protected]”] | ||
purchase_order_number = “1-323292" | ||
fcr_uuid = “<fcr-uuid>” | ||
connection_name = “terraform_fcr2wan” | ||
connection_type = “IPWAN_VC” | ||
bandwidth = 50 | ||
aside_ap_type = “CLOUD_ROUTER” | ||
zside_ap_type = “NETWORK” | ||
network_uuid = “<network-uuid>” |
18 changes: 18 additions & 0 deletions
18
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2wan/variables.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,18 @@ | ||
variable "equinix_client_id" {} | ||
variable "equinix_client_secret" {} | ||
|
||
variable "fcr_uuid" {} | ||
variable "network_uuid" {} | ||
|
||
variable "notifications_type" {} | ||
variable "notifications_emails" {} | ||
variable "purchase_order_number" {} | ||
|
||
variable "connection_name" {} | ||
variable "connection_type" {} | ||
variable "bandwidth" {} | ||
|
||
variable "aside_ap_type" {} | ||
variable "zside_ap_type" {} | ||
|
||
|