diff --git a/examples/service-token-for-aside-port/README.md b/examples/service-token-for-aside-port/README.md new file mode 100644 index 0000000..55ed077 --- /dev/null +++ b/examples/service-token-for-aside-port/README.md @@ -0,0 +1,11 @@ +# Fabric Service Token for Aside Port Creation Example + +This example shows how to create Fabric Aside Port based Service Token. + +It leverages the Equinix Terraform Provider to setup the service token based on the parameters you have provided to this example; or based on the pattern +you see used in this example it will allow you to create a more specific use case for your own needs. + +See example usage below for details on how to use this example. + + + diff --git a/examples/service-token-for-aside-port/main.tf b/examples/service-token-for-aside-port/main.tf new file mode 100644 index 0000000..737d778 --- /dev/null +++ b/examples/service-token-for-aside-port/main.tf @@ -0,0 +1,37 @@ +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} +data "equinix_fabric_ports" "aside_port" { + filters { + name = var.aside_port_name + } +} + +resource "equinix_fabric_service_token" "service-token" { + type = var.service_token_type + name = var.service_token_name + description = var.service_token_description + expiration_date_time = var.service_token_expiration_date_time + notifications { + type = var.notifications_type + emails = var.notifications_emails + } + + service_token_connection { + type = var.connection_type + bandwidth_limit = var.bandwidth_limit + a_side { + access_point_selectors { + type = var.aside_ap_type + port { + uuid = data.equinix_fabric_ports.aside_port.data.0.uuid + } + link_protocol { + type = var.aside_vlan_tag_type + vlan_tag = var.aside_vlan_tag + } + } + } + } +} diff --git a/examples/service-token-for-aside-port/outputs.tf b/examples/service-token-for-aside-port/outputs.tf new file mode 100644 index 0000000..ec241a3 --- /dev/null +++ b/examples/service-token-for-aside-port/outputs.tf @@ -0,0 +1,6 @@ +output "service_token_id" { + value = equinix_fabric_service_token.service-token.id +} +output "service-token" { + value = equinix_fabric_service_token.service-token +} diff --git a/examples/service-token-for-aside-port/terraform.tfvars.example b/examples/service-token-for-aside-port/terraform.tfvars.example new file mode 100644 index 0000000..9107981 --- /dev/null +++ b/examples/service-token-for-aside-port/terraform.tfvars.example @@ -0,0 +1,16 @@ +equinix_client_id = "" +equinix_client_secret = "" + +#Service Token +service_token_type = "VC_TOKEN" +service_token_name = "Terra_Test_Token" +service_token_description = "Zside VD Token Test" +service_token_expiration_date_time = "2024-12-29T06:43:49.980Z" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +connection_type = "EVPL_VC" +bandwidth_limit = 1000 +aside_ap_type = "COLO" +aside_port_name = "" +aside_vlan_tag_type = "DOT1Q" +aside_vlan_tag = "2876" diff --git a/examples/service-token-for-aside-port/variables.tf b/examples/service-token-for-aside-port/variables.tf new file mode 100644 index 0000000..664f449 --- /dev/null +++ b/examples/service-token-for-aside-port/variables.tf @@ -0,0 +1,61 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string + sensitive = true +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string + sensitive = true +} + +#Service Token +variable "service_token_name" { + description = "Service Token Name" + type = string +} +variable "service_token_type" { + description = "Service Token Type; VC_TOKEN,EPL_TOKEN" + type = string +} +variable "service_token_description" { + description = "Service Token Description" + type = string +} +variable "service_token_expiration_date_time" { + description = "Expiration date and time of the service token; 2020-11-06T07:00:00" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL is the only type currently supported" + type = string +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "connection_type" { + description = "Type of Connection supported by Service Token you will create; EVPL_VC, EVPLAN_VC, EPLAN_VC, IPWAN_VC" + type = string +} +variable "bandwidth_limit" { + description = "Connection bandwidth limit in Mbps" + type = number +} +variable "aside_ap_type" { + description = "Type of Access point; COLO, VD, NETWORK" + type = string +} +variable "aside_port_name" { + description = "Virtual Device UUID" + type = string +} +variable "aside_vlan_tag_type" { + description = "Vlan Tag Type; DOT1Q or QINQ" + type = string +} +variable "aside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} + diff --git a/examples/service-token-for-aside-port/versions.tf b/examples/service-token-for-aside-port/versions.tf new file mode 100644 index 0000000..3e04e64 --- /dev/null +++ b/examples/service-token-for-aside-port/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.5.4" + required_providers { + equinix = { + source="equinix/equinix" + version = ">= 3.1.0" + } + } +} diff --git a/examples/service-token-for-zside-network/README.md b/examples/service-token-for-zside-network/README.md new file mode 100644 index 0000000..969b7cb --- /dev/null +++ b/examples/service-token-for-zside-network/README.md @@ -0,0 +1,11 @@ +# Fabric Service Token for Zside Network Creation Example + +This example shows how to create Fabric Zside Network based Service Token. + +It leverages the Equinix Terraform Provider to setup the service token based on the parameters you have provided to this example; or based on the pattern +you see used in this example it will allow you to create a more specific use case for your own needs. + +See example usage below for details on how to use this example. + + + diff --git a/examples/service-token-for-zside-network/main.tf b/examples/service-token-for-zside-network/main.tf new file mode 100644 index 0000000..35ff2b3 --- /dev/null +++ b/examples/service-token-for-zside-network/main.tf @@ -0,0 +1,27 @@ +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} + +resource "equinix_fabric_service_token" "service-token" { + type = var.service_token_type + name = var.service_token_name + description = var.service_token_description + expiration_date_time = var.service_token_expiration_date_time + notifications { + type = var.notifications_type + emails = var.notifications_emails + } + service_token_connection { + type = var.connection_type + supported_bandwidths = var.supported_bandwidths + z_side { + access_point_selectors { + type = var.zside_ap_type + network { + uuid = var.zside_network_uuid + } + } + } + } +} diff --git a/examples/service-token-for-zside-network/outputs.tf b/examples/service-token-for-zside-network/outputs.tf new file mode 100644 index 0000000..ec241a3 --- /dev/null +++ b/examples/service-token-for-zside-network/outputs.tf @@ -0,0 +1,6 @@ +output "service_token_id" { + value = equinix_fabric_service_token.service-token.id +} +output "service-token" { + value = equinix_fabric_service_token.service-token +} diff --git a/examples/service-token-for-zside-network/terraform.tfvars.example b/examples/service-token-for-zside-network/terraform.tfvars.example new file mode 100644 index 0000000..b6ba22e --- /dev/null +++ b/examples/service-token-for-zside-network/terraform.tfvars.example @@ -0,0 +1,14 @@ +equinix_client_id = "" +equinix_client_secret = "" + +#Service Token +service_token_type = "VC_TOKEN" +service_token_name = "Terra_Test_Token" +service_token_description = "Zside VD Token Test" +service_token_expiration_date_time = "2024-12-29T06:43:49.980Z" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +connection_type = "EVPL_VC" +supported_bandwidths = [50,100, 500, 1000] +zside_ap_type = "NETWORK" +zside_network_uuid = "" diff --git a/examples/service-token-for-zside-network/variables.tf b/examples/service-token-for-zside-network/variables.tf new file mode 100644 index 0000000..00cb2aa --- /dev/null +++ b/examples/service-token-for-zside-network/variables.tf @@ -0,0 +1,56 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string + sensitive = true +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string + sensitive = true +} + +#Service Token +variable "service_token_name" { + description = "Service Token Name" + type = string +} +variable "service_token_type" { + description = "Service Token Type; VC_TOKEN,EPL_TOKEN" + type = string +} +variable "service_token_description" { + description = "Service Token Description" + type = string +} +variable "service_token_expiration_date_time" { + description = "Expiration date and time of the service token; 2020-11-06T07:00:00" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL is the only type currently supported" + type = string +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "connection_type" { + description = "Type of Connection supported by Service Token you will create; EVPL_VC, EVPLAN_VC, EPLAN_VC, IPWAN_VC" + type = string +} +variable "supported_bandwidths" { + description = "List of permitted bandwidths" + type = list +} +variable "zside_ap_type" { + description = "Type of Access point; COLO, VD, NETWORK" + type = string +} +variable "zside_network_type" { + description = "Network type" + type = string +} +variable "zside_network_uuid" { + description = "Network UUID" + type = string +} diff --git a/examples/service-token-for-zside-network/versions.tf b/examples/service-token-for-zside-network/versions.tf new file mode 100644 index 0000000..3e04e64 --- /dev/null +++ b/examples/service-token-for-zside-network/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.5.4" + required_providers { + equinix = { + source="equinix/equinix" + version = ">= 3.1.0" + } + } +} diff --git a/examples/service-token-for-zside-port/README.md b/examples/service-token-for-zside-port/README.md new file mode 100644 index 0000000..0ea1066 --- /dev/null +++ b/examples/service-token-for-zside-port/README.md @@ -0,0 +1,11 @@ +# Fabric Service Token for Zside Port Creation Example + +This example shows how to create Fabric Zside Port based Service Token. + +It leverages the Equinix Terraform Provider to setup the service token based on the parameters you have provided to this example; or based on the pattern +you see used in this example it will allow you to create a more specific use case for your own needs. + +See example usage below for details on how to use this example. + + + diff --git a/examples/service-token-for-zside-port/main.tf b/examples/service-token-for-zside-port/main.tf new file mode 100644 index 0000000..7ff75ae --- /dev/null +++ b/examples/service-token-for-zside-port/main.tf @@ -0,0 +1,38 @@ +provider "equinix" { + client_id = var.equinix_client_id + client_secret = var.equinix_client_secret +} +data "equinix_fabric_ports" "zside_port" { + filters { + name = var.zside_port_name + } +} + +resource "equinix_fabric_service_token" "service-token" { + type = var.service_token_type + name = var.service_token_name + description = var.service_token_description + expiration_date_time = var.service_token_expiration_date_time + notifications { + type = var.notifications_type + emails = var.notifications_emails + } + + service_token_connection { + type = var.connection_type + supported_bandwidths = var.supported_bandwidths + allow_remote_connection = var.allow_remote_connection + z_side { + access_point_selectors { + type = var.zside_ap_type + port { + uuid = data.equinix_fabric_ports.zside_port.data.0.uuid + } + link_protocol { + type = var.zside_vlan_tag_type + vlan_tag = var.zside_vlan_tag + } + } + } + } +} diff --git a/examples/service-token-for-zside-port/outputs.tf b/examples/service-token-for-zside-port/outputs.tf new file mode 100644 index 0000000..0092b62 --- /dev/null +++ b/examples/service-token-for-zside-port/outputs.tf @@ -0,0 +1,6 @@ +output "service-token_id" { + value = equinix_fabric_service_token.service-token.id +} +output "service-token" { + value = equinix_fabric_service_token.service-token +} diff --git a/examples/service-token-for-zside-port/terraform.tfvars.example b/examples/service-token-for-zside-port/terraform.tfvars.example new file mode 100644 index 0000000..943ce39 --- /dev/null +++ b/examples/service-token-for-zside-port/terraform.tfvars.example @@ -0,0 +1,16 @@ +equinix_client_id = "" +equinix_client_secret = "" + +#Service Token +service_token_type = "VC_TOKEN" +service_token_name = "Terra_Test_Token" +service_token_description = "Zside VD Token Test" +service_token_expiration_date_time = "2024-12-29T06:43:49.980Z" +notifications_type = "ALL" +notifications_emails = ["example@equinix.com"] +connection_type = "EVPL_VC" +supported_bandwidths = [50,100, 500, 1000] +zside_ap_type = "COLO" +zside_port_name = "" +zside_vlan_tag_type = "DOT1Q" +zside_vlan_tag = "2876" diff --git a/examples/service-token-for-zside-port/variables.tf b/examples/service-token-for-zside-port/variables.tf new file mode 100644 index 0000000..38b6cae --- /dev/null +++ b/examples/service-token-for-zside-port/variables.tf @@ -0,0 +1,64 @@ +variable "equinix_client_id" { + description = "Equinix client ID (consumer key), obtained after registering app in the developer platform" + type = string + sensitive = true +} +variable "equinix_client_secret" { + description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform" + type = string + sensitive = true +} + +#Service Token +variable "service_token_name" { + description = "Service Token Name" + type = string +} +variable "service_token_type" { + description = "Service Token Type; VC_TOKEN,EPL_TOKEN" + type = string +} +variable "service_token_description" { + description = "Service Token Description" + type = string +} +variable "service_token_expiration_date_time" { + description = "Expiration date and time of the service token; 2020-11-06T07:00:00" + type = string +} +variable "notifications_type" { + description = "Notification Type - ALL is the only type currently supported" + type = string +} +variable "notifications_emails" { + description = "Array of contact emails" + type = list(string) +} +variable "connection_type" { + description = "Type of Connection supported by Service Token you will create; EVPL_VC, EVPLAN_VC, EPLAN_VC, IPWAN_VC" + type = string +} +variable "supported_bandwidths" { + description = "List of permitted bandwidths" + type = list +} +variable "allow_remote_connection" { + description = "allowRemoteConnection" + type = bool +} +variable "zside_ap_type" { + description = "Type of Access point; COLO, VD, NETWORK" + type = string +} +variable "zside_port_name" { + description = "Virtual Device UUID" + type = string +} +variable "zside_vlan_tag_type" { + description = "Vlan Tag Type; DOT1Q or QINQ" + type = string +} +variable "zside_vlan_tag" { + description = "Vlan Tag information, outer vlanSTag for QINQ connections" + type = string +} diff --git a/examples/service-token-for-zside-port/versions.tf b/examples/service-token-for-zside-port/versions.tf new file mode 100644 index 0000000..3e04e64 --- /dev/null +++ b/examples/service-token-for-zside-port/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.5.4" + required_providers { + equinix = { + source="equinix/equinix" + version = ">= 3.1.0" + } + } +} diff --git a/examples/service-token-for-zside-virtual-device/terraform.tfvars.example b/examples/service-token-for-zside-virtual-device/terraform.tfvars.example index 44f2fc4..2917b44 100644 --- a/examples/service-token-for-zside-virtual-device/terraform.tfvars.example +++ b/examples/service-token-for-zside-virtual-device/terraform.tfvars.example @@ -41,4 +41,3 @@ zside_ap_type = "VD" zside_vd_type = "EDGE" zside_vd_uuid = "" zside_interface_type = "NETWORK" -zside_interface_id = "3" diff --git a/examples/service-token-for-zside-virtual-device/variables.tf b/examples/service-token-for-zside-virtual-device/variables.tf index 68585ae..047b755 100644 --- a/examples/service-token-for-zside-virtual-device/variables.tf +++ b/examples/service-token-for-zside-virtual-device/variables.tf @@ -145,7 +145,3 @@ variable "zside_interface_type" { description = "Interface Type" type = string } -variable "zside_interface_id" { - description = "Interface Id" - type = string -} diff --git a/examples/service-token-for-zside-virtual-device/versions.tf b/examples/service-token-for-zside-virtual-device/versions.tf index 8df44b7..d4f6406 100644 --- a/examples/service-token-for-zside-virtual-device/versions.tf +++ b/examples/service-token-for-zside-virtual-device/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { equinix = { source = "equinix/equinix" - version = ">= 2.10.0" + version = ">= 3.1.0" } } }