PeerConnectionArgs

data class PeerConnectionArgs(val acceptingAliUid: Output<Int>? = null, val acceptingRegionId: Output<String>? = null, val acceptingVpcId: Output<String>? = null, val bandwidth: Output<Int>? = null, val description: Output<String>? = null, val dryRun: Output<Boolean>? = null, val peerConnectionName: Output<String>? = null, val resourceGroupId: Output<String>? = null, val status: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<PeerConnectionArgs>

Provides a VPC Peer Connection resource. Vpc peer connection. For information about VPC Peer Connection and how to use it, see What is Peer Connection.

NOTE: Available since v1.186.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.Provider;
import com.pulumi.alicloud.ProviderArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.PeerConnection;
import com.pulumi.alicloud.vpc.PeerConnectionArgs;
import com.pulumi.resources.CustomResourceOptions;
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 config = ctx.config();
final var defaultAccount = AlicloudFunctions.getAccount();
final var acceptingRegion = config.get("acceptingRegion").orElse("cn-beijing");
var local = new Provider("local", ProviderArgs.builder()
.region("cn-hangzhou")
.build());
var accepting = new Provider("accepting", ProviderArgs.builder()
.region(acceptingRegion)
.build());
var localVpc = new Network("localVpc", NetworkArgs.builder()
.vpcName("terraform-example")
.cidrBlock("172.17.3.0/24")
.build(), CustomResourceOptions.builder()
.provider(alicloud.local())
.build());
var acceptingVpc = new Network("acceptingVpc", NetworkArgs.builder()
.vpcName("terraform-example")
.cidrBlock("172.17.3.0/24")
.build(), CustomResourceOptions.builder()
.provider(alicloud.accepting())
.build());
var defaultPeerConnection = new PeerConnection("defaultPeerConnection", PeerConnectionArgs.builder()
.peerConnectionName("terraform-example")
.vpcId(localVpc.id())
.acceptingAliUid(defaultAccount.applyValue(getAccountResult -> getAccountResult.id()))
.acceptingRegionId(acceptingRegion)
.acceptingVpcId(acceptingVpc.id())
.description("terraform-example")
.build(), CustomResourceOptions.builder()
.provider(alicloud.local())
.build());
}
}

Import

VPC Peer Connection can be imported using the id, e.g.

$ pulumi import alicloud:vpc/peerConnection:PeerConnection example <id>

Constructors

Link copied to clipboard
fun PeerConnectionArgs(acceptingAliUid: Output<Int>? = null, acceptingRegionId: Output<String>? = null, acceptingVpcId: Output<String>? = null, bandwidth: Output<Int>? = null, description: Output<String>? = null, dryRun: Output<Boolean>? = null, peerConnectionName: Output<String>? = null, resourceGroupId: Output<String>? = null, status: Output<String>? = null, tags: Output<Map<String, Any>>? = null, vpcId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): PeerConnectionArgs

Properties

Link copied to clipboard
val acceptingAliUid: Output<Int>? = null

The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

Link copied to clipboard
val acceptingRegionId: Output<String>? = null

The region ID of the recipient of the VPC peering connection to be created.

Link copied to clipboard
val acceptingVpcId: Output<String>? = null

The VPC ID of the receiving end of the VPC peer connection.

Link copied to clipboard
val bandwidth: Output<Int>? = null

The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.

Link copied to clipboard
val description: Output<String>? = null

The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.

Link copied to clipboard
val dryRun: Output<Boolean>? = null

Whether to PreCheck only this request. Value:

Link copied to clipboard
val peerConnectionName: Output<String>? = null

The name of the resource. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the resource group.

Link copied to clipboard
val status: Output<String>? = null

The status of the resource.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

The tags of PrefixList.

Link copied to clipboard
val vpcId: Output<String>? = null

You must create a VPC ID on the initiator of a VPC peer connection.