The AWS::NetworkManager::TransitGatewayRegistration type registers a transit gateway in your 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.
Note that the ARN is not returned by awscc_ec2_transit_gateway as of 20 July 2023 and is thus formatted manually in the example below:
data "aws_partition" "current" {}
data "aws_region" "current" {}
data "aws_caller_identity" "current" {}
resource "awscc_networkmanager_global_network" "example" {}
resource "awscc_ec2_transit_gateway" "example" {}
resource "awscc_networkmanager_transit_gateway_registration" "example" {
global_network_id = awscc_networkmanager_global_network.example.id
transit_gateway_arn = "arn:${data.aws_partition.current.partition}:ec2:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:transit-gateway/${awscc_ec2_transit_gateway.example.id}"
}
global_network_id
(String) The ID of the global network.transit_gateway_arn
(String) The Amazon Resource Name (ARN) of the transit gateway.id
(String) Uniquely identifies the resource.Import is supported using the following syntax:
$ terraform import awscc_networkmanager_transit_gateway_registration.example <resource ID>