Skip to content

Commit

Permalink
CXF-80887 Adding Cloud Router Connection module & AWS, Port, Azure-Re… (
Browse files Browse the repository at this point in the history
#7)

* CXF-80887 Adding Cloud Router Connection module & AWS, Port, Azure-Redundant connections examples

* CXF-80887 fixing FCR connection module & examples

* CXF-80887 fixing connection module & examples scripts

* CXF-80887 fixing changes for vlang tags and misc.

* CXF-80887 Adding Azure,GCP,Oracle,sp, wan connections example scripts and README.md files
  • Loading branch information
srushti-patl authored Nov 27, 2023
1 parent 6a4140c commit a87fda2
Show file tree
Hide file tree
Showing 93 changed files with 1,312 additions and 1,765 deletions.
Empty file.
37 changes: 37 additions & 0 deletions examples/cloud-router-2-aws-connection/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
terraform {
required_providers {
equinix = {
source = "equinix/equinix"
version = ""
}
}
}

provider "equinix" {
client_id = var.equinix_client_id
client_secret = var.equinix_client_secret
}

module "cloud_router_aws_connection" {
source = "../../modules/cloud-router-connection"

connection_name = var.connection_name
connection_type = var.connection_type
notifications_type = var.notifications_type
notifications_emails = var.notifications_emails
additional_info = [{ key = "accessKey", value = var.aws_access_key }, { key = "secretKey", value = var.aws_secret_key }]
bandwidth = var.bandwidth
purchase_order_number = var.purchase_order_number

#Aside
aside_fcr_uuid = var.aside_fcr_uuid
aside_ap_type = var.aside_ap_type

#Zside
zside_ap_type = var.zside_ap_type
zside_ap_authentication_key = var.zside_ap_authentication_key
zside_ap_profile_type = var.zside_ap_profile_type
zside_location = var.zside_location
zside_seller_region = var.zside_seller_region
zside_fabric_sp_name = var.zside_fabric_sp_name
}
3 changes: 3 additions & 0 deletions examples/cloud-router-2-aws-connection/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "module_output" {
value = module.cloud_router_aws_connection.primary_connection_id
}
19 changes: 19 additions & 0 deletions examples/cloud-router-2-aws-connection/terrafor.tfvars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
equinix_client_id = "<MyEquinixClientId>"
equinix_client_secret = "<MyEquinixSecret>"

notifications_type = "ALL"
notifications_emails = ["[email protected]","[email protected]"]
purchase_order_number = "1-323292"
aside_fcr_uuid = "<Fabric Cloud Router UUID>"
connection_name = "fcr_2_aws"
connection_type = "IP_VC"
bandwidth = 50
aside_ap_type = "CLOUD_ROUTER"
zside_ap_type = "SP"
zside_ap_authentication_key = "<AWS Account Id>"
zside_ap_profile_type = "L2_PROFILE"
zside_location = "SV"
zside_seller_region = "us-west-1"
zside_fabric_sp_name = "AWS Direct Connect"
aws_access_key = "<AWS Client Access Key>"
aws_secret_key = "<AWS Client Secret Key>"
88 changes: 88 additions & 0 deletions examples/cloud-router-2-aws-connection/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
variable "equinix_client_id" {
description = "Equinix client ID (consumer key), obtained after registering app in the developer platform"
type = string
}
variable "equinix_client_secret" {
description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform"
type = string
}
variable "connection_name" {
description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores"
type = string
}
variable "connection_type" {
description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC"
default = ""
type = string
}
variable "notifications_type" {
description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS"
type = string

}
variable "notifications_emails" {
description = "Array of contact emails"
type = list(string)
}
variable "bandwidth" {
description = "Connection bandwidth in Mbps"
type = number
}
variable "purchase_order_number" {
description = "Purchase order number"
type = string
}
variable "aside_ap_type" {
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW"
type = string
}
variable "aside_fcr_uuid" {
description = "Equinix-assigned Fabric Cloud Router identifier"
type = string
}
variable "zside_ap_authentication_key" {
description = "Authentication key for provider based connections"
type = string
default = ""
}
variable "zside_ap_type" {
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW"
type = string
default = "SP"
}
variable "zside_ap_profile_type" {
description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE"
type = string
default = "L2_PROFILE"
}
variable "zside_location" {
description = "Access point metro code"
type = string
default = "SP"
}
variable "zside_fabric_sp_name" {
description = "Equinix Service Profile Name"
type = string
default = ""
}
variable "zside_seller_region" {
description = "Access point seller region"
type = string
default = ""
}
variable "aws_access_key" {
description = "AWS Access Key from the AWS Console"
type = string
default = null
}
variable "aws_secret_key" {
description = "AWS Secret Key from the AWS Console"
type = string
default = null
}

variable "additional_info" {
description = "Additional parameters required for some service profiles. It should be a list of maps containing 'key' and 'value e.g. `[{ key='asn' value = '65000'}, { key='ip' value = '192.168.0.1'}]`"
type = list(object({ key = string, value = string }))
default = []
}
Empty file.
36 changes: 36 additions & 0 deletions examples/cloud-router-2-azure-connection/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
terraform {
required_providers {
equinix = {
source = "equinix/equinix"
version = ""
}
}
}

provider "equinix" {
client_id = var.equinix_client_id
client_secret = var.equinix_client_secret
}

module "cloud_router_azure_connection" {
source = "../../modules/cloud-router-connection"

connection_name = var.connection_name
connection_type = var.connection_type
notifications_type = var.notifications_type
notifications_emails = var.notifications_emails
bandwidth = var.bandwidth
purchase_order_number = var.purchase_order_number

#Aside
aside_ap_type = var.aside_ap_type
aside_fcr_uuid = var.aside_fcr_uuid

#Zside
zside_ap_type = var.zside_ap_type
zside_ap_authentication_key = var.zside_ap_authentication_key
zside_ap_profile_type = var.zside_ap_profile_type
zside_location = var.zside_location
zside_peering_type = var.zside_peering_type
zside_fabric_sp_name = var.zside_fabric_sp_name
}
3 changes: 3 additions & 0 deletions examples/cloud-router-2-azure-connection/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "module_output" {
value = module.cloud_router_azure_connection.primary_connection_id
}
17 changes: 17 additions & 0 deletions examples/cloud-router-2-azure-connection/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
equinix_client_id = "<MyEquinixClientId>"
equinix_client_secret = "<MyEquinixSecret>"

connection_name = "fcr_2_azure"
connection_type = "IP_VC"
notifications_type = "ALL"
notifications_emails = ["[email protected]","[email protected]"]
purchase_order_number = "1-323292"
bandwidth = 50
aside_ap_type = "CLOUD_ROUTER"
aside_fcr_uuid = "<Primary Fabric Cloud router UUID>"
zside_ap_type = "SP"
zside_ap_authentication_key = "<Azure Service Key>"
zside_ap_profile_type = "L2_PROFILE"
zside_location = "SV"
zside_peering_type = "PRIVATE"
zside_fabric_sp_name = "Azure ExpressRoute"
73 changes: 73 additions & 0 deletions examples/cloud-router-2-azure-connection/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
variable "equinix_client_id" {
description = "Equinix client ID (consumer key), obtained after registering app in the developer platform"
type = string
}
variable "equinix_client_secret" {
description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform"
type = string
}
variable "connection_name" {
description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores"
type = string
}
variable "connection_type" {
description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC"
type = string
default = ""
}
variable "notifications_type" {
description = "Notification Type - ALL,CONNECTION_APPROVAL,SALES_REP_NOTIFICATIONS, NOTIFICATIONS"
type = string

}
variable "notifications_emails" {
description = "Array of contact emails"
type = list(string)
}
variable "bandwidth" {
description = "Connection bandwidth in Mbps"
type = number
}
variable "purchase_order_number" {
description = "Purchase order number"
type = string
}
variable "aside_ap_type" {
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW"
type = string
}
variable "aside_fcr_uuid" {
description = "Equinix-assigned Fabric Cloud Router identifier"
type = string
}

variable "zside_ap_authentication_key" {
description = "Authentication key for provider based connections"
type = string
default = ""
}
variable "zside_ap_type" {
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW"
type = string
default = "SP"
}
variable "zside_ap_profile_type" {
description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE"
type = string
default = "L2_PROFILE"
}
variable "zside_location" {
description = "Access point metro code"
type = string
default = "SP"
}
variable "zside_peering_type" {
description = "Access point peering type - PRIVATE, MICROSOFT, PUBLIC, MANUAL"
default = "PRIVATE"
}

variable "zside_fabric_sp_name" {
description = "Equinix Service Profile Name"
type = string
default = ""
}
Empty file.
42 changes: 42 additions & 0 deletions examples/cloud-router-2-azure-redundant-connection/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
terraform {
required_providers {
equinix = {
source = "equinix/equinix"
version = ""
}
}
}

provider "equinix" {
client_id = var.equinix_client_id
client_secret = var.equinix_client_secret
}

module "cloud_router_azure_redundant_connection" {
source = "../../modules/cloud-router-connection"

#Primary Connection
connection_name = var.connection_name
connection_type = var.connection_type
notifications_type = var.notifications_type
notifications_emails = var.notifications_emails
bandwidth = var.bandwidth
purchase_order_number = var.purchase_order_number

#Aside
aside_ap_type = var.aside_ap_type
aside_fcr_uuid = var.aside_fcr_uuid

#Zside
zside_ap_type = var.zside_ap_type
zside_ap_authentication_key = var.zside_ap_authentication_key
zside_ap_profile_type = var.zside_ap_profile_type
zside_location = var.zside_location
zside_fabric_sp_name = var.zside_fabric_sp_name
zside_peering_type = var.zside_peering_type

#Secondary-Connection
secondary_connection_name = var.secondary_connection_name
secondary_bandwidth = var.secondary_bandwidth
aside_sec_fcr_uuid = var.aside_sec_fcr_uuid
}
6 changes: 6 additions & 0 deletions examples/cloud-router-2-azure-redundant-connection/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
output "module_output" {
value = module.cloud_router_azure_redundant_connection.primary_connection_id
}
output "secondary_connection_result" {
value = var.secondary_connection_name != "" ? module.cloud_router_azure_redundant_connection.secondary_connection_id : null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
equinix_client_id = "<MyEquinixClientId>"
equinix_client_secret = "<MyEquinixSecret>"

connection_name = "fcr_2_azure_pri"
secondary_connection_name = "fcr_2_azure_sec"
notifications_type = "ALL"
notifications_emails = ["[email protected]","[email protected]"]
purchase_order_number = "1-323292"
connection_type = "IP_VC"
bandwidth = 50
secondary_bandwidth = 50
aside_ap_type = "CLOUD_ROUTER"
aside_fcr_uuid = "<Primary Fabric Cloud router UUID>"
aside_sec_fcr_uuid = "<Secondary Fabric Cloud router UUID>"
zside_ap_type = "SP"
zside_ap_authentication_key = "<Azure Service Key>"
zside_ap_profile_type = "L2_PROFILE"
zside_location = "SV"
zside_peering_type = "PRIVATE"
zside_seller_region = "us-west-1"
zside_fabric_sp_name = "Azure ExpressRoute"
Loading

0 comments on commit a87fda2

Please sign in to comment.