ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getTgLocations
Explore with Pulumi AI
Retrieves information of an existing IBM Cloud infrastructure transit location as a read only data source. For more information, about transit location, see IBM Cloud Transit Gateway locations.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const dsTgLocations = ibm.getTgLocations({});
import pulumi
import pulumi_ibm as ibm
ds_tg_locations = ibm.get_tg_locations()
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.GetTgLocations(ctx, &ibm.GetTgLocationsArgs{}, 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 dsTgLocations = Ibm.GetTgLocations.Invoke();
});
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.GetTgLocationsArgs;
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 dsTgLocations = IbmFunctions.getTgLocations();
}
}
variables:
dsTgLocations:
fn::invoke:
function: ibm:getTgLocations
arguments: {}
Using getTgLocations
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 getTgLocations(args: GetTgLocationsArgs, opts?: InvokeOptions): Promise<GetTgLocationsResult>
function getTgLocationsOutput(args: GetTgLocationsOutputArgs, opts?: InvokeOptions): Output<GetTgLocationsResult>
def get_tg_locations(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTgLocationsResult
def get_tg_locations_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTgLocationsResult]
func GetTgLocations(ctx *Context, args *GetTgLocationsArgs, opts ...InvokeOption) (*GetTgLocationsResult, error)
func GetTgLocationsOutput(ctx *Context, args *GetTgLocationsOutputArgs, opts ...InvokeOption) GetTgLocationsResultOutput
> Note: This function is named GetTgLocations
in the Go SDK.
public static class GetTgLocations
{
public static Task<GetTgLocationsResult> InvokeAsync(GetTgLocationsArgs args, InvokeOptions? opts = null)
public static Output<GetTgLocationsResult> Invoke(GetTgLocationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTgLocationsResult> getTgLocations(GetTgLocationsArgs args, InvokeOptions options)
public static Output<GetTgLocationsResult> getTgLocations(GetTgLocationsArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getTgLocations:getTgLocations
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- Id string
- id String
- id string
- id str
- id String
getTgLocations Result
The following output properties are available:
- Id string
- Locations
List<Get
Tg Locations Location> - (String) List of all locations that supports transit gateways.
- Id string
- Locations
[]Get
Tg Locations Location - (String) List of all locations that supports transit gateways.
- id String
- locations
List<Get
Tg Locations Location> - (String) List of all locations that supports transit gateways.
- id string
- locations
Get
Tg Locations Location[] - (String) List of all locations that supports transit gateways.
- id str
- locations
Sequence[Get
Tg Locations Location] - (String) List of all locations that supports transit gateways.
- id String
- locations List<Property Map>
- (String) List of all locations that supports transit gateways.
Supporting Types
GetTgLocationsLocation
- Billing
Location string - (String) The geographical location of the location, used for billing purposes.
- Name string
- (String) The name of the location.
- Type string
- (String) The type of the location, determining a
multi-zone region
, asingle data center
, or apoint of presence
.
- Billing
Location string - (String) The geographical location of the location, used for billing purposes.
- Name string
- (String) The name of the location.
- Type string
- (String) The type of the location, determining a
multi-zone region
, asingle data center
, or apoint of presence
.
- billing
Location String - (String) The geographical location of the location, used for billing purposes.
- name String
- (String) The name of the location.
- type String
- (String) The type of the location, determining a
multi-zone region
, asingle data center
, or apoint of presence
.
- billing
Location string - (String) The geographical location of the location, used for billing purposes.
- name string
- (String) The name of the location.
- type string
- (String) The type of the location, determining a
multi-zone region
, asingle data center
, or apoint of presence
.
- billing_
location str - (String) The geographical location of the location, used for billing purposes.
- name str
- (String) The name of the location.
- type str
- (String) The type of the location, determining a
multi-zone region
, asingle data center
, or apoint of presence
.
- billing
Location String - (String) The geographical location of the location, used for billing purposes.
- name String
- (String) The name of the location.
- type String
- (String) The type of the location, determining a
multi-zone region
, asingle data center
, or apoint of presence
.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.