-
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: Add Azure and Oracle Fabric Cloud Router connections (#382)
Adds the below Fabric cloud router(FCR) connections types and related tests and examples - FCR to Azure cloud - FCR to Oracle cloud --------- Co-authored-by: srushti-patl <[email protected]> Co-authored-by: Tim Hogarty <[email protected]>
- Loading branch information
1 parent
b891584
commit d7dde08
Showing
26 changed files
with
571 additions
and
4 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
47 changes: 47 additions & 0 deletions
47
...fabric/v4/cloudRouterConnectivity/cloudRouter2azure/single-connection/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,47 @@ | ||
# ECX Fabric Layer2 Single Connection from fabric cloud router to Azure | ||
|
||
This example shows how create single connection from Fabric Cloud Router to Azure, 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 | ||
`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` - Azure authorization key, service key generated from Azure Portal | ||
`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 | ||
|
||
## Azure login | ||
|
||
Log in to Azure 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 cloudRouter2azure/single-connection` | ||
- 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 fcr2azure connection resource | | ||
| READ | `terraform show` | Reads/Shows the current state of the fcr2azure connection resource | | ||
| UPDATE | `terraform apply -refresh` | Updates the fcr2azure with values provided in the terraform.tfvars file | | ||
| DELETE | `terraform destroy –auto-approve` | Deletes the created fcr2azure connection resource | |
56 changes: 56 additions & 0 deletions
56
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/single-connection/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" "azure"{ | ||
filter{ | ||
property = "/name" | ||
operator = "=" | ||
values = [var.fabric_sp_name] | ||
} | ||
} | ||
|
||
resource "equinix_fabric_connection" "fcr2azure"{ | ||
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 | ||
peering_type = var.peering_type | ||
profile { | ||
type = var.zside_ap_profile_type | ||
uuid = var.zside_ap_profile_uuid | ||
} | ||
location { | ||
metro_code = var.zside_location | ||
} | ||
} | ||
} | ||
} | ||
|
||
output "connection_result" { | ||
value = equinix_fabric_connection.fcr2azure.id | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/single-connection/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
...es/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/single-connection/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_Id" | ||
equinix_client_secret = "Equinix_Client_Secret" | ||
connection_name = "fcr_2_azure" | ||
connection_type = "IP_VC" | ||
notifications_type = "ALL" | ||
notifications_emails = ["[email protected]"] | ||
bandwidth = 50 | ||
redundancy = "PRIMARY" | ||
redundancy_group_uuid = "" #OPTIONAL | ||
purchase_order_number = "1-323292" | ||
peering_type = "PRIVATE" | ||
aside_ap_type = "CLOUD_ROUTER" | ||
fcr_uuid = "Cloud Router UUID" | ||
zside_ap_type = "SP" | ||
zside_ap_authentication_key = "Azure Service Key" | ||
zside_ap_profile_type = "L2_PROFILE" | ||
zside_ap_profile_uuid = "" | ||
zside_location = "SV" | ||
fabric_sp_name = "Azure Express Route" |
19 changes: 19 additions & 0 deletions
19
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/single-connection/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,19 @@ | ||
variable "equinix_client_id" {} | ||
variable "equinix_client_secret" {} | ||
variable "connection_name" {} | ||
variable "connection_type" {} | ||
variable "notifications_type" {} | ||
variable "notifications_emails" {} | ||
variable "bandwidth" {} | ||
variable "redundancy" {} | ||
variable "redundancy_group_uuid" {} | ||
variable "purchase_order_number" {} | ||
variable "peering_type" {} | ||
variable "aside_ap_type" {} | ||
variable "fcr_uuid" {} | ||
variable "zside_ap_type" {} | ||
variable "zside_ap_authentication_key" {} | ||
variable "zside_ap_profile_type" {} | ||
variable "zside_ap_profile_uuid" {} | ||
variable "zside_location" {} | ||
variable "fabric_sp_name" {} |
50 changes: 50 additions & 0 deletions
50
...s/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/two-connections/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,50 @@ | ||
# ECX Fabric Layer2 Two Redundant Connections from fabric cloud router to Azure | ||
|
||
This example shows how create two redundant connections from Fabric Cloud Router to Azure, 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 | ||
|
||
`pri_connection_name` - the name of the primary connection | ||
`sec_connection_name` - the name of the secondary connection | ||
`connection_type` - connection type, please refer schema | ||
`notifications_type` - notification type | ||
`notifications_emails` - List of emails | ||
`bandwidth` - bandwidth in MBs | ||
`aside_ap_type` - Fabric Cloud Router type | ||
`peering_type` - Peering type for the ECX Fabric Cloud Router on the a-side; typically PRIVATE | ||
**Note: You can use one Cloud Router for both connections if you would like** | ||
`cloud_router_primary_uuid` - UUID of ECX Fabric Cloud Router on a-side | ||
`cloud_router_secondary_uuid` - UUID of ECX Fabric Cloud Router on a-side for secondary connection | ||
`zside_ap_type` - Z side access point type | ||
`zside_ap_authentication_key` - Azure authorization key, service key generated from Azure Portal | ||
`zside_ap_profile_type` - Service profile type | ||
`zside_ap_profile_uuid` - Service profile UUID | ||
`zside_location` - Seller location | ||
`fabric_sp_name` - Service profile name, fetched based on Service Profile get call using Service Profile search schema | ||
|
||
## Azure login | ||
|
||
Log in to Azure 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 cloudRouter2azure/two-connections` | ||
- 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 fcr2azure redundant connection resources | | ||
| READ | `terraform show` | Reads/Shows the current state of the fcr2azure connection resources | | ||
| UPDATE | `terraform apply -refresh` | Updates the fcr2azure with values provided in the terraform.tfvars file | | ||
| DELETE | `terraform destroy –auto-approve` | Deletes the created fcr2azure connection resources | |
109 changes: 109 additions & 0 deletions
109
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/two-connections/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,109 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
data "equinix_fabric_service_profiles" "azure"{ | ||
filter{ | ||
property = "/name" | ||
operator = "=" | ||
values = [var.fabric_sp_name] | ||
} | ||
} | ||
|
||
resource "equinix_fabric_connection" "fcr2azure"{ | ||
name = var.pri_connection_name | ||
type = var.connection_type | ||
|
||
notifications { | ||
type = var.notifications_type | ||
emails = var.notifications_emails | ||
} | ||
|
||
bandwidth = var.bandwidth | ||
redundancy { | ||
priority = "PRIMARY" | ||
} | ||
order { | ||
purchase_order_number = var.pri_purchase_order_number | ||
} | ||
a_side { | ||
access_point { | ||
type = var.aside_ap_type | ||
router { | ||
uuid = var.cloud_router_primary_uuid | ||
} | ||
} | ||
} | ||
|
||
z_side { | ||
access_point { | ||
type = var.zside_ap_type | ||
authentication_key = var.zside_ap_authentication_key | ||
profile { | ||
type = var.zside_ap_profile_type | ||
uuid = var.zside_ap_profile_uuid | ||
} | ||
location { | ||
metro_code = var.zside_location | ||
} | ||
peering_type = var.peering_type | ||
} | ||
} | ||
} | ||
|
||
resource "equinix_fabric_connection" "fcr2azure2"{ | ||
name = var.sec_connection_name | ||
|
||
type = var.connection_type | ||
|
||
notifications { | ||
type = var.notifications_type | ||
emails = var.notifications_emails | ||
} | ||
|
||
bandwidth = var.bandwidth | ||
/*`redundancy` - Cloud router redundancy **Note: in order to use resource dependency with redundancy because | ||
it is a set type with max items of 1; put it into the one() terraform function before attempting to address | ||
its children. | ||
I.e. one(equinix_fabric_connection.connection_name.redundancy).group** | ||
*/ | ||
redundancy { | ||
priority = "SECONDARY" | ||
group = one(equinix_fabric_connection.fcr2azure.redundancy).group | ||
} | ||
order { | ||
purchase_order_number = var.sec_purchase_order_number | ||
} | ||
a_side { | ||
access_point { | ||
type = var.aside_ap_type | ||
router { | ||
uuid = var.cloud_router_secondary_uuid | ||
} | ||
} | ||
} | ||
|
||
z_side { | ||
access_point { | ||
type = var.zside_ap_type | ||
authentication_key = var.zside_ap_authentication_key | ||
profile { | ||
type = var.zside_ap_profile_type | ||
uuid = var.zside_ap_profile_uuid | ||
} | ||
location { | ||
metro_code = var.zside_location | ||
} | ||
peering_type = var.peering_type | ||
} | ||
} | ||
} | ||
|
||
output "primary_connection_result" { | ||
value = equinix_fabric_connection.fcr2azure.id | ||
} | ||
|
||
output "secondary_connection_result" { | ||
value = equinix_fabric_connection.fcr2azure2.id | ||
} |
7 changes: 7 additions & 0 deletions
7
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/two-connections/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" | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...ples/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/two-connections/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,20 @@ | ||
equinix_client_id = "Equinix_Client_Id" | ||
equinix_client_secret = "Equinix_Client_Secret" | ||
pri_connection_name = "fcr_2_azure_pri" | ||
sec_connection_name = "fcr_2_azure_sec" | ||
connection_type = "IP_VC" | ||
notifications_type = "ALL" | ||
notifications_emails = ["[email protected]"] | ||
bandwidth = 50 | ||
pri_purchase_order_number = "1-323202" | ||
sec_purchase_order_number = "1-323292" | ||
peering_type="PRIVATE" | ||
aside_ap_type = "CLOUD_ROUTER" | ||
cloud_router_primary_uuid = "19514e72-f1c0-497c-a550-664aa75cb28c" | ||
cloud_router_secondary_uuid = "56cfbf37-2ffd-4dac-b797-782bb5f459fc" | ||
zside_ap_type = "SP" | ||
zside_ap_authentication_key = "Azure Service Key" | ||
zside_ap_profile_type = "L2_PROFILE" | ||
zside_ap_profile_uuid = "bfb74121-7e2c-4f74-99b3-69cdafb03b41" | ||
zside_location = "SV" | ||
fabric_sp_name = "Azure ExpressRoute" |
20 changes: 20 additions & 0 deletions
20
examples/fabric/v4/cloudRouterConnectivity/cloudRouter2azure/two-connections/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,20 @@ | ||
variable "equinix_client_id" {} | ||
variable "equinix_client_secret" {} | ||
variable "pri_connection_name" {} | ||
variable "sec_connection_name" {} | ||
variable "connection_type" {} | ||
variable "notifications_type" {} | ||
variable "notifications_emails" {} | ||
variable "bandwidth" {} | ||
variable "pri_purchase_order_number" {} | ||
variable "sec_purchase_order_number" {} | ||
variable "peering_type" {} | ||
variable "aside_ap_type" {} | ||
variable "cloud_router_primary_uuid" {} | ||
variable "cloud_router_secondary_uuid" {} | ||
variable "zside_ap_type" {} | ||
variable "zside_ap_authentication_key" {} | ||
variable "zside_ap_profile_type" {} | ||
variable "zside_ap_profile_uuid" {} | ||
variable "zside_location" {} | ||
variable "fabric_sp_name" {} |
Oops, something went wrong.