InstanceAttachment

This resource will help you to bind a VPC to an OTS instance.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        // Create an OTS instance
        var fooInstance = new AliCloud.Ots.Instance("fooInstance", new AliCloud.Ots.InstanceArgs
        {
            AccessedBy = "Vpc",
            Description = "for table",
            Tags = 
            {
                { "Created", "TF" },
                { "For", "Building table" },
            },
        });
        var fooZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
        {
            AvailableResourceCreation = "VSwitch",
        }));
        var fooNetwork = new AliCloud.Vpc.Network("fooNetwork", new AliCloud.Vpc.NetworkArgs
        {
            CidrBlock = "172.16.0.0/16",
        });
        var fooSwitch = new AliCloud.Vpc.Switch("fooSwitch", new AliCloud.Vpc.SwitchArgs
        {
            AvailabilityZone = fooZones.Apply(fooZones => fooZones.Zones[0].Id),
            CidrBlock = "172.16.1.0/24",
            VpcId = fooNetwork.Id,
        });
        var fooInstanceAttachment = new AliCloud.Ots.InstanceAttachment("fooInstanceAttachment", new AliCloud.Ots.InstanceAttachmentArgs
        {
            InstanceName = fooInstance.Name,
            VpcName = "attachment1",
            VswitchId = fooSwitch.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

# Create an OTS instance
foo_instance = alicloud.ots.Instance("fooInstance",
    accessed_by="Vpc",
    description="for table",
    tags={
        "Created": "TF",
        "For": "Building table",
    })
foo_zones = alicloud.get_zones(available_resource_creation="VSwitch")
foo_network = alicloud.vpc.Network("fooNetwork", cidr_block="172.16.0.0/16")
foo_switch = alicloud.vpc.Switch("fooSwitch",
    availability_zone=foo_zones.zones[0]["id"],
    cidr_block="172.16.1.0/24",
    vpc_id=foo_network.id)
foo_instance_attachment = alicloud.ots.InstanceAttachment("fooInstanceAttachment",
    instance_name=foo_instance.name,
    vpc_name="attachment1",
    vswitch_id=foo_switch.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Create an OTS instance
const fooInstance = new alicloud.ots.Instance("foo", {
    accessedBy: "Vpc",
    description: "for table",
    tags: {
        Created: "TF",
        For: "Building table",
    },
});
const fooZones = pulumi.output(alicloud.getZones({
    availableResourceCreation: "VSwitch",
}, { async: true }));
const fooNetwork = new alicloud.vpc.Network("foo", {
    cidrBlock: "172.16.0.0/16",
});
const fooSwitch = new alicloud.vpc.Switch("foo", {
    availabilityZone: fooZones.zones[0].id,
    cidrBlock: "172.16.1.0/24",
    vpcId: fooNetwork.id,
});
const fooInstanceAttachment = new alicloud.ots.InstanceAttachment("foo", {
    instanceName: fooInstance.name,
    vpcName: "attachment1",
    vswitchId: fooSwitch.id,
});

Create a InstanceAttachment Resource

def InstanceAttachment(resource_name, opts=None, instance_name=None, vpc_name=None, vswitch_id=None, __props__=None);
name string
The unique name of the resource.
args InstanceAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args InstanceAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InstanceAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

InstanceAttachment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The InstanceAttachment resource accepts the following input properties:

InstanceName string

The name of the OTS instance.

VpcName string

The name of attaching VPC to instance.

VswitchId string

The ID of attaching VSwitch to instance.

InstanceName string

The name of the OTS instance.

VpcName string

The name of attaching VPC to instance.

VswitchId string

The ID of attaching VSwitch to instance.

instanceName string

The name of the OTS instance.

vpcName string

The name of attaching VPC to instance.

vswitchId string

The ID of attaching VSwitch to instance.

instance_name str

The name of the OTS instance.

vpc_name str

The name of attaching VPC to instance.

vswitch_id str

The ID of attaching VSwitch to instance.

Outputs

All input properties are implicitly available as output properties. Additionally, the InstanceAttachment resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
VpcId string

The ID of attaching VPC to instance.

Id string
The provider-assigned unique ID for this managed resource.
VpcId string

The ID of attaching VPC to instance.

id string
The provider-assigned unique ID for this managed resource.
vpcId string

The ID of attaching VPC to instance.

id str
The provider-assigned unique ID for this managed resource.
vpc_id str

The ID of attaching VPC to instance.

Look up an Existing InstanceAttachment Resource

Get an existing InstanceAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: InstanceAttachmentState, opts?: CustomResourceOptions): InstanceAttachment
static get(resource_name, id, opts=None, instance_name=None, vpc_id=None, vpc_name=None, vswitch_id=None, __props__=None);
func GetInstanceAttachment(ctx *Context, name string, id IDInput, state *InstanceAttachmentState, opts ...ResourceOption) (*InstanceAttachment, error)
public static InstanceAttachment Get(string name, Input<string> id, InstanceAttachmentState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

InstanceName string

The name of the OTS instance.

VpcId string

The ID of attaching VPC to instance.

VpcName string

The name of attaching VPC to instance.

VswitchId string

The ID of attaching VSwitch to instance.

InstanceName string

The name of the OTS instance.

VpcId string

The ID of attaching VPC to instance.

VpcName string

The name of attaching VPC to instance.

VswitchId string

The ID of attaching VSwitch to instance.

instanceName string

The name of the OTS instance.

vpcId string

The ID of attaching VPC to instance.

vpcName string

The name of attaching VPC to instance.

vswitchId string

The ID of attaching VSwitch to instance.

instance_name str

The name of the OTS instance.

vpc_id str

The ID of attaching VPC to instance.

vpc_name str

The name of attaching VPC to instance.

vswitch_id str

The ID of attaching VSwitch to instance.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.