Resource: awsNetworkmanagerConnectPeer
Terraform resource for managing an AWS NetworkManager Connect Peer.
Example Usage
Basic 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 awsNetworkmanagerVpcAttachmentExample =
new aws.networkmanagerVpcAttachment.NetworkmanagerVpcAttachment(
this,
"example",
{
coreNetworkId: "${awscc_networkmanager_core_network.example.id}",
subnetArns: "${aws_subnet.example[*].arn}",
vpcArn: "${aws_vpc.example.arn}",
}
);
const awsNetworkmanagerConnectAttachmentExample =
new aws.networkmanagerConnectAttachment.NetworkmanagerConnectAttachment(
this,
"example_1",
{
coreNetworkId: "${awscc_networkmanager_core_network.example.id}",
edgeLocation: awsNetworkmanagerVpcAttachmentExample.edgeLocation,
options: {
protocol: "GRE",
},
transportAttachmentId: awsNetworkmanagerVpcAttachmentExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsNetworkmanagerConnectAttachmentExample.overrideLogicalId("example");
const awsNetworkmanagerConnectPeerExample =
new aws.networkmanagerConnectPeer.NetworkmanagerConnectPeer(
this,
"example_2",
{
bgpOptions: {
peerAsn: 65000,
},
connectAttachmentId: awsNetworkmanagerConnectAttachmentExample.id,
insideCidrBlocks: ["172.16.0.0/16"],
peerAddress: "127.0.0.1",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsNetworkmanagerConnectPeerExample.overrideLogicalId("example");
Usage with attachment accepter
/*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 awsNetworkmanagerVpcAttachmentExample =
new aws.networkmanagerVpcAttachment.NetworkmanagerVpcAttachment(
this,
"example",
{
coreNetworkId: "${awscc_networkmanager_core_network.example.id}",
subnetArns: "${aws_subnet.example[*].arn}",
vpcArn: "${aws_vpc.example.arn}",
}
);
const awsNetworkmanagerAttachmentAccepterExample =
new aws.networkmanagerAttachmentAccepter.NetworkmanagerAttachmentAccepter(
this,
"example_1",
{
attachmentId: awsNetworkmanagerVpcAttachmentExample.id,
attachmentType: awsNetworkmanagerVpcAttachmentExample.attachmentType,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsNetworkmanagerAttachmentAccepterExample.overrideLogicalId("example");
const awsNetworkmanagerConnectAttachmentExample =
new aws.networkmanagerConnectAttachment.NetworkmanagerConnectAttachment(
this,
"example_2",
{
coreNetworkId: "${awscc_networkmanager_core_network.example.id}",
depends_on: ["aws_networkmanager_attachment_accepter.test"],
edgeLocation: awsNetworkmanagerVpcAttachmentExample.edgeLocation,
options: {
protocol: "GRE",
},
transportAttachmentId: awsNetworkmanagerVpcAttachmentExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsNetworkmanagerConnectAttachmentExample.overrideLogicalId("example");
const awsNetworkmanagerConnectPeerExample =
new aws.networkmanagerConnectPeer.NetworkmanagerConnectPeer(
this,
"example_3",
{
bgpOptions: {
peerAsn: 65500,
},
connectAttachmentId: awsNetworkmanagerConnectAttachmentExample.id,
depends_on: ["aws_networkmanager_attachment_accepter.example2"],
insideCidrBlocks: ["172.16.0.0/16"],
peerAddress: "127.0.0.1",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsNetworkmanagerConnectPeerExample.overrideLogicalId("example");
new aws.networkmanagerAttachmentAccepter.NetworkmanagerAttachmentAccepter(
this,
"example2",
{
attachmentId: awsNetworkmanagerConnectAttachmentExample.id,
attachmentType: awsNetworkmanagerConnectAttachmentExample.attachmentType,
}
);
Argument Reference
The following arguments are required:
connectAttachmentId
- (Required) The ID of the connection attachment.insideCidrBlocks
- (Required) The inside IP addresses used for BGP peering.peerAddress
- (Required) The Connect peer address.
The following arguments are optional:
bgpOptions
(Optional) The Connect peer BGP options.coreNetworkAddress
(Optional) A Connect peer core network address.tags
- (Optional) Key-value tags for the attachment. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- The ARN of the attachment.configuration
- The configuration of the Connect peer.coreNetworkId
- The ID of a core network.edgeLocation
- The Region where the peer is located.id
- The ID of the Connect peer.state
- The state of the Connect peer.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
awsNetworkmanagerConnectPeer
can be imported using the connect peer ID, e.g.