Data Source: oci_core_drg_attachments
This data source provides the list of Drg Attachments in Oracle Cloud Infrastructure Core service.
Lists the DrgAttachment
resource for the specified compartment. You can filter the
results by DRG, attached network, attachment type, DRG route table or
VCN route table.
The LIST API lists DRG attachments by attachment type. It will default to list VCN attachments, but you may request to list ALL attachments of ALL types.
Example Usage
data "oci_core_drg_attachments" "test_drg_attachments" {
#Required
compartment_id = var.compartment_id
#Optional
attachment_type = var.drg_attachment_attachment_type
display_name = var.drg_attachment_display_name
drg_id = oci_core_drg.test_drg.id
drg_route_table_id = oci_core_drg_route_table.test_drg_route_table.id
network_id = oci_core_network.test_network.id
state = var.drg_attachment_state
vcn_id = oci_core_vcn.test_vcn.id
}
Argument Reference
The following arguments are supported:
attachment_type
- (Optional) The type for the network resource attached to the DRG.compartment_id
- (Required) The OCID of the compartment.display_name
- (Optional) A filter to return only resources that match the given display name exactly.drg_id
- (Optional) The OCID of the DRG.drg_route_table_id
- (Optional) The OCID of the DRG route table assigned to the DRG attachment.network_id
- (Optional) The OCID of the resource (virtual circuit, VCN, IPSec tunnel, or remote peering connection) attached to the DRG.state
- (Optional) A filter to return only resources that match the specified lifecycle state. The value is case insensitive.vcn_id
- (Optional) The OCID of the VCN.
Attributes Reference
The following attributes are exported:
drg_attachments
- The list of drg_attachments.
DrgAttachment Reference
The following attributes are exported:
compartment_id
- The OCID of the compartment containing the DRG attachment.defined_tags
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:{"Operations.CostCenter": "42"}
display_name
- A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.drg_id
- The OCID of the DRG.drg_route_table_id
- The OCID of the DRG route table that is assigned to this attachment.The DRG route table manages traffic inside the DRG.
export_drg_route_distribution_id
- The OCID of the export route distribution used to specify how routes in the assigned DRG route table are advertised to the attachment. If this value is null, no routes are advertised through this attachment.freeform_tags
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:{"Department": "Finance"}
id
- The DRG attachment’s Oracle ID (OCID).is_cross_tenancy
- Indicates whether the DRG attachment and attached network live in a different tenancy than the DRG. Example:false
network_details
-id
- The OCID of the network attached to the DRG.ids
- The OCID of the target IPSec tunnel attachment.ipsec_connection_id
- The IPSec connection that contains the attached IPSec tunnel.route_table_id
- The OCID of the route table the DRG attachment is using.For information about why you would associate a route table with a DRG attachment, see:
transport_attachment_id
- The OCID of the virtual circuit’s DRG attachment.transport_only_mode
- Boolean flag that determines wether all traffic over the virtual circuits is encrypted. Example:true
type
- The type can be one of these values:IPSEC_TUNNEL
,LOOPBACK
,REMOTE_PEERING_CONNECTION
,VCN
,VIRTUAL_CIRCUIT
vcn_route_type
- Indicates whether the VCN CIDRs or the individual subnet CIDRs are imported from the attachment. Routes from the VCN ingress route table are always imported.
route_table_id
- The OCID of the route table the DRG attachment is using.For information about why you would associate a route table with a DRG attachment, see:
- Transit Routing: Access to Multiple VCNs in Same Region
- Transit Routing: Private Access to Oracle Services
This field is deprecated. Instead, use the
networkDetails
field to view the OCID of the attached resource.state
- The DRG attachment’s current state.time_created
- The date and time the DRG attachment was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
vcn_id
- The OCID of the VCN. This field is deprecated. Instead, use thenetworkDetails
field to view the OCID of the attached resource.