aws.networkmanager.TransitGatewayConnectPeerAssociation
Explore with Pulumi AI
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
This property is required. string - The unique name of the resource.
- args
This property is required. TransitGatewayConnectPeerAssociationArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. TransitGatewayConnectPeerAssociationArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. TransitGatewayConnectPeerAssociationArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TransitGatewayConnectPeerAssociation resource accepts the following input properties:
- Device
Id This property is required. Changes to this property will trigger replacement.
- The ID of the device.
- Global
Network Id This property is required. Changes to this property will trigger replacement.
- The ID of the global network.
- Transit
Gateway Connect Peer Arn This property is required. Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- Link
Id Changes to this property will trigger replacement.
- The ID of the link.
- Device
Id This property is required. Changes to this property will trigger replacement.
- The ID of the device.
- Global
Network Id This property is required. Changes to this property will trigger replacement.
- The ID of the global network.
- Transit
Gateway Connect Peer Arn This property is required. Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- Link
Id Changes to this property will trigger replacement.
- The ID of the link.
- device
Id This property is required. Changes to this property will trigger replacement.
- The ID of the device.
- global
Network Id This property is required. Changes to this property will trigger replacement.
- The ID of the global network.
- transit
Gateway Connect Peer Arn This property is required. Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- link
Id Changes to this property will trigger replacement.
- The ID of the link.
- device
Id This property is required. Changes to this property will trigger replacement.
- The ID of the device.
- global
Network Id This property is required. Changes to this property will trigger replacement.
- The ID of the global network.
- transit
Gateway Connect Peer Arn This property is required. Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- link
Id Changes to this property will trigger replacement.
- The ID of the link.
- device_
id This property is required. Changes to this property will trigger replacement.
- The ID of the device.
- global_
network_ id This property is required. Changes to this property will trigger replacement.
- The ID of the global network.
- transit_
gateway_ connect_ peer_ arn This property is required. Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- link_
id Changes to this property will trigger replacement.
- The ID of the link.
- device
Id This property is required. Changes to this property will trigger replacement.
- The ID of the device.
- global
Network Id This property is required. Changes to this property will trigger replacement.
- The ID of the global network.
- transit
Gateway Connect Peer Arn This property is required. Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- link
Id Changes to this property will trigger replacement.
- 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)
resources: _: type: aws:networkmanager:TransitGatewayConnectPeerAssociation get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Device
Id Changes to this property will trigger replacement.
- The ID of the device.
- Global
Network Id Changes to this property will trigger replacement.
- The ID of the global network.
- Link
Id Changes to this property will trigger replacement.
- The ID of the link.
- Transit
Gateway Connect Peer Arn Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- Device
Id Changes to this property will trigger replacement.
- The ID of the device.
- Global
Network Id Changes to this property will trigger replacement.
- The ID of the global network.
- Link
Id Changes to this property will trigger replacement.
- The ID of the link.
- Transit
Gateway Connect Peer Arn Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- device
Id Changes to this property will trigger replacement.
- The ID of the device.
- global
Network Id Changes to this property will trigger replacement.
- The ID of the global network.
- link
Id Changes to this property will trigger replacement.
- The ID of the link.
- transit
Gateway Connect Peer Arn Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- device
Id Changes to this property will trigger replacement.
- The ID of the device.
- global
Network Id Changes to this property will trigger replacement.
- The ID of the global network.
- link
Id Changes to this property will trigger replacement.
- The ID of the link.
- transit
Gateway Connect Peer Arn Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- device_
id Changes to this property will trigger replacement.
- The ID of the device.
- global_
network_ id Changes to this property will trigger replacement.
- The ID of the global network.
- link_
id Changes to this property will trigger replacement.
- The ID of the link.
- transit_
gateway_ connect_ peer_ arn Changes to this property will trigger replacement.
- The Amazon Resource Name (ARN) of the Connect peer.
- device
Id Changes to this property will trigger replacement.
- The ID of the device.
- global
Network Id Changes to this property will trigger replacement.
- The ID of the global network.
- link
Id Changes to this property will trigger replacement.
- The ID of the link.
- transit
Gateway Connect Peer Arn Changes to this property will trigger replacement.
- 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.