oci logo
Oracle Cloud Infrastructure v0.12.0, Mar 17 23

oci.Core.Drg

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

Creates a new dynamic routing gateway (DRG) in the specified compartment. For more information, see Dynamic Routing Gateways (DRGs).

For the purposes of access control, you must provide the OCID of the compartment where you want the DRG to reside. Notice that the DRG doesn’t have to be in the same compartment as the VCN, the DRG attachment, or other Networking Service components. If you’re not sure which compartment to use, put the DRG in the same compartment as the VCN. For more information about compartments and access control, see Overview of the IAM Service. For information about OCIDs, see Resource Identifiers.

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testDrg = new Oci.Core.Drg("testDrg", new()
    {
        CompartmentId = @var.Compartment_id,
        DefinedTags = 
        {
            { "Operations.CostCenter", "42" },
        },
        DisplayName = @var.Drg_display_name,
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Core.NewDrg(ctx, "testDrg", &Core.DrgArgs{
			CompartmentId: pulumi.Any(_var.Compartment_id),
			DefinedTags: pulumi.AnyMap{
				"Operations.CostCenter": pulumi.Any("42"),
			},
			DisplayName: pulumi.Any(_var.Drg_display_name),
			FreeformTags: pulumi.AnyMap{
				"Department": pulumi.Any("Finance"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.Drg;
import com.pulumi.oci.Core.DrgArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var testDrg = new Drg("testDrg", DrgArgs.builder()        
            .compartmentId(var_.compartment_id())
            .definedTags(Map.of("Operations.CostCenter", "42"))
            .displayName(var_.drg_display_name())
            .freeformTags(Map.of("Department", "Finance"))
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_drg = oci.core.Drg("testDrg",
    compartment_id=var["compartment_id"],
    defined_tags={
        "Operations.CostCenter": "42",
    },
    display_name=var["drg_display_name"],
    freeform_tags={
        "Department": "Finance",
    })
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testDrg = new oci.core.Drg("testDrg", {
    compartmentId: _var.compartment_id,
    definedTags: {
        "Operations.CostCenter": "42",
    },
    displayName: _var.drg_display_name,
    freeformTags: {
        Department: "Finance",
    },
});
resources:
  testDrg:
    type: oci:Core:Drg
    properties:
      #Required
      compartmentId: ${var.compartment_id}
      #Optional
      definedTags:
        Operations.CostCenter: '42'
      displayName: ${var.drg_display_name}
      freeformTags:
        Department: Finance

Create Drg Resource

new Drg(name: string, args: DrgArgs, opts?: CustomResourceOptions);
@overload
def Drg(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, Any]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, Any]] = None)
@overload
def Drg(resource_name: str,
        args: DrgArgs,
        opts: Optional[ResourceOptions] = None)
func NewDrg(ctx *Context, name string, args DrgArgs, opts ...ResourceOption) (*Drg, error)
public Drg(string name, DrgArgs args, CustomResourceOptions? opts = null)
public Drg(String name, DrgArgs args)
public Drg(String name, DrgArgs args, CustomResourceOptions options)
type: oci:Core:Drg
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DrgArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DrgArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DrgArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DrgArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DrgArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Drg Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Drg resource accepts the following input properties:

CompartmentId string

(Updatable) The OCID of the compartment to contain the DRG.

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

FreeformTags Dictionary<string, object>

(Updatable) 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"}

CompartmentId string

(Updatable) The OCID of the compartment to contain the DRG.

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

FreeformTags map[string]interface{}

(Updatable) 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"}

compartmentId String

(Updatable) The OCID of the compartment to contain the DRG.

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

freeformTags Map<String,Object>

(Updatable) 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"}

compartmentId string

(Updatable) The OCID of the compartment to contain the DRG.

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName string

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

freeformTags {[key: string]: any}

(Updatable) 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"}

compartment_id str

(Updatable) The OCID of the compartment to contain the DRG.

defined_tags Mapping[str, Any]

(Updatable) 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 str

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

freeform_tags Mapping[str, Any]

(Updatable) 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"}

compartmentId String

(Updatable) The OCID of the compartment to contain the DRG.

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

freeformTags Map<Any>

(Updatable) 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"}

Outputs

All input properties are implicitly available as output properties. Additionally, the Drg resource produces the following output properties:

DefaultDrgRouteTables List<DrgDefaultDrgRouteTable>

The default DRG route table for this DRG. Each network type has a default DRG route table.

DefaultExportDrgRouteDistributionId string

The OCID of this DRG's default export route distribution for the DRG attachments.

Id string

The provider-assigned unique ID for this managed resource.

RedundancyStatus string

The redundancy status of the DRG specified.

State string

The DRG's current state.

TimeCreated string

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

DefaultDrgRouteTables []DrgDefaultDrgRouteTable

The default DRG route table for this DRG. Each network type has a default DRG route table.

DefaultExportDrgRouteDistributionId string

The OCID of this DRG's default export route distribution for the DRG attachments.

Id string

The provider-assigned unique ID for this managed resource.

RedundancyStatus string

The redundancy status of the DRG specified.

State string

The DRG's current state.

TimeCreated string

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

defaultDrgRouteTables List<DrgDefaultDrgRouteTable>

The default DRG route table for this DRG. Each network type has a default DRG route table.

defaultExportDrgRouteDistributionId String

The OCID of this DRG's default export route distribution for the DRG attachments.

id String

The provider-assigned unique ID for this managed resource.

redundancyStatus String

The redundancy status of the DRG specified.

state String

The DRG's current state.

timeCreated String

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

defaultDrgRouteTables DrgDefaultDrgRouteTable[]

The default DRG route table for this DRG. Each network type has a default DRG route table.

defaultExportDrgRouteDistributionId string

The OCID of this DRG's default export route distribution for the DRG attachments.

id string

The provider-assigned unique ID for this managed resource.

redundancyStatus string

The redundancy status of the DRG specified.

state string

The DRG's current state.

timeCreated string

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

default_drg_route_tables DrgDefaultDrgRouteTable]

The default DRG route table for this DRG. Each network type has a default DRG route table.

default_export_drg_route_distribution_id str

The OCID of this DRG's default export route distribution for the DRG attachments.

id str

The provider-assigned unique ID for this managed resource.

redundancy_status str

The redundancy status of the DRG specified.

state str

The DRG's current state.

time_created str

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

defaultDrgRouteTables List<Property Map>

The default DRG route table for this DRG. Each network type has a default DRG route table.

defaultExportDrgRouteDistributionId String

The OCID of this DRG's default export route distribution for the DRG attachments.

id String

The provider-assigned unique ID for this managed resource.

redundancyStatus String

The redundancy status of the DRG specified.

state String

The DRG's current state.

timeCreated String

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

Look up Existing Drg Resource

Get an existing Drg resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DrgState, opts?: CustomResourceOptions): Drg
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        default_drg_route_tables: Optional[Sequence[_core.DrgDefaultDrgRouteTableArgs]] = None,
        default_export_drg_route_distribution_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, Any]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, Any]] = None,
        redundancy_status: Optional[str] = None,
        state: Optional[str] = None,
        time_created: Optional[str] = None) -> Drg
func GetDrg(ctx *Context, name string, id IDInput, state *DrgState, opts ...ResourceOption) (*Drg, error)
public static Drg Get(string name, Input<string> id, DrgState? state, CustomResourceOptions? opts = null)
public static Drg get(String name, Output<String> id, DrgState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CompartmentId string

(Updatable) The OCID of the compartment to contain the DRG.

DefaultDrgRouteTables List<DrgDefaultDrgRouteTableArgs>

The default DRG route table for this DRG. Each network type has a default DRG route table.

DefaultExportDrgRouteDistributionId string

The OCID of this DRG's default export route distribution for the DRG attachments.

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

FreeformTags Dictionary<string, object>

(Updatable) 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"}

RedundancyStatus string

The redundancy status of the DRG specified.

State string

The DRG's current state.

TimeCreated string

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

CompartmentId string

(Updatable) The OCID of the compartment to contain the DRG.

DefaultDrgRouteTables []DrgDefaultDrgRouteTableArgs

The default DRG route table for this DRG. Each network type has a default DRG route table.

DefaultExportDrgRouteDistributionId string

The OCID of this DRG's default export route distribution for the DRG attachments.

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

FreeformTags map[string]interface{}

(Updatable) 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"}

RedundancyStatus string

The redundancy status of the DRG specified.

State string

The DRG's current state.

TimeCreated string

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

compartmentId String

(Updatable) The OCID of the compartment to contain the DRG.

defaultDrgRouteTables List<DrgDefaultDrgRouteTableArgs>

The default DRG route table for this DRG. Each network type has a default DRG route table.

defaultExportDrgRouteDistributionId String

The OCID of this DRG's default export route distribution for the DRG attachments.

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

freeformTags Map<String,Object>

(Updatable) 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"}

redundancyStatus String

The redundancy status of the DRG specified.

state String

The DRG's current state.

timeCreated String

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

compartmentId string

(Updatable) The OCID of the compartment to contain the DRG.

defaultDrgRouteTables DrgDefaultDrgRouteTableArgs[]

The default DRG route table for this DRG. Each network type has a default DRG route table.

defaultExportDrgRouteDistributionId string

The OCID of this DRG's default export route distribution for the DRG attachments.

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName string

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

freeformTags {[key: string]: any}

(Updatable) 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"}

redundancyStatus string

The redundancy status of the DRG specified.

state string

The DRG's current state.

timeCreated string

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

compartment_id str

(Updatable) The OCID of the compartment to contain the DRG.

default_drg_route_tables DrgDefaultDrgRouteTableArgs]

The default DRG route table for this DRG. Each network type has a default DRG route table.

default_export_drg_route_distribution_id str

The OCID of this DRG's default export route distribution for the DRG attachments.

defined_tags Mapping[str, Any]

(Updatable) 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 str

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

freeform_tags Mapping[str, Any]

(Updatable) 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"}

redundancy_status str

The redundancy status of the DRG specified.

state str

The DRG's current state.

time_created str

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

compartmentId String

(Updatable) The OCID of the compartment to contain the DRG.

defaultDrgRouteTables List<Property Map>

The default DRG route table for this DRG. Each network type has a default DRG route table.

defaultExportDrgRouteDistributionId String

The OCID of this DRG's default export route distribution for the DRG attachments.

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

(Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

freeformTags Map<Any>

(Updatable) 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"}

redundancyStatus String

The redundancy status of the DRG specified.

state String

The DRG's current state.

timeCreated String

The date and time the DRG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

Supporting Types

DrgDefaultDrgRouteTable

IpsecTunnel string

The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.

RemotePeeringConnection string

The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.

Vcn string

The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.

VirtualCircuit string

The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.

IpsecTunnel string

The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.

RemotePeeringConnection string

The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.

Vcn string

The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.

VirtualCircuit string

The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.

ipsecTunnel String

The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.

remotePeeringConnection String

The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.

vcn String

The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.

virtualCircuit String

The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.

ipsecTunnel string

The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.

remotePeeringConnection string

The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.

vcn string

The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.

virtualCircuit string

The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.

ipsec_tunnel str

The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.

remote_peering_connection str

The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.

vcn str

The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.

virtual_circuit str

The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.

ipsecTunnel String

The OCID of the default DRG route table assigned to DRG attachments of type IPSEC_TUNNEL on creation.

remotePeeringConnection String

The OCID of the default DRG route table to be assigned to DRG attachments of type REMOTE_PEERING_CONNECTION on creation.

vcn String

The OCID of the default DRG route table to be assigned to DRG attachments of type VCN on creation.

virtualCircuit String

The OCID of the default DRG route table to be assigned to DRG attachments of type VIRTUAL_CIRCUIT on creation.

Import

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

 $ pulumi import oci:Core/drg:Drg test_drg "id"

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.