IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
336 stars 645 forks source link

Transit Gateway: Adding new connection type Redundant GRE to the transite gateway #5433

Closed sushmitha1506 closed 1 week ago

sushmitha1506 commented 1 week ago

Description of the Enhancement:

To build in redundancy and eliminate the need to schedule an outage when a TGR needs to goes down for maintenance, there will be a new connection type named Redundant GRE which is essentially a grouping of at least 2 Unbound GRE Tunnels. This will allow GRE Tunnels to be placed onto different devices in the same zone and not flag overlapping routes that are in the Redundant GRE tunnels.

Tunnels under Redundant GREs are Unbound GRE Tunnels that can connect to classic or VPC networks. For this document, Unbound GRE Tunnels under a Redundant GRE will be referred to as a Redundant GRE tunnel to make the distinction from stand-alone Unbound GRE Tunnels.

Below are the resources modified

ibm_tg_connection. -> resource Block ibm_tg_gateway. ->data Block

resource "ibm_tg_connection" "test_ibm_tg_rgre_connection" {
  gateway      = ibm_tg_gateway.test_tg_gateway.id
  name = redundant_ugre_vpc
  network_type = redundant_gre
  base_network_type = vpc
  network_id = ibm_is_vpc.test_tg_vpc.resource_crn
  tunnels {
           local_gateway_ip = "192.129.200.1"
           local_tunnel_ip = "192.158.239.2"
           name =  "tunne1_testtgw1461"
           remote_gateway_ip = "10.186.203.4"
           remote_tunnel_ip = "192.158.239.1"
           zone =  "us-south-1"
        }    
 tunnels {
             local_gateway_ip = "192.129.220.1"
             local_tunnel_ip = "192.158.249.2"
             name =  "tunne2_testtgw1462"
             remote_gateway_ip = "10.186.203.4"
             remote_tunnel_ip = "192.158.249.1"
             zone =  "us-south-1"
         }  
}

Below are the resources newly added resource block

ibm_tg_connection_rgre_tunnel


resource "ibm_tg_connection_rgre_tunnel" "test_ibm_tg_connection_tunnel" {
  gateway = ibm_tg_gateway.test_tg_gateway.id
  connection_id = ibm_tg_connection.test_ibm_tg_connection.connection_id
  local_gateway_ip = "192.139.200.1"
  local_tunnel_ip = "192.178.239.2"
  name =  "tunnel_name"
  remote_gateway_ip = "10.186.203.4"
  remote_tunnel_ip = "192.178.239.1"
  zone =  "us-south-3"
} 
 #### Test case Result

{"errors":[{"code":"not_found","message":"The gateway was not found.","more_info":"https://test.cloud.ibm.com/apidocs/transit-gateway#error-handling"}],"trace":"eeb89641-37fb-4d88-9da0-6a525ba30ce1"}
2024-06-18T15:01:58.044+0530 [DEBUG] sdk.helper_resource: Stopping providers: test_terraform_path=/usr/local/bin/terraform test_working_directory=/var/folders/qt/zrgz9jc132q0d5r68g_y_tp80000gn/T/plugintest689995927 test_step_number=1 test_name=TestAccIBMTransitGatewayConnectionTunnel_basic
2024-06-18T15:01:58.046+0530 [DEBUG] sdk.helper_resource: Finished TestCase: test_name=TestAccIBMTransitGatewayConnectionTunnel_basic
--- PASS: TestAccIBMTransitGatewayConnectionTunnel_basic (296.58s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/transitgateway  299.529s

[Uploading Test-Result.pdf…]()

[Uploading Test-Result.pdf…]()