1. Packages
  2. Confluent Cloud
  3. API Docs
  4. getTransitGatewayAttachment
Confluent v1.47.0 published on Wednesday, Jun 12, 2024 by Pulumi

confluentcloud.getTransitGatewayAttachment

Explore with Pulumi AI

confluentcloud logo
Confluent v1.47.0 published on Wednesday, Jun 12, 2024 by Pulumi

    General Availability

    confluentcloud.TransitGatewayAttachment describes a Transit Gateway Attachment data source.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as confluentcloud from "@pulumi/confluentcloud";
    
    export = async () => {
        const exampleUsingId = await confluentcloud.getTransitGatewayAttachment({
            id: "tgwa-abc123",
            environment: {
                id: "env-xyz456",
            },
        });
        const exampleUsingName = await confluentcloud.getTransitGatewayAttachment({
            displayName: "my_tgwa",
            environment: {
                id: "env-xyz456",
            },
        });
        return {
            exampleUsingId: exampleUsingId,
            exampleUsingName: exampleUsingName,
        };
    }
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    example_using_id = confluentcloud.get_transit_gateway_attachment(id="tgwa-abc123",
        environment=confluentcloud.GetTransitGatewayAttachmentEnvironmentArgs(
            id="env-xyz456",
        ))
    pulumi.export("exampleUsingId", example_using_id)
    example_using_name = confluentcloud.get_transit_gateway_attachment(display_name="my_tgwa",
        environment=confluentcloud.GetTransitGatewayAttachmentEnvironmentArgs(
            id="env-xyz456",
        ))
    pulumi.export("exampleUsingName", example_using_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-confluentcloud/sdk/go/confluentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleUsingId, err := confluentcloud.LookupTransitGatewayAttachment(ctx, &confluentcloud.LookupTransitGatewayAttachmentArgs{
    			Id: pulumi.StringRef("tgwa-abc123"),
    			Environment: confluentcloud.GetTransitGatewayAttachmentEnvironment{
    				Id: "env-xyz456",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("exampleUsingId", exampleUsingId)
    		exampleUsingName, err := confluentcloud.LookupTransitGatewayAttachment(ctx, &confluentcloud.LookupTransitGatewayAttachmentArgs{
    			DisplayName: pulumi.StringRef("my_tgwa"),
    			Environment: confluentcloud.GetTransitGatewayAttachmentEnvironment{
    				Id: "env-xyz456",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("exampleUsingName", exampleUsingName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ConfluentCloud = Pulumi.ConfluentCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleUsingId = ConfluentCloud.GetTransitGatewayAttachment.Invoke(new()
        {
            Id = "tgwa-abc123",
            Environment = new ConfluentCloud.Inputs.GetTransitGatewayAttachmentEnvironmentInputArgs
            {
                Id = "env-xyz456",
            },
        });
    
        var exampleUsingName = ConfluentCloud.GetTransitGatewayAttachment.Invoke(new()
        {
            DisplayName = "my_tgwa",
            Environment = new ConfluentCloud.Inputs.GetTransitGatewayAttachmentEnvironmentInputArgs
            {
                Id = "env-xyz456",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["exampleUsingId"] = exampleUsingId,
            ["exampleUsingName"] = exampleUsingName,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluentcloud.ConfluentcloudFunctions;
    import com.pulumi.confluentcloud.inputs.GetTransitGatewayAttachmentArgs;
    import com.pulumi.confluentcloud.inputs.GetTransitGatewayAttachmentEnvironmentArgs;
    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 exampleUsingId = ConfluentcloudFunctions.getTransitGatewayAttachment(GetTransitGatewayAttachmentArgs.builder()
                .id("tgwa-abc123")
                .environment(GetTransitGatewayAttachmentEnvironmentArgs.builder()
                    .id("env-xyz456")
                    .build())
                .build());
    
            ctx.export("exampleUsingId", exampleUsingId.applyValue(getTransitGatewayAttachmentResult -> getTransitGatewayAttachmentResult));
            final var exampleUsingName = ConfluentcloudFunctions.getTransitGatewayAttachment(GetTransitGatewayAttachmentArgs.builder()
                .displayName("my_tgwa")
                .environment(GetTransitGatewayAttachmentEnvironmentArgs.builder()
                    .id("env-xyz456")
                    .build())
                .build());
    
            ctx.export("exampleUsingName", exampleUsingName.applyValue(getTransitGatewayAttachmentResult -> getTransitGatewayAttachmentResult));
        }
    }
    
    variables:
      exampleUsingId:
        fn::invoke:
          Function: confluentcloud:getTransitGatewayAttachment
          Arguments:
            id: tgwa-abc123
            environment:
              id: env-xyz456
      exampleUsingName:
        fn::invoke:
          Function: confluentcloud:getTransitGatewayAttachment
          Arguments:
            displayName: my_tgwa
            environment:
              id: env-xyz456
    outputs:
      exampleUsingId: ${exampleUsingId}
      exampleUsingName: ${exampleUsingName}
    

    Using getTransitGatewayAttachment

    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 getTransitGatewayAttachment(args: GetTransitGatewayAttachmentArgs, opts?: InvokeOptions): Promise<GetTransitGatewayAttachmentResult>
    function getTransitGatewayAttachmentOutput(args: GetTransitGatewayAttachmentOutputArgs, opts?: InvokeOptions): Output<GetTransitGatewayAttachmentResult>
    def get_transit_gateway_attachment(display_name: Optional[str] = None,
                                       environment: Optional[GetTransitGatewayAttachmentEnvironment] = None,
                                       id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetTransitGatewayAttachmentResult
    def get_transit_gateway_attachment_output(display_name: Optional[pulumi.Input[str]] = None,
                                       environment: Optional[pulumi.Input[GetTransitGatewayAttachmentEnvironmentArgs]] = None,
                                       id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetTransitGatewayAttachmentResult]
    func LookupTransitGatewayAttachment(ctx *Context, args *LookupTransitGatewayAttachmentArgs, opts ...InvokeOption) (*LookupTransitGatewayAttachmentResult, error)
    func LookupTransitGatewayAttachmentOutput(ctx *Context, args *LookupTransitGatewayAttachmentOutputArgs, opts ...InvokeOption) LookupTransitGatewayAttachmentResultOutput

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

    public static class GetTransitGatewayAttachment 
    {
        public static Task<GetTransitGatewayAttachmentResult> InvokeAsync(GetTransitGatewayAttachmentArgs args, InvokeOptions? opts = null)
        public static Output<GetTransitGatewayAttachmentResult> Invoke(GetTransitGatewayAttachmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTransitGatewayAttachmentResult> getTransitGatewayAttachment(GetTransitGatewayAttachmentArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: confluentcloud:index/getTransitGatewayAttachment:getTransitGatewayAttachment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Environment Pulumi.ConfluentCloud.Inputs.GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    DisplayName string
    A human-readable name for the Transit Gateway Attachment.
    Id string
    The ID of the Peering, for example, tgwa-abc123.
    Environment GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    DisplayName string
    A human-readable name for the Transit Gateway Attachment.
    Id string
    The ID of the Peering, for example, tgwa-abc123.
    environment GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    displayName String
    A human-readable name for the Transit Gateway Attachment.
    id String
    The ID of the Peering, for example, tgwa-abc123.
    environment GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    displayName string
    A human-readable name for the Transit Gateway Attachment.
    id string
    The ID of the Peering, for example, tgwa-abc123.
    environment GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    display_name str
    A human-readable name for the Transit Gateway Attachment.
    id str
    The ID of the Peering, for example, tgwa-abc123.
    environment Property Map
    (Required Configuration Block) supports the following:
    displayName String
    A human-readable name for the Transit Gateway Attachment.
    id String
    The ID of the Peering, for example, tgwa-abc123.

    getTransitGatewayAttachment Result

    The following output properties are available:

    Aws List<Pulumi.ConfluentCloud.Outputs.GetTransitGatewayAttachmentAw>
    (Required Configuration Block) The AWS-specific Transit Gateway Attachment details. It supports the following:
    DisplayName string
    (Required String) The name of the Transit Gateway Attachment.
    Environment Pulumi.ConfluentCloud.Outputs.GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    Id string
    (Required String) The ID of the Network that the Transit Gateway Attachment belongs to, for example, n-abc123.
    Networks List<Pulumi.ConfluentCloud.Outputs.GetTransitGatewayAttachmentNetwork>
    (Required Configuration Block) supports the following:
    Aws []GetTransitGatewayAttachmentAw
    (Required Configuration Block) The AWS-specific Transit Gateway Attachment details. It supports the following:
    DisplayName string
    (Required String) The name of the Transit Gateway Attachment.
    Environment GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    Id string
    (Required String) The ID of the Network that the Transit Gateway Attachment belongs to, for example, n-abc123.
    Networks []GetTransitGatewayAttachmentNetwork
    (Required Configuration Block) supports the following:
    aws List<GetTransitGatewayAttachmentAw>
    (Required Configuration Block) The AWS-specific Transit Gateway Attachment details. It supports the following:
    displayName String
    (Required String) The name of the Transit Gateway Attachment.
    environment GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    id String
    (Required String) The ID of the Network that the Transit Gateway Attachment belongs to, for example, n-abc123.
    networks List<GetTransitGatewayAttachmentNetwork>
    (Required Configuration Block) supports the following:
    aws GetTransitGatewayAttachmentAw[]
    (Required Configuration Block) The AWS-specific Transit Gateway Attachment details. It supports the following:
    displayName string
    (Required String) The name of the Transit Gateway Attachment.
    environment GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    id string
    (Required String) The ID of the Network that the Transit Gateway Attachment belongs to, for example, n-abc123.
    networks GetTransitGatewayAttachmentNetwork[]
    (Required Configuration Block) supports the following:
    aws Sequence[GetTransitGatewayAttachmentAw]
    (Required Configuration Block) The AWS-specific Transit Gateway Attachment details. It supports the following:
    display_name str
    (Required String) The name of the Transit Gateway Attachment.
    environment GetTransitGatewayAttachmentEnvironment
    (Required Configuration Block) supports the following:
    id str
    (Required String) The ID of the Network that the Transit Gateway Attachment belongs to, for example, n-abc123.
    networks Sequence[GetTransitGatewayAttachmentNetwork]
    (Required Configuration Block) supports the following:
    aws List<Property Map>
    (Required Configuration Block) The AWS-specific Transit Gateway Attachment details. It supports the following:
    displayName String
    (Required String) The name of the Transit Gateway Attachment.
    environment Property Map
    (Required Configuration Block) supports the following:
    id String
    (Required String) The ID of the Network that the Transit Gateway Attachment belongs to, for example, n-abc123.
    networks List<Property Map>
    (Required Configuration Block) supports the following:

    Supporting Types

    GetTransitGatewayAttachmentAw

    RamResourceShareArn string
    (Required String) The Amazon Resource Name (ARN) of the Resource Access Manager (RAM) Resource Share of the transit gateway your Confluent Cloud network attaches to.
    Routes List<string>
    (Required List of String) List of destination routes for traffic from Confluent VPC to customer VPC via Transit Gateway.
    TransitGatewayAttachmentId string
    (Required String) The ID of the AWS Transit Gateway VPC Attachment that attaches Confluent VPC to Transit Gateway.
    TransitGatewayId string
    (Required String) The ID of the AWS Transit Gateway that you want Confluent CLoud to be attached to. Must start with tgw-.
    RamResourceShareArn string
    (Required String) The Amazon Resource Name (ARN) of the Resource Access Manager (RAM) Resource Share of the transit gateway your Confluent Cloud network attaches to.
    Routes []string
    (Required List of String) List of destination routes for traffic from Confluent VPC to customer VPC via Transit Gateway.
    TransitGatewayAttachmentId string
    (Required String) The ID of the AWS Transit Gateway VPC Attachment that attaches Confluent VPC to Transit Gateway.
    TransitGatewayId string
    (Required String) The ID of the AWS Transit Gateway that you want Confluent CLoud to be attached to. Must start with tgw-.
    ramResourceShareArn String
    (Required String) The Amazon Resource Name (ARN) of the Resource Access Manager (RAM) Resource Share of the transit gateway your Confluent Cloud network attaches to.
    routes List<String>
    (Required List of String) List of destination routes for traffic from Confluent VPC to customer VPC via Transit Gateway.
    transitGatewayAttachmentId String
    (Required String) The ID of the AWS Transit Gateway VPC Attachment that attaches Confluent VPC to Transit Gateway.
    transitGatewayId String
    (Required String) The ID of the AWS Transit Gateway that you want Confluent CLoud to be attached to. Must start with tgw-.
    ramResourceShareArn string
    (Required String) The Amazon Resource Name (ARN) of the Resource Access Manager (RAM) Resource Share of the transit gateway your Confluent Cloud network attaches to.
    routes string[]
    (Required List of String) List of destination routes for traffic from Confluent VPC to customer VPC via Transit Gateway.
    transitGatewayAttachmentId string
    (Required String) The ID of the AWS Transit Gateway VPC Attachment that attaches Confluent VPC to Transit Gateway.
    transitGatewayId string
    (Required String) The ID of the AWS Transit Gateway that you want Confluent CLoud to be attached to. Must start with tgw-.
    ram_resource_share_arn str
    (Required String) The Amazon Resource Name (ARN) of the Resource Access Manager (RAM) Resource Share of the transit gateway your Confluent Cloud network attaches to.
    routes Sequence[str]
    (Required List of String) List of destination routes for traffic from Confluent VPC to customer VPC via Transit Gateway.
    transit_gateway_attachment_id str
    (Required String) The ID of the AWS Transit Gateway VPC Attachment that attaches Confluent VPC to Transit Gateway.
    transit_gateway_id str
    (Required String) The ID of the AWS Transit Gateway that you want Confluent CLoud to be attached to. Must start with tgw-.
    ramResourceShareArn String
    (Required String) The Amazon Resource Name (ARN) of the Resource Access Manager (RAM) Resource Share of the transit gateway your Confluent Cloud network attaches to.
    routes List<String>
    (Required List of String) List of destination routes for traffic from Confluent VPC to customer VPC via Transit Gateway.
    transitGatewayAttachmentId String
    (Required String) The ID of the AWS Transit Gateway VPC Attachment that attaches Confluent VPC to Transit Gateway.
    transitGatewayId String
    (Required String) The ID of the AWS Transit Gateway that you want Confluent CLoud to be attached to. Must start with tgw-.

    GetTransitGatewayAttachmentEnvironment

    Id string

    The ID of the Environment that the Transit Gateway Attachment belongs to, for example, env-xyz456.

    Note: Exactly one from the id and display_name attributes must be specified.

    Id string

    The ID of the Environment that the Transit Gateway Attachment belongs to, for example, env-xyz456.

    Note: Exactly one from the id and display_name attributes must be specified.

    id String

    The ID of the Environment that the Transit Gateway Attachment belongs to, for example, env-xyz456.

    Note: Exactly one from the id and display_name attributes must be specified.

    id string

    The ID of the Environment that the Transit Gateway Attachment belongs to, for example, env-xyz456.

    Note: Exactly one from the id and display_name attributes must be specified.

    id str

    The ID of the Environment that the Transit Gateway Attachment belongs to, for example, env-xyz456.

    Note: Exactly one from the id and display_name attributes must be specified.

    id String

    The ID of the Environment that the Transit Gateway Attachment belongs to, for example, env-xyz456.

    Note: Exactly one from the id and display_name attributes must be specified.

    GetTransitGatewayAttachmentNetwork

    Id string
    The ID of the Peering, for example, tgwa-abc123.
    Id string
    The ID of the Peering, for example, tgwa-abc123.
    id String
    The ID of the Peering, for example, tgwa-abc123.
    id string
    The ID of the Peering, for example, tgwa-abc123.
    id str
    The ID of the Peering, for example, tgwa-abc123.
    id String
    The ID of the Peering, for example, tgwa-abc123.

    Package Details

    Repository
    Confluent Cloud pulumi/pulumi-confluentcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the confluent Terraform Provider.
    confluentcloud logo
    Confluent v1.47.0 published on Wednesday, Jun 12, 2024 by Pulumi