-
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.
Add AWS and GCP Fabric Cloud Router connections (#375)
Adds the below Fabric cloud router(FCR) connections types and related tests and examples - FCR to AWS - FCR to GCP
- Loading branch information
Showing
28 changed files
with
365 additions
and
29 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
File renamed without changes.
File renamed without changes.
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" | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions
8
examples/fabric/v4/cloudRouterConnectivity/cloudRouter/terraform.tf
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2aws/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,48 @@ | ||
# ECX Fabric Layer2 Connection from fabric cloud router to AWS | ||
|
||
This example shows how create connection from Fabric Cloud Router to AWS, 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 | ||
`zside_port_name` - Name of ECX Fabric z-side port , i.e. ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-000 | ||
`connection_name` - the name of the connection | ||
`connection_type` - connection type, please refer schema | ||
`notifications_type` - notification type | ||
`notifications_emails` - List of emails | ||
`bandwidth` - bandwidth in MBs | ||
`redundancy` - Port redundancy | ||
`aside_ap_type` - Fabric Cloud Router type | ||
`zside_ap_type` - Z side access point type | ||
`zside_ap_authentication_key` - AWS authorization key, account number like 357848912121 | ||
`zside_ap_profile_type` - Service profile type | ||
`fabric_sp_name` - Service profile name, fetched based on Service Profile get call using Service Profile search schema | ||
`zside_location` - Seller location | ||
`seller_region` - Seller region code | ||
|
||
## AWS login | ||
|
||
Log in to AWS portal use account that has permission to create necessary resources. | ||
|
||
## 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 fcr2port connection can be found at examples/fcr2port/. | ||
|
||
- Change directory into - `CD fcr2aws/` | ||
- Initialize Terraform plugins - `terraform init` | ||
|
||
## Fabric Cloud Router to port 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 fcr2port connection resource | | ||
| READ | `terraform show` | Reads/Shows the current state of the fcr2port connection resource | | ||
| UPDATE | `terraform apply -refresh` | Updates the fcr2port with values provided in the terraform.tfvars file | | ||
| DELETE | `terraform destroy –auto-approve` | Deletes the created fcr2port connection resource | |
54 changes: 54 additions & 0 deletions
54
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2aws/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,54 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
data "equinix_fabric_service_profiles" "aws" { | ||
filter { | ||
property = "/name" | ||
operator = "=" | ||
values = [var.fabric_sp_name] | ||
} | ||
} | ||
|
||
|
||
resource "equinix_fabric_connection" "fcr2aws"{ | ||
name = var.connection_name | ||
type = var.connection_type | ||
notifications{ | ||
type=var.notifications_type | ||
emails=var.notifications_emails | ||
} | ||
bandwidth = var.bandwidth | ||
redundancy {priority= var.redundancy} | ||
|
||
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 | ||
authentication_key= var.zside_ap_authentication_key | ||
seller_region = var.seller_region | ||
profile { | ||
type= var.zside_ap_profile_type | ||
uuid= data.equinix_fabric_service_profiles.aws.data.0.uuid | ||
} | ||
location { | ||
metro_code= var.zside_location | ||
} | ||
} | ||
} | ||
} | ||
|
||
output "connection_result" { | ||
value = equinix_fabric_connection.fcr2aws.id | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2aws/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" | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2aws/terraform.tfvars
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,19 @@ | ||
equinix_client_id = "" | ||
equinix_client_secret = "" | ||
|
||
notifications_type = "ALL" | ||
notifications_emails = ["[email protected]","[email protected]"] | ||
purchase_order_number = "1-323292" | ||
fcr_uuid = "3d8ec863-06b4-4887-9feb-ccacb82923d5" | ||
connection_name = "terra_fcr2aws-2" | ||
connection_type = "IP_VC" | ||
bandwidth = 50 | ||
redundancy = "SECONDARY" | ||
aside_ap_type = "CLOUD_ROUTER" | ||
|
||
zside_ap_type = "SP" | ||
zside_ap_authentication_key = "" | ||
zside_ap_profile_type = "L2_PROFILE" | ||
zside_location = "SV" | ||
seller_region = "us-west-1" | ||
fabric_sp_name = "AWS Direct Connect" |
21 changes: 21 additions & 0 deletions
21
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2aws/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,21 @@ | ||
variable "equinix_client_id" {} | ||
variable "equinix_client_secret" {} | ||
|
||
variable "fcr_uuid" {} | ||
variable "notifications_type" {} | ||
variable "notifications_emails" {} | ||
variable "purchase_order_number" {} | ||
|
||
variable "connection_name" {} | ||
variable "connection_type" {} | ||
variable "bandwidth" {} | ||
variable "redundancy" {} | ||
|
||
variable "aside_ap_type" {} | ||
variable "zside_ap_type" {} | ||
variable "zside_ap_authentication_key" {} | ||
|
||
variable "zside_ap_profile_type" {} | ||
variable "fabric_sp_name" {} | ||
variable "zside_location" {} | ||
variable "seller_region" {} |
43 changes: 43 additions & 0 deletions
43
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2gcp/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,43 @@ | ||
# ECX Fabric Layer2 Connection from fabric cloud router to google | ||
|
||
This example shows how create connection from Fabric Cloud Router to google, 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 | ||
`zside_port_name` - Name of ECX Fabric z-side port , i.e. ops-user100-CX-SV5-NL-Qinq-BO-10G-SEC-JP-000 | ||
`connection_name` - the name of the connection | ||
`connection_type` - connection type, please refer schema | ||
`notifications_type` - notification type | ||
`notifications_emails` - List of emails | ||
`bandwidth` - bandwidth in MBs | ||
`redundancy` - Port redundancy | ||
`aside_ap_type` - Fabric Cloud Router type | ||
`zside_ap_type` - Z side access point type | ||
`zside_ap_authentication_key` - Google authorization key following a pattern, like **9da09fe8-a33b-4457-ab7d-d91f83152276/us-west1/1** | ||
`zside_ap_profile_type` - Service profile type | ||
`zside_location` - Seller location | ||
`seller_region` - Seller region code | ||
|
||
## 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 fcr2port connection can be found at examples/fcr2port/. | ||
|
||
- Change directory into - `CD fcr2gcp/` | ||
- Initialize Terraform plugins - `terraform init` | ||
|
||
## Fabric Cloud Router to port 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 fcr2port connection resource | | ||
| READ | `terraform show` | Reads/Shows the current state of the fcr2port connection resource | | ||
| UPDATE | `terraform apply -refresh` | Updates the fcr2port with values provided in the terraform.tfvars file | | ||
| DELETE | `terraform destroy –auto-approve` | Deletes the created fcr2port connection resource | |
56 changes: 56 additions & 0 deletions
56
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2gcp/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,56 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
data "equinix_fabric_service_profiles" "gcp" { | ||
filter { | ||
property = "/name" | ||
operator = "=" | ||
values = [var.fabric_sp_name] | ||
} | ||
} | ||
|
||
resource "equinix_fabric_connection" "fcr2gcp"{ | ||
name = var.connection_name | ||
type = var.connection_type | ||
notifications{ | ||
type=var.notifications_type | ||
emails=var.notifications_emails | ||
} | ||
bandwidth = var.bandwidth | ||
redundancy {priority= var.redundancy} | ||
|
||
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 | ||
authentication_key = var.zside_ap_authentication_key | ||
seller_region = var.zside_seller_region | ||
profile { | ||
type = var.zside_ap_profile_type | ||
uuid = data.equinix_fabric_service_profiles.gcp.data.0.uuid | ||
} | ||
location { | ||
metro_code = var.zside_location | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
||
output "connection_result" { | ||
value = equinix_fabric_connection.fcr2gcp.id | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2gcp/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" | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2gcp/terraform.tfvars
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,19 @@ | ||
equinix_client_id = "" | ||
equinix_client_secret = "" | ||
|
||
notifications_type = "ALL" | ||
notifications_emails = ["[email protected]","[email protected]"] | ||
purchase_order_number = "1-323292" | ||
fcr_uuid = "3d8ec863-06b4-4887-9feb-ccacb82923d5" | ||
connection_name = "conn-terra_gcp2" | ||
connection_type = "IP_VC" | ||
bandwidth = 50 | ||
redundancy = "SECONDARY" | ||
aside_ap_type = "CLOUD_ROUTER" | ||
|
||
zside_ap_type = "SP" | ||
zside_ap_authentication_key = "<gcp-key>/us-west1/2" | ||
zside_ap_profile_type = "L2_PROFILE" | ||
zside_location = "SV" | ||
zside_seller_region="us-west1" | ||
fabric_sp_name = "Google Cloud Partner Interconnect Zone 1" |
21 changes: 21 additions & 0 deletions
21
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2gcp/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,21 @@ | ||
variable "equinix_client_id" {} | ||
variable "equinix_client_secret" {} | ||
|
||
variable "fcr_uuid" {} | ||
variable "notifications_type" {} | ||
variable "notifications_emails" {} | ||
variable "purchase_order_number" {} | ||
|
||
variable "connection_name" {} | ||
variable "connection_type" {} | ||
variable "bandwidth" {} | ||
variable "redundancy" {} | ||
|
||
variable "aside_ap_type" {} | ||
variable "zside_ap_type" {} | ||
variable "zside_ap_authentication_key" {} | ||
|
||
variable "zside_ap_profile_type" {} | ||
variable "fabric_sp_name" {} | ||
variable "zside_location" {} | ||
variable "zside_seller_region" {} |
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
3 changes: 1 addition & 2 deletions
3
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2port/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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
terraform { | ||
required_providers { | ||
equinix = { | ||
source="developer.equinix.com/terraform/equinix" | ||
version = "9.0.0" | ||
source = "equinix/equinix" | ||
} | ||
} | ||
} |
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
Oops, something went wrong.