1. Packages
  2. Ibm Provider
  3. API Docs
  4. getTgLocation
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getTgLocation

Explore with Pulumi AI

Retreive information of an existing IBM Cloud infrastructure transit location as a read only data source. For more information, about transit location, see about IBM Cloud Transit Gateway.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const dsTgLocation = ibm.getTgLocation({
    name: "us-south",
});
Copy
import pulumi
import pulumi_ibm as ibm

ds_tg_location = ibm.get_tg_location(name="us-south")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.GetTgLocation(ctx, &ibm.GetTgLocationArgs{
			Name: "us-south",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var dsTgLocation = Ibm.GetTgLocation.Invoke(new()
    {
        Name = "us-south",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetTgLocationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var dsTgLocation = IbmFunctions.getTgLocation(GetTgLocationArgs.builder()
            .name("us-south")
            .build());

    }
}
Copy
variables:
  dsTgLocation:
    fn::invoke:
      function: ibm:getTgLocation
      arguments:
        name: us-south
Copy

Using getTgLocation

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTgLocation(args: GetTgLocationArgs, opts?: InvokeOptions): Promise<GetTgLocationResult>
function getTgLocationOutput(args: GetTgLocationOutputArgs, opts?: InvokeOptions): Output<GetTgLocationResult>
Copy
def get_tg_location(id: Optional[str] = None,
                    name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetTgLocationResult
def get_tg_location_output(id: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetTgLocationResult]
Copy
func GetTgLocation(ctx *Context, args *GetTgLocationArgs, opts ...InvokeOption) (*GetTgLocationResult, error)
func GetTgLocationOutput(ctx *Context, args *GetTgLocationOutputArgs, opts ...InvokeOption) GetTgLocationResultOutput
Copy

> Note: This function is named GetTgLocation in the Go SDK.

public static class GetTgLocation 
{
    public static Task<GetTgLocationResult> InvokeAsync(GetTgLocationArgs args, InvokeOptions? opts = null)
    public static Output<GetTgLocationResult> Invoke(GetTgLocationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTgLocationResult> getTgLocation(GetTgLocationArgs args, InvokeOptions options)
public static Output<GetTgLocationResult> getTgLocation(GetTgLocationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getTgLocation:getTgLocation
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the transit gateway location.
Id string
Name This property is required. string
The name of the transit gateway location.
Id string
name This property is required. String
The name of the transit gateway location.
id String
name This property is required. string
The name of the transit gateway location.
id string
name This property is required. str
The name of the transit gateway location.
id str
name This property is required. String
The name of the transit gateway location.
id String

getTgLocation Result

The following output properties are available:

BillingLocation string
(String) The geographical location of the location, used for billing purposes.
Id string
LocalConnectionLocations List<GetTgLocationLocalConnectionLocation>
(String) The set of network locations that are considered local for the transit gateway location.
Name string
(String) The name of the location.
Type string
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
BillingLocation string
(String) The geographical location of the location, used for billing purposes.
Id string
LocalConnectionLocations []GetTgLocationLocalConnectionLocation
(String) The set of network locations that are considered local for the transit gateway location.
Name string
(String) The name of the location.
Type string
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
billingLocation String
(String) The geographical location of the location, used for billing purposes.
id String
localConnectionLocations List<GetTgLocationLocalConnectionLocation>
(String) The set of network locations that are considered local for the transit gateway location.
name String
(String) The name of the location.
type String
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
billingLocation string
(String) The geographical location of the location, used for billing purposes.
id string
localConnectionLocations GetTgLocationLocalConnectionLocation[]
(String) The set of network locations that are considered local for the transit gateway location.
name string
(String) The name of the location.
type string
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
billing_location str
(String) The geographical location of the location, used for billing purposes.
id str
local_connection_locations Sequence[GetTgLocationLocalConnectionLocation]
(String) The set of network locations that are considered local for the transit gateway location.
name str
(String) The name of the location.
type str
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
billingLocation String
(String) The geographical location of the location, used for billing purposes.
id String
localConnectionLocations List<Property Map>
(String) The set of network locations that are considered local for the transit gateway location.
name String
(String) The name of the location.
type String
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.

Supporting Types

GetTgLocationLocalConnectionLocation

DisplayName This property is required. string
(String) The descriptive display name for the location.
Name This property is required. string
The name of the transit gateway location.
Type This property is required. string
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
DisplayName This property is required. string
(String) The descriptive display name for the location.
Name This property is required. string
The name of the transit gateway location.
Type This property is required. string
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
displayName This property is required. String
(String) The descriptive display name for the location.
name This property is required. String
The name of the transit gateway location.
type This property is required. String
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
displayName This property is required. string
(String) The descriptive display name for the location.
name This property is required. string
The name of the transit gateway location.
type This property is required. string
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
display_name This property is required. str
(String) The descriptive display name for the location.
name This property is required. str
The name of the transit gateway location.
type This property is required. str
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
displayName This property is required. String
(String) The descriptive display name for the location.
name This property is required. String
The name of the transit gateway location.
type This property is required. String
(String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.