Skip to content

Resource: awsNetworkmanagerTransitGatewayRegistration

Registers a transit gateway to a global network. The transit gateway can be in any AWS Region, but it must be owned by the same AWS account that owns the global network. You cannot register a transit gateway in more than one global network.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsEc2TransitGatewayExample = new aws.ec2TransitGateway.Ec2TransitGateway(
  this,
  "example",
  {}
);
const awsNetworkmanagerGlobalNetworkExample =
  new aws.networkmanagerGlobalNetwork.NetworkmanagerGlobalNetwork(
    this,
    "example_1",
    {
      description: "example",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsNetworkmanagerGlobalNetworkExample.overrideLogicalId("example");
const awsNetworkmanagerTransitGatewayRegistrationExample =
  new aws.networkmanagerTransitGatewayRegistration.NetworkmanagerTransitGatewayRegistration(
    this,
    "example_2",
    {
      globalNetworkId: awsNetworkmanagerGlobalNetworkExample.id,
      transitGatewayArn: awsEc2TransitGatewayExample.arn,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsNetworkmanagerTransitGatewayRegistrationExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • globalNetworkId - (Required) The ID of the Global Network to register to.
  • transitGatewayArn - (Required) The ARN of the Transit Gateway to register.

Attributes Reference

No additional attributes are exported.

Import

awsNetworkmanagerTransitGatewayRegistration can be imported using the global network ID and transit gateway ARN, e.g.

$ terraform import aws_networkmanager_transit_gateway_registration.example global-network-0d47f6t230mz46dy4,arn:aws:ec2:us-west-2:123456789012:transit-gateway/tgw-123abc05e04123abc