1. Packages
  2. Ibm Provider
  3. API Docs
  4. getTgLocation
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getTgLocation

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    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",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_tg_location = ibm.get_tg_location(name="us-south")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      dsTgLocation:
        fn::invoke:
          function: ibm:getTgLocation
          arguments:
            name: us-south
    

    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>
    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]
    func GetTgLocation(ctx *Context, args *GetTgLocationArgs, opts ...InvokeOption) (*GetTgLocationResult, error)
    func GetTgLocationOutput(ctx *Context, args *GetTgLocationOutputArgs, opts ...InvokeOption) GetTgLocationResultOutput

    > 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)
    }
    public static CompletableFuture<GetTgLocationResult> getTgLocation(GetTgLocationArgs args, InvokeOptions options)
    public static Output<GetTgLocationResult> getTgLocation(GetTgLocationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getTgLocation:getTgLocation
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the transit gateway location.
    Id string
    Name string
    The name of the transit gateway location.
    Id string
    name String
    The name of the transit gateway location.
    id String
    name string
    The name of the transit gateway location.
    id string
    name str
    The name of the transit gateway location.
    id str
    name 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 string
    (String) The descriptive display name for the location.
    Name string
    The name of the transit gateway location.
    Type string
    (String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
    DisplayName string
    (String) The descriptive display name for the location.
    Name string
    The name of the transit gateway location.
    Type string
    (String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
    displayName String
    (String) The descriptive display name for the location.
    name String
    The name of the transit gateway location.
    type String
    (String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
    displayName string
    (String) The descriptive display name for the location.
    name string
    The name of the transit gateway location.
    type string
    (String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
    display_name str
    (String) The descriptive display name for the location.
    name str
    The name of the transit gateway location.
    type str
    (String) The type of the location, determining a multi-zone region, a single data center, or a point of presence.
    displayName String
    (String) The descriptive display name for the location.
    name String
    The name of the transit gateway location.
    type 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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud