1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getLocalPeeringGateways
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.Core.getLocalPeeringGateways

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

This data source provides the list of Local Peering Gateways in Oracle Cloud Infrastructure Core service.

Lists the local peering gateways (LPGs) for the specified VCN and specified compartment. If the VCN ID is not provided, then the list includes the LPGs from all VCNs in the specified compartment.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testLocalPeeringGateways = oci.Core.getLocalPeeringGateways({
    compartmentId: compartmentId,
    vcnId: testVcn.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_local_peering_gateways = oci.Core.get_local_peering_gateways(compartment_id=compartment_id,
    vcn_id=test_vcn["id"])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.GetLocalPeeringGateways(ctx, &core.GetLocalPeeringGatewaysArgs{
			CompartmentId: compartmentId,
			VcnId:         pulumi.StringRef(testVcn.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testLocalPeeringGateways = Oci.Core.GetLocalPeeringGateways.Invoke(new()
    {
        CompartmentId = compartmentId,
        VcnId = testVcn.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetLocalPeeringGatewaysArgs;
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) {
        final var testLocalPeeringGateways = CoreFunctions.getLocalPeeringGateways(GetLocalPeeringGatewaysArgs.builder()
            .compartmentId(compartmentId)
            .vcnId(testVcn.id())
            .build());

    }
}
Copy
variables:
  testLocalPeeringGateways:
    fn::invoke:
      function: oci:Core:getLocalPeeringGateways
      arguments:
        compartmentId: ${compartmentId}
        vcnId: ${testVcn.id}
Copy

Using getLocalPeeringGateways

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getLocalPeeringGateways(args: GetLocalPeeringGatewaysArgs, opts?: InvokeOptions): Promise<GetLocalPeeringGatewaysResult>
function getLocalPeeringGatewaysOutput(args: GetLocalPeeringGatewaysOutputArgs, opts?: InvokeOptions): Output<GetLocalPeeringGatewaysResult>
Copy
def get_local_peering_gateways(compartment_id: Optional[str] = None,
                               filters: Optional[Sequence[_core.GetLocalPeeringGatewaysFilter]] = None,
                               vcn_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetLocalPeeringGatewaysResult
def get_local_peering_gateways_output(compartment_id: Optional[pulumi.Input[str]] = None,
                               filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetLocalPeeringGatewaysFilterArgs]]]] = None,
                               vcn_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetLocalPeeringGatewaysResult]
Copy
func GetLocalPeeringGateways(ctx *Context, args *GetLocalPeeringGatewaysArgs, opts ...InvokeOption) (*GetLocalPeeringGatewaysResult, error)
func GetLocalPeeringGatewaysOutput(ctx *Context, args *GetLocalPeeringGatewaysOutputArgs, opts ...InvokeOption) GetLocalPeeringGatewaysResultOutput
Copy

> Note: This function is named GetLocalPeeringGateways in the Go SDK.

public static class GetLocalPeeringGateways 
{
    public static Task<GetLocalPeeringGatewaysResult> InvokeAsync(GetLocalPeeringGatewaysArgs args, InvokeOptions? opts = null)
    public static Output<GetLocalPeeringGatewaysResult> Invoke(GetLocalPeeringGatewaysInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLocalPeeringGatewaysResult> getLocalPeeringGateways(GetLocalPeeringGatewaysArgs args, InvokeOptions options)
public static Output<GetLocalPeeringGatewaysResult> getLocalPeeringGateways(GetLocalPeeringGatewaysArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Core/getLocalPeeringGateways:getLocalPeeringGateways
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The OCID of the compartment.
Filters Changes to this property will trigger replacement. List<GetLocalPeeringGatewaysFilter>
VcnId string
The OCID of the VCN.
CompartmentId This property is required. string
The OCID of the compartment.
Filters Changes to this property will trigger replacement. []GetLocalPeeringGatewaysFilter
VcnId string
The OCID of the VCN.
compartmentId This property is required. String
The OCID of the compartment.
filters Changes to this property will trigger replacement. List<GetLocalPeeringGatewaysFilter>
vcnId String
The OCID of the VCN.
compartmentId This property is required. string
The OCID of the compartment.
filters Changes to this property will trigger replacement. GetLocalPeeringGatewaysFilter[]
vcnId string
The OCID of the VCN.
compartment_id This property is required. str
The OCID of the compartment.
filters Changes to this property will trigger replacement. Sequence[core.GetLocalPeeringGatewaysFilter]
vcn_id str
The OCID of the VCN.
compartmentId This property is required. String
The OCID of the compartment.
filters Changes to this property will trigger replacement. List<Property Map>
vcnId String
The OCID of the VCN.

getLocalPeeringGateways Result

The following output properties are available:

CompartmentId string
The OCID of the compartment containing the LPG.
Id string
The provider-assigned unique ID for this managed resource.
LocalPeeringGateways List<GetLocalPeeringGatewaysLocalPeeringGateway>
The list of local_peering_gateways.
Filters List<GetLocalPeeringGatewaysFilter>
VcnId string
The OCID of the VCN that uses the LPG.
CompartmentId string
The OCID of the compartment containing the LPG.
Id string
The provider-assigned unique ID for this managed resource.
LocalPeeringGateways []GetLocalPeeringGatewaysLocalPeeringGateway
The list of local_peering_gateways.
Filters []GetLocalPeeringGatewaysFilter
VcnId string
The OCID of the VCN that uses the LPG.
compartmentId String
The OCID of the compartment containing the LPG.
id String
The provider-assigned unique ID for this managed resource.
localPeeringGateways List<GetLocalPeeringGatewaysLocalPeeringGateway>
The list of local_peering_gateways.
filters List<GetLocalPeeringGatewaysFilter>
vcnId String
The OCID of the VCN that uses the LPG.
compartmentId string
The OCID of the compartment containing the LPG.
id string
The provider-assigned unique ID for this managed resource.
localPeeringGateways GetLocalPeeringGatewaysLocalPeeringGateway[]
The list of local_peering_gateways.
filters GetLocalPeeringGatewaysFilter[]
vcnId string
The OCID of the VCN that uses the LPG.
compartment_id str
The OCID of the compartment containing the LPG.
id str
The provider-assigned unique ID for this managed resource.
local_peering_gateways Sequence[core.GetLocalPeeringGatewaysLocalPeeringGateway]
The list of local_peering_gateways.
filters Sequence[core.GetLocalPeeringGatewaysFilter]
vcn_id str
The OCID of the VCN that uses the LPG.
compartmentId String
The OCID of the compartment containing the LPG.
id String
The provider-assigned unique ID for this managed resource.
localPeeringGateways List<Property Map>
The list of local_peering_gateways.
filters List<Property Map>
vcnId String
The OCID of the VCN that uses the LPG.

Supporting Types

GetLocalPeeringGatewaysFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetLocalPeeringGatewaysLocalPeeringGateway

CompartmentId This property is required. string
The OCID of the compartment.
DefinedTags This property is required. Dictionary<string, string>
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 This property is required. string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
FreeformTags This property is required. Dictionary<string, string>
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 This property is required. string
The LPG's Oracle ID (OCID).
IsCrossTenancyPeering This property is required. bool
Whether the VCN at the other end of the peering is in a different tenancy. Example: false
PeerAdvertisedCidr This property is required. string
The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
PeerAdvertisedCidrDetails This property is required. List<string>
The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
PeerId This property is required. string
The OCID of the peered LPG
PeeringStatus This property is required. string
Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
PeeringStatusDetails This property is required. string
Additional information regarding the peering status, if applicable.
RouteTableId This property is required. string
The OCID of the route table the LPG is using.
State This property is required. string
The LPG's current lifecycle state.
TimeCreated This property is required. string
The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
VcnId This property is required. string
The OCID of the VCN.
CompartmentId This property is required. string
The OCID of the compartment.
DefinedTags This property is required. map[string]string
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 This property is required. string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
FreeformTags This property is required. map[string]string
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 This property is required. string
The LPG's Oracle ID (OCID).
IsCrossTenancyPeering This property is required. bool
Whether the VCN at the other end of the peering is in a different tenancy. Example: false
PeerAdvertisedCidr This property is required. string
The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
PeerAdvertisedCidrDetails This property is required. []string
The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
PeerId This property is required. string
The OCID of the peered LPG
PeeringStatus This property is required. string
Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
PeeringStatusDetails This property is required. string
Additional information regarding the peering status, if applicable.
RouteTableId This property is required. string
The OCID of the route table the LPG is using.
State This property is required. string
The LPG's current lifecycle state.
TimeCreated This property is required. string
The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
VcnId This property is required. string
The OCID of the VCN.
compartmentId This property is required. String
The OCID of the compartment.
definedTags This property is required. Map<String,String>
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 This property is required. String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTags This property is required. Map<String,String>
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 This property is required. String
The LPG's Oracle ID (OCID).
isCrossTenancyPeering This property is required. Boolean
Whether the VCN at the other end of the peering is in a different tenancy. Example: false
peerAdvertisedCidr This property is required. String
The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
peerAdvertisedCidrDetails This property is required. List<String>
The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
peerId This property is required. String
The OCID of the peered LPG
peeringStatus This property is required. String
Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
peeringStatusDetails This property is required. String
Additional information regarding the peering status, if applicable.
routeTableId This property is required. String
The OCID of the route table the LPG is using.
state This property is required. String
The LPG's current lifecycle state.
timeCreated This property is required. String
The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
vcnId This property is required. String
The OCID of the VCN.
compartmentId This property is required. string
The OCID of the compartment.
definedTags This property is required. {[key: string]: string}
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 This property is required. string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTags This property is required. {[key: string]: string}
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 This property is required. string
The LPG's Oracle ID (OCID).
isCrossTenancyPeering This property is required. boolean
Whether the VCN at the other end of the peering is in a different tenancy. Example: false
peerAdvertisedCidr This property is required. string
The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
peerAdvertisedCidrDetails This property is required. string[]
The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
peerId This property is required. string
The OCID of the peered LPG
peeringStatus This property is required. string
Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
peeringStatusDetails This property is required. string
Additional information regarding the peering status, if applicable.
routeTableId This property is required. string
The OCID of the route table the LPG is using.
state This property is required. string
The LPG's current lifecycle state.
timeCreated This property is required. string
The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
vcnId This property is required. string
The OCID of the VCN.
compartment_id This property is required. str
The OCID of the compartment.
defined_tags This property is required. Mapping[str, str]
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 This property is required. str
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeform_tags This property is required. Mapping[str, str]
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 This property is required. str
The LPG's Oracle ID (OCID).
is_cross_tenancy_peering This property is required. bool
Whether the VCN at the other end of the peering is in a different tenancy. Example: false
peer_advertised_cidr This property is required. str
The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
peer_advertised_cidr_details This property is required. Sequence[str]
The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
peer_id This property is required. str
The OCID of the peered LPG
peering_status This property is required. str
Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
peering_status_details This property is required. str
Additional information regarding the peering status, if applicable.
route_table_id This property is required. str
The OCID of the route table the LPG is using.
state This property is required. str
The LPG's current lifecycle state.
time_created This property is required. str
The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
vcn_id This property is required. str
The OCID of the VCN.
compartmentId This property is required. String
The OCID of the compartment.
definedTags This property is required. Map<String>
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 This property is required. String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
freeformTags This property is required. Map<String>
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 This property is required. String
The LPG's Oracle ID (OCID).
isCrossTenancyPeering This property is required. Boolean
Whether the VCN at the other end of the peering is in a different tenancy. Example: false
peerAdvertisedCidr This property is required. String
The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
peerAdvertisedCidrDetails This property is required. List<String>
The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
peerId This property is required. String
The OCID of the peered LPG
peeringStatus This property is required. String
Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
peeringStatusDetails This property is required. String
Additional information regarding the peering status, if applicable.
routeTableId This property is required. String
The OCID of the route table the LPG is using.
state This property is required. String
The LPG's current lifecycle state.
timeCreated This property is required. String
The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
vcnId This property is required. String
The OCID of the VCN.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi