PeerConnection

class PeerConnection : KotlinCustomResource

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>

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 createTime: Output<String>

The creation time of the VPC peer connection. Use UTC time in the format' YYYY-MM-DDThh:mm:ssZ '.

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

Whether to PreCheck only this request. Value:

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

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceGroupId: Output<String>

The ID of the resource group.

Link copied to clipboard
val status: Output<String>

The status of the resource.

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

The tags of PrefixList.

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

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