getNetworkPeering

Get information of a specified compute network peering. For more information see the official documentation and API.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.NetworkPeering;
import com.pulumi.gcp.compute.NetworkPeeringArgs;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetNetworkPeeringArgs;
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 default_ = new Network("default", NetworkArgs.builder()
.autoCreateSubnetworks("false")
.build());
var other = new Network("other", NetworkArgs.builder()
.autoCreateSubnetworks("false")
.build());
var peering1 = new NetworkPeering("peering1", NetworkPeeringArgs.builder()
.network(default_.selfLink())
.peerNetwork(other.selfLink())
.build());
var peering2 = new NetworkPeering("peering2", NetworkPeeringArgs.builder()
.network(other.selfLink())
.peerNetwork(default_.selfLink())
.build());
final var peering1Ds = ComputeFunctions.getNetworkPeering(GetNetworkPeeringArgs.builder()
.name(peering1.name())
.network(peering1.network())
.build());
}
}

Return

A collection of values returned by getNetworkPeering.

Parameters

argument

A collection of arguments for invoking getNetworkPeering.


Return

A collection of values returned by getNetworkPeering.

Parameters

name

Name of the peering.

network

The primary network of the peering.

See also


Return

A collection of values returned by getNetworkPeering.

Parameters

argument

Builder for com.pulumi.gcp.compute.kotlin.inputs.GetNetworkPeeringPlainArgs.

See also