diff --git a/examples/cloud-router-2-aws-connection/terraform.tfvars.example b/examples/cloud-router-2-aws-connection/terraform.tfvars.example index 54bdb790..765858db 100644 --- a/examples/cloud-router-2-aws-connection/terraform.tfvars.example +++ b/examples/cloud-router-2-aws-connection/terraform.tfvars.example @@ -23,7 +23,6 @@ additional_info = [ aws_gateway_name = "aws_gateway" aws_gateway_asn = 64518 aws_vif_name = "port2aws" -aws_vif_vlan = "320" aws_vif_address_family = "ipv4" aws_vif_bgp_asn = 64999 aws_vif_amazon_address = "169.254.0.1/30" diff --git a/examples/cloud-router-2-aws-connection/variables.tf b/examples/cloud-router-2-aws-connection/variables.tf index a03eea9d..2c304dd1 100644 --- a/examples/cloud-router-2-aws-connection/variables.tf +++ b/examples/cloud-router-2-aws-connection/variables.tf @@ -80,10 +80,6 @@ variable "aws_vif_name" { description = "The name for the virtual interface" type = string } -variable "aws_vif_vlan" { - description = " The VLAN ID" - type = string -} variable "aws_vif_address_family" { description = "The address family for the BGP peer. ipv4 or ipv6" type = string diff --git a/examples/port-2-aws-connection/terraform.tfvars.example b/examples/port-2-aws-connection/terraform.tfvars.example index 7a653619..6603052c 100644 --- a/examples/port-2-aws-connection/terraform.tfvars.example +++ b/examples/port-2-aws-connection/terraform.tfvars.example @@ -24,7 +24,6 @@ additional_info = [ aws_gateway_name = "aws_gateway" aws_gateway_asn = 64518 aws_vif_name = "port2aws" -aws_vif_vlan = "320" aws_vif_address_family = "ipv4" aws_vif_bgp_asn = 64999 aws_vif_amazon_address = "169.254.0.1/30" diff --git a/examples/port-2-aws-connection/variables.tf b/examples/port-2-aws-connection/variables.tf index 1da2dda3..a73cfd94 100644 --- a/examples/port-2-aws-connection/variables.tf +++ b/examples/port-2-aws-connection/variables.tf @@ -78,10 +78,6 @@ variable "aws_vif_name" { description = "The name for the virtual interface" type = string } -variable "aws_vif_vlan" { - description = " The VLAN ID" - type = string -} variable "aws_vif_address_family" { description = "The address family for the BGP peer. ipv4 or ipv6" type = string diff --git a/examples/port-2-ibm2-connection/main.tf b/examples/port-2-ibm2-connection/main.tf index 96b0de93..e863c1ba 100644 --- a/examples/port-2-ibm2-connection/main.tf +++ b/examples/port-2-ibm2-connection/main.tf @@ -25,5 +25,5 @@ module "create_port_2_ibm2_connection" { zside_location = var.zside_location zside_seller_region = var.zside_seller_region zside_sp_name = var.zside_sp_name - primary_additional_info = var.additional_info + additional_info = var.additional_info } diff --git a/examples/service-token-metal-2-fabric-aws-connection/main.tf b/examples/service-token-metal-2-fabric-aws-connection/main.tf index 6203bc36..385ca150 100644 --- a/examples/service-token-metal-2-fabric-aws-connection/main.tf +++ b/examples/service-token-metal-2-fabric-aws-connection/main.tf @@ -73,40 +73,33 @@ module "metal-2-fabric-connection" { zside_seller_region = var.zside_seller_region zside_sp_name = var.zside_sp_name } -data "aws_dx_connection" "connection_id" { +data "aws_dx_connection" "aws_connection" { depends_on = [ module.metal-2-fabric-connection ] name = var.connection_name } -resource "aws_vpc" "example" { +resource "aws_dx_gateway" "aws_gateway" { depends_on = [ module.metal-2-fabric-connection ] - cidr_block = var.aws_vpc_cidr_block + name = var.aws_gateway_name + amazon_side_asn = var.aws_gateway_asn } -resource "aws_vpn_gateway" "example" { - depends_on = [ - module.metal-2-fabric-connection - ] - vpc_id = aws_vpc.example.id -} - -resource "aws_dx_private_virtual_interface" "example" { +resource "aws_dx_private_virtual_interface" "aws_virtual_interface" { depends_on = [ module.metal-2-fabric-connection, - aws_vpn_gateway.example, - aws_vpc.example + aws_dx_gateway.aws_gateway, ] - connection_id = data.aws_dx_connection.connection_id.id + connection_id = data.aws_dx_connection.aws_connection.id name = var.aws_vif_name - vlan = var.aws_vif_vlan + vlan = data.aws_dx_connection.aws_connection.vlan_id address_family = var.aws_vif_address_family bgp_asn = var.aws_vif_bgp_asn amazon_address = var.aws_vif_amazon_address customer_address = var.aws_vif_customer_address bgp_auth_key = var.aws_vif_bgp_auth_key - vpn_gateway_id = aws_vpn_gateway.example.id + dx_gateway_id = aws_dx_gateway.aws_gateway.id } diff --git a/examples/service-token-metal-2-fabric-aws-connection/outputs.tf b/examples/service-token-metal-2-fabric-aws-connection/outputs.tf index 4dbe77ad..ecbc790c 100644 --- a/examples/service-token-metal-2-fabric-aws-connection/outputs.tf +++ b/examples/service-token-metal-2-fabric-aws-connection/outputs.tf @@ -4,12 +4,9 @@ output "metal-connection" { output "fabric-connection" { value = module.metal-2-fabric-connection.primary_connection_id } -output "aws_vpc_id" { - value = aws_vpc.example.id -} -output "aws_vpn_gateway_id" { - value = aws_vpn_gateway.example.id +output "aws_dx_gateway_id" { + value = aws_dx_gateway.aws_gateway.id } output "aws_interface_id" { - value = aws_dx_private_virtual_interface.example.id + value = aws_dx_private_virtual_interface.aws_virtual_interface.id } diff --git a/examples/service-token-metal-2-fabric-aws-connection/terraform.tfvars.example b/examples/service-token-metal-2-fabric-aws-connection/terraform.tfvars.example index c5d6ed0d..58a0844d 100644 --- a/examples/service-token-metal-2-fabric-aws-connection/terraform.tfvars.example +++ b/examples/service-token-metal-2-fabric-aws-connection/terraform.tfvars.example @@ -25,9 +25,9 @@ additional_info = [ { key = "secretKey", value = "" } ] -aws_vpc_cidr_block = "10.255.255.0/28" +aws_gateway_name = "aws_gateway" +aws_gateway_asn = 64518 aws_vif_name = "port2aws" -aws_vif_vlan = "320" aws_vif_address_family = "ipv4" aws_vif_bgp_asn = 64999 aws_vif_amazon_address = "169.254.0.1/30" diff --git a/examples/service-token-metal-2-fabric-aws-connection/variables.tf b/examples/service-token-metal-2-fabric-aws-connection/variables.tf index 93a9ed0d..c4caf31d 100644 --- a/examples/service-token-metal-2-fabric-aws-connection/variables.tf +++ b/examples/service-token-metal-2-fabric-aws-connection/variables.tf @@ -90,18 +90,18 @@ variable "additional_info" { type = list(object({ key = string, value = string })) default = [] } -variable "aws_vpc_cidr_block" { - description = "The IPv4 CIDR block for the VPC" +variable "aws_gateway_name" { + description = "The name of the Gateway" type = string } +variable "aws_gateway_asn" { + description = "The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294" + type = number +} variable "aws_vif_name" { description = "The name for the virtual interface" type = string } -variable "aws_vif_vlan" { - description = " The VLAN ID" - type = string -} variable "aws_vif_address_family" { description = "The address family for the BGP peer. ipv4 or ipv6" type = string