1. Packages
  2. AWS
  3. API Docs
  4. networkmanager
  5. TransitGatewayConnectPeerAssociation
AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi

aws.networkmanager.TransitGatewayConnectPeerAssociation

Explore with Pulumi AI

aws logo
AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi

    Associates a transit gateway Connect peer with a device, and optionally, with a link. If you specify a link, it must be associated with the specified device.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.networkmanager.TransitGatewayConnectPeerAssociation("example", {
        globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id,
        deviceId: exampleAwsNetworkmanagerDevice.id,
        transitGatewayConnectPeerArn: exampleAwsEc2TransitGatewayConnectPeer.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkmanager.TransitGatewayConnectPeerAssociation("example",
        global_network_id=example_aws_networkmanager_global_network["id"],
        device_id=example_aws_networkmanager_device["id"],
        transit_gateway_connect_peer_arn=example_aws_ec2_transit_gateway_connect_peer["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkmanager.NewTransitGatewayConnectPeerAssociation(ctx, "example", &networkmanager.TransitGatewayConnectPeerAssociationArgs{
    			GlobalNetworkId:              pulumi.Any(exampleAwsNetworkmanagerGlobalNetwork.Id),
    			DeviceId:                     pulumi.Any(exampleAwsNetworkmanagerDevice.Id),
    			TransitGatewayConnectPeerArn: pulumi.Any(exampleAwsEc2TransitGatewayConnectPeer.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.NetworkManager.TransitGatewayConnectPeerAssociation("example", new()
        {
            GlobalNetworkId = exampleAwsNetworkmanagerGlobalNetwork.Id,
            DeviceId = exampleAwsNetworkmanagerDevice.Id,
            TransitGatewayConnectPeerArn = exampleAwsEc2TransitGatewayConnectPeer.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkmanager.TransitGatewayConnectPeerAssociation;
    import com.pulumi.aws.networkmanager.TransitGatewayConnectPeerAssociationArgs;
    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) {
            var example = new TransitGatewayConnectPeerAssociation("example", TransitGatewayConnectPeerAssociationArgs.builder()
                .globalNetworkId(exampleAwsNetworkmanagerGlobalNetwork.id())
                .deviceId(exampleAwsNetworkmanagerDevice.id())
                .transitGatewayConnectPeerArn(exampleAwsEc2TransitGatewayConnectPeer.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:networkmanager:TransitGatewayConnectPeerAssociation
        properties:
          globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
          deviceId: ${exampleAwsNetworkmanagerDevice.id}
          transitGatewayConnectPeerArn: ${exampleAwsEc2TransitGatewayConnectPeer.arn}
    

    Create TransitGatewayConnectPeerAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TransitGatewayConnectPeerAssociation(name: string, args: TransitGatewayConnectPeerAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def TransitGatewayConnectPeerAssociation(resource_name: str,
                                             args: TransitGatewayConnectPeerAssociationArgs,
                                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def TransitGatewayConnectPeerAssociation(resource_name: str,
                                             opts: Optional[ResourceOptions] = None,
                                             device_id: Optional[str] = None,
                                             global_network_id: Optional[str] = None,
                                             transit_gateway_connect_peer_arn: Optional[str] = None,
                                             link_id: Optional[str] = None)
    func NewTransitGatewayConnectPeerAssociation(ctx *Context, name string, args TransitGatewayConnectPeerAssociationArgs, opts ...ResourceOption) (*TransitGatewayConnectPeerAssociation, error)
    public TransitGatewayConnectPeerAssociation(string name, TransitGatewayConnectPeerAssociationArgs args, CustomResourceOptions? opts = null)
    public TransitGatewayConnectPeerAssociation(String name, TransitGatewayConnectPeerAssociationArgs args)
    public TransitGatewayConnectPeerAssociation(String name, TransitGatewayConnectPeerAssociationArgs args, CustomResourceOptions options)
    
    type: aws:networkmanager:TransitGatewayConnectPeerAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TransitGatewayConnectPeerAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TransitGatewayConnectPeerAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TransitGatewayConnectPeerAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TransitGatewayConnectPeerAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TransitGatewayConnectPeerAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var transitGatewayConnectPeerAssociationResource = new Aws.NetworkManager.TransitGatewayConnectPeerAssociation("transitGatewayConnectPeerAssociationResource", new()
    {
        DeviceId = "string",
        GlobalNetworkId = "string",
        TransitGatewayConnectPeerArn = "string",
        LinkId = "string",
    });
    
    example, err := networkmanager.NewTransitGatewayConnectPeerAssociation(ctx, "transitGatewayConnectPeerAssociationResource", &networkmanager.TransitGatewayConnectPeerAssociationArgs{
    	DeviceId:                     pulumi.String("string"),
    	GlobalNetworkId:              pulumi.String("string"),
    	TransitGatewayConnectPeerArn: pulumi.String("string"),
    	LinkId:                       pulumi.String("string"),
    })
    
    var transitGatewayConnectPeerAssociationResource = new TransitGatewayConnectPeerAssociation("transitGatewayConnectPeerAssociationResource", TransitGatewayConnectPeerAssociationArgs.builder()
        .deviceId("string")
        .globalNetworkId("string")
        .transitGatewayConnectPeerArn("string")
        .linkId("string")
        .build());
    
    transit_gateway_connect_peer_association_resource = aws.networkmanager.TransitGatewayConnectPeerAssociation("transitGatewayConnectPeerAssociationResource",
        device_id="string",
        global_network_id="string",
        transit_gateway_connect_peer_arn="string",
        link_id="string")
    
    const transitGatewayConnectPeerAssociationResource = new aws.networkmanager.TransitGatewayConnectPeerAssociation("transitGatewayConnectPeerAssociationResource", {
        deviceId: "string",
        globalNetworkId: "string",
        transitGatewayConnectPeerArn: "string",
        linkId: "string",
    });
    
    type: aws:networkmanager:TransitGatewayConnectPeerAssociation
    properties:
        deviceId: string
        globalNetworkId: string
        linkId: string
        transitGatewayConnectPeerArn: string
    

    TransitGatewayConnectPeerAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The TransitGatewayConnectPeerAssociation resource accepts the following input properties:

    DeviceId string
    The ID of the device.
    GlobalNetworkId string
    The ID of the global network.
    TransitGatewayConnectPeerArn string
    The Amazon Resource Name (ARN) of the Connect peer.
    LinkId string
    The ID of the link.
    DeviceId string
    The ID of the device.
    GlobalNetworkId string
    The ID of the global network.
    TransitGatewayConnectPeerArn string
    The Amazon Resource Name (ARN) of the Connect peer.
    LinkId string
    The ID of the link.
    deviceId String
    The ID of the device.
    globalNetworkId String
    The ID of the global network.
    transitGatewayConnectPeerArn String
    The Amazon Resource Name (ARN) of the Connect peer.
    linkId String
    The ID of the link.
    deviceId string
    The ID of the device.
    globalNetworkId string
    The ID of the global network.
    transitGatewayConnectPeerArn string
    The Amazon Resource Name (ARN) of the Connect peer.
    linkId string
    The ID of the link.
    device_id str
    The ID of the device.
    global_network_id str
    The ID of the global network.
    transit_gateway_connect_peer_arn str
    The Amazon Resource Name (ARN) of the Connect peer.
    link_id str
    The ID of the link.
    deviceId String
    The ID of the device.
    globalNetworkId String
    The ID of the global network.
    transitGatewayConnectPeerArn String
    The Amazon Resource Name (ARN) of the Connect peer.
    linkId String
    The ID of the link.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TransitGatewayConnectPeerAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TransitGatewayConnectPeerAssociation Resource

    Get an existing TransitGatewayConnectPeerAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TransitGatewayConnectPeerAssociationState, opts?: CustomResourceOptions): TransitGatewayConnectPeerAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device_id: Optional[str] = None,
            global_network_id: Optional[str] = None,
            link_id: Optional[str] = None,
            transit_gateway_connect_peer_arn: Optional[str] = None) -> TransitGatewayConnectPeerAssociation
    func GetTransitGatewayConnectPeerAssociation(ctx *Context, name string, id IDInput, state *TransitGatewayConnectPeerAssociationState, opts ...ResourceOption) (*TransitGatewayConnectPeerAssociation, error)
    public static TransitGatewayConnectPeerAssociation Get(string name, Input<string> id, TransitGatewayConnectPeerAssociationState? state, CustomResourceOptions? opts = null)
    public static TransitGatewayConnectPeerAssociation get(String name, Output<String> id, TransitGatewayConnectPeerAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DeviceId string
    The ID of the device.
    GlobalNetworkId string
    The ID of the global network.
    LinkId string
    The ID of the link.
    TransitGatewayConnectPeerArn string
    The Amazon Resource Name (ARN) of the Connect peer.
    DeviceId string
    The ID of the device.
    GlobalNetworkId string
    The ID of the global network.
    LinkId string
    The ID of the link.
    TransitGatewayConnectPeerArn string
    The Amazon Resource Name (ARN) of the Connect peer.
    deviceId String
    The ID of the device.
    globalNetworkId String
    The ID of the global network.
    linkId String
    The ID of the link.
    transitGatewayConnectPeerArn String
    The Amazon Resource Name (ARN) of the Connect peer.
    deviceId string
    The ID of the device.
    globalNetworkId string
    The ID of the global network.
    linkId string
    The ID of the link.
    transitGatewayConnectPeerArn string
    The Amazon Resource Name (ARN) of the Connect peer.
    device_id str
    The ID of the device.
    global_network_id str
    The ID of the global network.
    link_id str
    The ID of the link.
    transit_gateway_connect_peer_arn str
    The Amazon Resource Name (ARN) of the Connect peer.
    deviceId String
    The ID of the device.
    globalNetworkId String
    The ID of the global network.
    linkId String
    The ID of the link.
    transitGatewayConnectPeerArn String
    The Amazon Resource Name (ARN) of the Connect peer.

    Import

    Using pulumi import, import aws_networkmanager_transit_gateway_connect_peer_association using the global network ID and customer gateway ARN. For example:

    $ pulumi import aws:networkmanager/transitGatewayConnectPeerAssociation:TransitGatewayConnectPeerAssociation example global-network-0d47f6t230mz46dy4,arn:aws:ec2:us-west-2:123456789012:transit-gateway-connect-peer/tgw-connect-peer-12345678
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi