IBM Cloud Docs
Changing your configuration

Changing your configuration

Changing your configuration in the UI

To change your transit gateway configuration in the UI, follow these steps:

  1. From your browser, open the IBM Cloud console and log in to your account.

  2. Select the Navigation Menu icon Navigation Menu icon from the upper left, then click Infrastructure > Network > Transit Gateway.

  3. Click the name of the transit gateway that you want to edit.

    If you are in the expanded view, click View details.

  4. From the Connections page, click Actions in the upper right, then select Edit.

    From here, you can change the gateway's name and its routing type (Local or Global).

    Changes to routing type can take several minutes to apply, depending on the number of existing connections.

    Important routing type considerations:

    • To switch to a different routing type, you must delete any connections that aren't local to the transit gateway’s location.
    • When you change from Local to Global routing for a specific transit gateway, you are charged for all associated connection traffic.
    • The transit gateway must have fewer than 30 connections to change the routing type.

Changing your configuration from the CLI

To update properties on an existing gateway from the CLI, run the following command:

ibmcloud tg gateway-update|gwu GATEWAY_ID [--name NAME] [--routing ROUTING] [--output json] [-h, --help]

Where:

  • GATEWAY_ID: ID of the gateway you want to update.

  • --name: Optional: New name of the gateway.

  • --routing: Optional: Gateway routing of resources (global | local). Select global to connect resources across regions. Changing routing from global to local requires all existing connections to be local.

  • --output JSON: Optional: Specify whether you want the output that is displayed in JSON format.

  • --help | -h: Optional: Get help on this command.

Example

This example illustrates updating a gateway with a routing value of global:

ibmcloud tg gwu $gateway --routing global

Changing your configuration with the API

You can update your transit gateway's name, global parameters, or both with the API.

Example Request

This example illustrates changing your configuration with the API:

PATCH /transit_gateways/{id}
"{base_url}/transit_gateways/{id}?version={version}"
{
  "global": true,
  "name": "my-transit-gateway"
}

Example Response

This response indicates that the transit gateway was updated successfully:

{
  "created_at": "2020-03-31T12:08:05Z",
  "crn": "crn:[...]",
  "global": false,
  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
  "location": "us-south",
  "name": "example-gateway-new-name",
  "resource_group": {
    "id": "56969d6043e9465c883cb9f7363e78e8"
  },
  "status": "available",
  "updated_at": "2020-03-31T12:08:05Z"
}

For more information, see Updates specified Transit Gateway in the Transit Gateway API reference.

Changing your configuration by using the Terraform

You can specify the following argument references for your resource when you change the configuration of your transit gateway by using Terraform:

Terraform argument references for changing the configuration
Argument Details
name
Required
boolean
The unique user-defined name for the gateway. For example, myGateway
global
Required
boolean
The gateways with global routing (true) to connect to the networks outside their associated region.

Example

This example illustrates changing the configuration of your transit gateway:

resource "ibm_tg_gateway" "new_tg_gw"{
name="transit-gateway-1"
location="us-south"
global=true
resource_group="30951d2dff914dafb26455a88c0c0092"
}