PeerConnectionAccepter

class PeerConnectionAccepter : KotlinCustomResource

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

NOTE: Available since v1.196.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.Provider;
import com.pulumi.alicloud.ProviderArgs;
import com.pulumi.alicloud.inputs.ProviderAssumeRoleArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.vpc.PeerConnection;
import com.pulumi.alicloud.vpc.PeerConnectionArgs;
import com.pulumi.alicloud.vpc.PeerConnectionAccepter;
import com.pulumi.alicloud.vpc.PeerConnectionAccepterArgs;
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 name = config.get("name").orElse("tf-example");
final var acceptingRegion = config.get("acceptingRegion").orElse("cn-beijing");
final var acceptUid = config.get("acceptUid").orElse("xxxx");
var accepting = new Provider("accepting", ProviderArgs.builder()
.region(acceptingRegion)
.assumeRole(ProviderAssumeRoleArgs.builder()
.roleArn(String.format("acs:ram::%s:role/terraform-example-assume-role", acceptUid))
.build())
.build());
var local = new Provider("local", ProviderArgs.builder()
.region("cn-hangzhou")
.build());
var localNetwork = new Network("localNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build(), CustomResourceOptions.builder()
.provider(alicloud.local())
.build());
var acceptingNetwork = new Network("acceptingNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("192.168.0.0/16")
.build(), CustomResourceOptions.builder()
.provider(alicloud.accepting())
.build());
final var acceptingAccount = AlicloudFunctions.getAccount();
var defaultPeerConnection = new PeerConnection("defaultPeerConnection", PeerConnectionArgs.builder()
.peerConnectionName(name)
.vpcId(localNetwork.id())
.acceptingAliUid(acceptingAccount.applyValue(getAccountResult -> getAccountResult.id()))
.acceptingRegionId(acceptingRegion)
.acceptingVpcId(acceptingNetwork.id())
.description(name)
.build(), CustomResourceOptions.builder()
.provider(alicloud.local())
.build());
var defaultPeerConnectionAccepter = new PeerConnectionAccepter("defaultPeerConnectionAccepter", PeerConnectionAccepterArgs.builder()
.instanceId(defaultPeerConnection.id())
.build(), CustomResourceOptions.builder()
.provider(alicloud.accepting())
.build());
}
}

Import

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

$ pulumi import alicloud:vpc/peerConnectionAccepter:PeerConnectionAccepter example <id>

Properties

Link copied to clipboard
val acceptingOwnerUid: Output<Int>

The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.-Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.-Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.> If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

Link copied to clipboard

The region ID of the recipient of the VPC peering connection to be created.-When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.-When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.

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
val instanceId: Output<String>

The ID of the instance of the created VPC peer connection.

Link copied to clipboard

The name of the resource

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

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