Attaching a VCN to a DRG

Attach a Virtual Cloud Network (VCN) to a Dynamic Routing Gateway (DRG).

A VCN can be attached to only one DRG at a time, but a DRG can be attached to more than one VCN. The attachment is automatically created in the compartment that holds the VCN. The VCN and DRG do not need to be in the same compartment. You may optionally specify a display name for the attachment itself, otherwise a default is provided. You can choose to connect VCNs in the same region using a single DRG instead of local peering gateways (see Local VCN Peering Through an Upgraded DRG for more information about that use case). If left unmodified, the default routing policies in a DRG allow traffic to be routed between all VCNs attached to it. If you are attaching a DRG to a VCN in another tenancy, you need to have IAM configurations in both tenancies as described in IAM Policies for Routing Between VCNs. You will also need the OCID of the VCN.

When you create an attachment to a DRG (the DRG can be in another tenancy in the same OCI region), attachments on both the DRG and VCN are created and connected in one step. Attaching a DRG to a VCN results in a DrgAttachment object with its own OCID.

Was this article helpful?