InstanceAttachmentArgs

data class InstanceAttachmentArgs(val cenOwnerId: Output<Int>? = null, val childInstanceId: Output<String>? = null, val childInstanceOwnerId: Output<Int>? = null, val childInstanceRegionId: Output<String>? = null, val childInstanceType: Output<String>? = null, val instanceId: Output<String>? = null) : ConvertibleToJava<InstanceAttachmentArgs>

Provides a CEN child instance attachment resource that associate the network(VPC, CCN, VBR) with the CEN instance. ->NOTE: Available in 1.42.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.cen.Instance;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.cen.InstanceAttachment;
import com.pulumi.alicloud.cen.InstanceAttachmentArgs;
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-testAccCenInstanceAttachmentBasic");
var cen = new Instance("cen", InstanceArgs.builder()
.description("terraform01")
.build());
var vpc = new Network("vpc", NetworkArgs.builder()
.cidrBlock("192.168.0.0/16")
.build());
var foo = new InstanceAttachment("foo", InstanceAttachmentArgs.builder()
.instanceId(cen.id())
.childInstanceId(vpc.id())
.childInstanceType("VPC")
.childInstanceRegionId("cn-beijing")
.build());
}
}

Import

CEN instance can be imported using the id, e.g.

$ pulumi import alicloud:cen/instanceAttachment:InstanceAttachment example cen-m7i7pjmkon********:vpc-2ze2w07mcy9nz********:VPC:cn-beijing

Constructors

Link copied to clipboard
fun InstanceAttachmentArgs(cenOwnerId: Output<Int>? = null, childInstanceId: Output<String>? = null, childInstanceOwnerId: Output<Int>? = null, childInstanceRegionId: Output<String>? = null, childInstanceType: Output<String>? = null, instanceId: Output<String>? = null)

Functions

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

Properties

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

The account ID to which the CEN instance belongs.

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

The ID of the child instance to attach.

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

The uid of the child instance. Only used when attach a child instance of other account.

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

The region ID of the child instance to attach.

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

The type of the associated network. Valid values: VPC, VBR and CCN.

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

The ID of the CEN.