PeerConnection

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

NOTE: Available in 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.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.PeerConnection;
import com.pulumi.alicloud.vpc.PeerConnectionArgs;
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 defaultAccount = AlicloudFunctions.getAccount();
final var defaultNetworks = VpcFunctions.getNetworks();
var defaultPeerConnection = new PeerConnection("defaultPeerConnection", PeerConnectionArgs.builder()
.peerConnectionName(var_.name())
.vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
.acceptingAliUid(defaultAccount.applyValue(getAccountResult -> getAccountResult.id()))
.acceptingRegionId("cn-hangzhou")
.acceptingVpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[1]))
.description(var_.name())
.build());
}
}

Import

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

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

Properties

Link copied to clipboard
val acceptingAliUid: Output<Int>

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

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

Link copied to clipboard
val acceptingVpcId: Output<String>

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

Link copied to clipboard
val bandwidth: Output<Int>

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>?

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>?

The dry run.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

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
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

The status of the resource.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

The ID of the requester VPC.