AWS::NetworkManager::TransitGatewayPeering Resoruce Type.
The Core Network must have an edge location where the Transit Gateway is created for Transit Gateway peering to be established. This example uses the AWS provider data source for aws_networkmanager_core_network_policy_document. 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" {}
data "aws_networkmanager_core_network_policy_document" "example" {
core_network_configuration {
asn_ranges = ["65022-65534"]
edge_locations {
location = data.aws_region.current.name # Core Network must have an edge location where the Transit Gateway is created
}
}
segments {
name = "segment"
}
}
resource "awscc_networkmanager_core_network" "example" {
global_network_id = awscc_networkmanager_global_network.example.id
description = "example"
policy_document = data.aws_networkmanager_core_network_policy_document.example.json
}
resource "awscc_networkmanager_transit_gateway_peering" "example" {
core_network_id = awscc_networkmanager_core_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}"
}
core_network_id
(String) The Id of the core network that you want to peer a transit gateway to.transit_gateway_arn
(String) The ARN (Amazon Resource Name) of the transit gateway that you will peer to a core networktags
(Attributes Set) An array of key-value pairs to apply to this resource. (see below for nested schema)core_network_arn
(String) The ARN (Amazon Resource Name) of the core network that you want to peer a transit gateway to.created_at
(String) The creation time of the transit gateway peeringedge_location
(String) The location of the transit gateway peeringid
(String) Uniquely identifies the resource.owner_account_id
(String) Peering owner account Idpeering_id
(String) The Id of the transit gateway peeringpeering_type
(String) Peering type (TransitGatewayPeering)resource_arn
(String) The ARN (Amazon Resource Name) of the resource that you will peer to a core networkstate
(String) The state of the transit gateway peeringtransit_gateway_peering_attachment_id
(String) The ID of the TransitGatewayPeeringAttachmenttags
Required:
key
(String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.value
(String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.Import is supported using the following syntax:
$ terraform import awscc_networkmanager_transit_gateway_peering.example <resource ID>