Viewing docs for ibm 2.9.0
published on Thursday, Nov 5, 2026 by ibm-cloud
published on Thursday, Nov 5, 2026 by ibm-cloud
ibm
Viewing docs for ibm 2.9.0
published on Thursday, Nov 5, 2026 by ibm-cloud
published on Thursday, Nov 5, 2026 by ibm-cloud
Imports the information of an existing IBM Cloud infrastructure transit gateway as a read only data source. For more information, about transit gateways, see managing transit gateways.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
// List all gateways
const all = ibm.getTgGateways({});
// List only gateways in a specific redundancy group
const inRg = ibm.getTgGateways({
redundancyGroup: "my-redundancy-group",
});
import pulumi
import pulumi_ibm as ibm
# List all gateways
all = ibm.get_tg_gateways()
# List only gateways in a specific redundancy group
in_rg = ibm.get_tg_gateways(redundancy_group="my-redundancy-group")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// List all gateways
_, err := ibm.GetTgGateways(ctx, &ibm.GetTgGatewaysArgs{}, nil)
if err != nil {
return err
}
// List only gateways in a specific redundancy group
_, err = ibm.GetTgGateways(ctx, &ibm.GetTgGatewaysArgs{
RedundancyGroup: pulumi.StringRef("my-redundancy-group"),
}, 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(() =>
{
// List all gateways
var all = Ibm.GetTgGateways.Invoke();
// List only gateways in a specific redundancy group
var inRg = Ibm.GetTgGateways.Invoke(new()
{
RedundancyGroup = "my-redundancy-group",
});
});
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.GetTgGatewaysArgs;
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) {
// List all gateways
final var all = IbmFunctions.getTgGateways(GetTgGatewaysArgs.builder()
.build());
// List only gateways in a specific redundancy group
final var inRg = IbmFunctions.getTgGateways(GetTgGatewaysArgs.builder()
.redundancyGroup("my-redundancy-group")
.build());
}
}
variables:
# List all gateways
all:
fn::invoke:
function: ibm:getTgGateways
arguments: {}
# List only gateways in a specific redundancy group
inRg:
fn::invoke:
function: ibm:getTgGateways
arguments:
redundancyGroup: my-redundancy-group
Example coming soon!
Using getTgGateways
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 getTgGateways(args: GetTgGatewaysArgs, opts?: InvokeOptions): Promise<GetTgGatewaysResult>
function getTgGatewaysOutput(args: GetTgGatewaysOutputArgs, opts?: InvokeOutputOptions): Output<GetTgGatewaysResult>def get_tg_gateways(id: Optional[str] = None,
redundancy_group: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTgGatewaysResult
def get_tg_gateways_output(id: pulumi.Input[Optional[str]] = None,
redundancy_group: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetTgGatewaysResult]func GetTgGateways(ctx *Context, args *GetTgGatewaysArgs, opts ...InvokeOption) (*GetTgGatewaysResult, error)
func GetTgGatewaysOutput(ctx *Context, args *GetTgGatewaysOutputArgs, opts ...InvokeOption) GetTgGatewaysResultOutput> Note: This function is named GetTgGateways in the Go SDK.
public static class GetTgGateways
{
public static Task<GetTgGatewaysResult> InvokeAsync(GetTgGatewaysArgs args, InvokeOptions? opts = null)
public static Output<GetTgGatewaysResult> Invoke(GetTgGatewaysInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetTgGatewaysResult> Invoke(GetTgGatewaysInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetTgGatewaysResult> getTgGateways(GetTgGatewaysArgs args, InvokeOptions options)
public static Output<GetTgGatewaysResult> getTgGateways(GetTgGatewaysArgs args, InvokeOptions options)
public static Output<GetTgGatewaysResult> getTgGateways(GetTgGatewaysArgs args, InvokeOutputOptions options)
fn::invoke:
function: ibm:index/getTgGateways:getTgGateways
arguments:
# arguments dictionarydata "ibm_get_tg_gateways" "name" {
# arguments
}The following arguments are supported:
- Id string
- (String) The unique identifier of this gateway.
- Redundancy
Group string - Filter the results to only gateways belonging to this redundancy group name.
- Id string
- (String) The unique identifier of this gateway.
- Redundancy
Group string - Filter the results to only gateways belonging to this redundancy group name.
- id string
- (String) The unique identifier of this gateway.
- redundancy_
group string - Filter the results to only gateways belonging to this redundancy group name.
- id String
- (String) The unique identifier of this gateway.
- redundancy
Group String - Filter the results to only gateways belonging to this redundancy group name.
- id string
- (String) The unique identifier of this gateway.
- redundancy
Group string - Filter the results to only gateways belonging to this redundancy group name.
- id str
- (String) The unique identifier of this gateway.
- redundancy_
group str - Filter the results to only gateways belonging to this redundancy group name.
- id String
- (String) The unique identifier of this gateway.
- redundancy
Group String - Filter the results to only gateways belonging to this redundancy group name.
getTgGateways Result
The following output properties are available:
- Id string
- (String) The unique identifier of this gateway.
- Transit
Gateways List<GetTg Gateways Transit Gateway> - (List) List of all transit gateways.
- Redundancy
Group string - (String) The name of the redundancy group this gateway belongs to.
- Id string
- (String) The unique identifier of this gateway.
- Transit
Gateways []GetTg Gateways Transit Gateway - (List) List of all transit gateways.
- Redundancy
Group string - (String) The name of the redundancy group this gateway belongs to.
- id string
- (String) The unique identifier of this gateway.
- transit_
gateways list(object) - (List) List of all transit gateways.
- redundancy_
group string - (String) The name of the redundancy group this gateway belongs to.
- id String
- (String) The unique identifier of this gateway.
- transit
Gateways List<GetTg Gateways Transit Gateway> - (List) List of all transit gateways.
- redundancy
Group String - (String) The name of the redundancy group this gateway belongs to.
- id string
- (String) The unique identifier of this gateway.
- transit
Gateways GetTg Gateways Transit Gateway[] - (List) List of all transit gateways.
- redundancy
Group string - (String) The name of the redundancy group this gateway belongs to.
- id str
- (String) The unique identifier of this gateway.
- transit_
gateways Sequence[GetTg Gateways Transit Gateway] - (List) List of all transit gateways.
- redundancy_
group str - (String) The name of the redundancy group this gateway belongs to.
- id String
- (String) The unique identifier of this gateway.
- transit
Gateways List<Property Map> - (List) List of all transit gateways.
- redundancy
Group String - (String) The name of the redundancy group this gateway belongs to.
Supporting Types
GetTgGatewaysTransitGateway
- Connection
Count double - (Integer) The number of connections associated with this gateway.
- Connection
Needs boolAttention - (Bool) Indicates if this gateway has a connection that needs attention, such as a cross-account approval.
- Created
At string - (String) The date and time resource is created.
- Crn string
- (String) The CRN of the gateway.
- Global bool
- (Bool) The gateways with global routing true to connect to the networks outside the associated region.
- Gre
Enhanced boolRoute Propagation - (Bool) The gateways with GRE enhanced route propagation true to share routes across all GRE connections on the same gateway.
- Id string
- (String) The unique identifier of this gateway.
- Location string
- (String) The gateway location.
- Name string
- (String) The user-defined name for the transit gateway.
- Redundancy
Group string - Filter the results to only gateways belonging to this redundancy group name.
- Redundancy
Group stringId - (String) The unique identifier of the redundancy group this gateway belongs to.
- Resource
Group string - (String) The resource group identifier.
- Status string
- (String) The gateway status.
- Updated
At string - (String) The date and time resource is last updated.
- Connection
Count float64 - (Integer) The number of connections associated with this gateway.
- Connection
Needs boolAttention - (Bool) Indicates if this gateway has a connection that needs attention, such as a cross-account approval.
- Created
At string - (String) The date and time resource is created.
- Crn string
- (String) The CRN of the gateway.
- Global bool
- (Bool) The gateways with global routing true to connect to the networks outside the associated region.
- Gre
Enhanced boolRoute Propagation - (Bool) The gateways with GRE enhanced route propagation true to share routes across all GRE connections on the same gateway.
- Id string
- (String) The unique identifier of this gateway.
- Location string
- (String) The gateway location.
- Name string
- (String) The user-defined name for the transit gateway.
- Redundancy
Group string - Filter the results to only gateways belonging to this redundancy group name.
- Redundancy
Group stringId - (String) The unique identifier of the redundancy group this gateway belongs to.
- Resource
Group string - (String) The resource group identifier.
- Status string
- (String) The gateway status.
- Updated
At string - (String) The date and time resource is last updated.
- connection_
count number - (Integer) The number of connections associated with this gateway.
- connection_
needs_ boolattention - (Bool) Indicates if this gateway has a connection that needs attention, such as a cross-account approval.
- created_
at string - (String) The date and time resource is created.
- crn string
- (String) The CRN of the gateway.
- global bool
- (Bool) The gateways with global routing true to connect to the networks outside the associated region.
- gre_
enhanced_ boolroute_ propagation - (Bool) The gateways with GRE enhanced route propagation true to share routes across all GRE connections on the same gateway.
- id string
- (String) The unique identifier of this gateway.
- location string
- (String) The gateway location.
- name string
- (String) The user-defined name for the transit gateway.
- redundancy_
group string - Filter the results to only gateways belonging to this redundancy group name.
- redundancy_
group_ stringid - (String) The unique identifier of the redundancy group this gateway belongs to.
- resource_
group string - (String) The resource group identifier.
- status string
- (String) The gateway status.
- updated_
at string - (String) The date and time resource is last updated.
- connection
Count Double - (Integer) The number of connections associated with this gateway.
- connection
Needs BooleanAttention - (Bool) Indicates if this gateway has a connection that needs attention, such as a cross-account approval.
- created
At String - (String) The date and time resource is created.
- crn String
- (String) The CRN of the gateway.
- global Boolean
- (Bool) The gateways with global routing true to connect to the networks outside the associated region.
- gre
Enhanced BooleanRoute Propagation - (Bool) The gateways with GRE enhanced route propagation true to share routes across all GRE connections on the same gateway.
- id String
- (String) The unique identifier of this gateway.
- location String
- (String) The gateway location.
- name String
- (String) The user-defined name for the transit gateway.
- redundancy
Group String - Filter the results to only gateways belonging to this redundancy group name.
- redundancy
Group StringId - (String) The unique identifier of the redundancy group this gateway belongs to.
- resource
Group String - (String) The resource group identifier.
- status String
- (String) The gateway status.
- updated
At String - (String) The date and time resource is last updated.
- connection
Count number - (Integer) The number of connections associated with this gateway.
- connection
Needs booleanAttention - (Bool) Indicates if this gateway has a connection that needs attention, such as a cross-account approval.
- created
At string - (String) The date and time resource is created.
- crn string
- (String) The CRN of the gateway.
- global boolean
- (Bool) The gateways with global routing true to connect to the networks outside the associated region.
- gre
Enhanced booleanRoute Propagation - (Bool) The gateways with GRE enhanced route propagation true to share routes across all GRE connections on the same gateway.
- id string
- (String) The unique identifier of this gateway.
- location string
- (String) The gateway location.
- name string
- (String) The user-defined name for the transit gateway.
- redundancy
Group string - Filter the results to only gateways belonging to this redundancy group name.
- redundancy
Group stringId - (String) The unique identifier of the redundancy group this gateway belongs to.
- resource
Group string - (String) The resource group identifier.
- status string
- (String) The gateway status.
- updated
At string - (String) The date and time resource is last updated.
- connection_
count float - (Integer) The number of connections associated with this gateway.
- connection_
needs_ boolattention - (Bool) Indicates if this gateway has a connection that needs attention, such as a cross-account approval.
- created_
at str - (String) The date and time resource is created.
- crn str
- (String) The CRN of the gateway.
- global_ bool
- (Bool) The gateways with global routing true to connect to the networks outside the associated region.
- gre_
enhanced_ boolroute_ propagation - (Bool) The gateways with GRE enhanced route propagation true to share routes across all GRE connections on the same gateway.
- id str
- (String) The unique identifier of this gateway.
- location str
- (String) The gateway location.
- name str
- (String) The user-defined name for the transit gateway.
- redundancy_
group str - Filter the results to only gateways belonging to this redundancy group name.
- redundancy_
group_ strid - (String) The unique identifier of the redundancy group this gateway belongs to.
- resource_
group str - (String) The resource group identifier.
- status str
- (String) The gateway status.
- updated_
at str - (String) The date and time resource is last updated.
- connection
Count Number - (Integer) The number of connections associated with this gateway.
- connection
Needs BooleanAttention - (Bool) Indicates if this gateway has a connection that needs attention, such as a cross-account approval.
- created
At String - (String) The date and time resource is created.
- crn String
- (String) The CRN of the gateway.
- global Boolean
- (Bool) The gateways with global routing true to connect to the networks outside the associated region.
- gre
Enhanced BooleanRoute Propagation - (Bool) The gateways with GRE enhanced route propagation true to share routes across all GRE connections on the same gateway.
- id String
- (String) The unique identifier of this gateway.
- location String
- (String) The gateway location.
- name String
- (String) The user-defined name for the transit gateway.
- redundancy
Group String - Filter the results to only gateways belonging to this redundancy group name.
- redundancy
Group StringId - (String) The unique identifier of the redundancy group this gateway belongs to.
- resource
Group String - (String) The resource group identifier.
- status String
- (String) The gateway status.
- updated
At String - (String) The date and time resource is last updated.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibmTerraform Provider.
ibm
Viewing docs for ibm 2.9.0
published on Thursday, Nov 5, 2026 by ibm-cloud
published on Thursday, Nov 5, 2026 by ibm-cloud