oci_core_drg_attachment

This resource provides the Drg Attachment resource in Oracle Cloud Infrastructure Core service.

Attaches the specified DRG to the specified network resource. A VCN can be attached to only one DRG at a time, but a DRG can be attached to more than one VCN. The response includes a DrgAttachment object with its own OCID. For more information about DRGs, see Dynamic Routing Gateways (DRGs).

You may optionally specify a display name for the attachment, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

For the purposes of access control, the DRG attachment is automatically placed into the currently selected compartment. For more information about compartments and access control, see Overview of the IAM Service.

Example Usage

resource "oci_core_drg_attachment" "test_drg_attachment" {
	#Required
	drg_id = oci_core_drg.test_drg.id

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.drg_attachment_display_name
	drg_route_table_id = oci_core_drg_route_table.test_drg_route_table.id
	freeform_tags = {"Department"= "Finance"}
	network_details {
		#Required
		id = oci_core_vcn.test_vcn.id
		type = var.drg_attachment_network_details_type

		#Optional
		id = var.drg_attachment_network_details_id
		route_table_id = oci_core_route_table.test_route_table.id
		vcn_route_type = var.drg_attachment_network_details_vcn_route_type
	}
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Drg Attachment * update - (Defaults to 20 minutes), when updating the Drg Attachment * delete - (Defaults to 20 minutes), when destroying the Drg Attachment

Import

DrgAttachments can be imported using the id, e.g.

$ terraform import oci_core_drg_attachment.test_drg_attachment "id"