1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. HAVipAttachment
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

alicloud.vpc.HAVipAttachment

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const default = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const example = _default.then(_default => alicloud.ecs.getInstanceTypes({
        availabilityZone: _default.zones?.[0]?.id,
        cpuCoreCount: 1,
        memorySize: 2,
    }));
    const exampleGetImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_[0-9]+_[0-9]+_x64*",
        owners: "system",
    });
    const exampleNetwork = new alicloud.vpc.Network("example", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const exampleSwitch = new alicloud.vpc.Switch("example", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: exampleNetwork.id,
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
    });
    const exampleHAVip = new alicloud.vpc.HAVip("example", {
        vswitchId: exampleSwitch.id,
        description: name,
    });
    const exampleSecurityGroup = new alicloud.ecs.SecurityGroup("example", {
        name: name,
        description: name,
        vpcId: exampleNetwork.id,
    });
    const exampleInstance = new alicloud.ecs.Instance("example", {
        availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
        vswitchId: exampleSwitch.id,
        imageId: exampleGetImages.then(exampleGetImages => exampleGetImages.images?.[0]?.id),
        instanceType: example.then(example => example.instanceTypes?.[0]?.id),
        systemDiskCategory: "cloud_efficiency",
        internetChargeType: "PayByTraffic",
        internetMaxBandwidthOut: 5,
        securityGroups: [exampleSecurityGroup.id],
        instanceName: name,
        userData: "echo 'net.ipv4.ip_forward=1'>> /etc/sysctl.conf",
    });
    const exampleHAVipAttachment = new alicloud.vpc.HAVipAttachment("example", {
        havipId: exampleHAVip.id,
        instanceId: exampleInstance.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    example = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
        cpu_core_count=1,
        memory_size=2)
    example_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
        owners="system")
    example_network = alicloud.vpc.Network("example",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    example_switch = alicloud.vpc.Switch("example",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=example_network.id,
        zone_id=default.zones[0].id)
    example_ha_vip = alicloud.vpc.HAVip("example",
        vswitch_id=example_switch.id,
        description=name)
    example_security_group = alicloud.ecs.SecurityGroup("example",
        name=name,
        description=name,
        vpc_id=example_network.id)
    example_instance = alicloud.ecs.Instance("example",
        availability_zone=default.zones[0].id,
        vswitch_id=example_switch.id,
        image_id=example_get_images.images[0].id,
        instance_type=example.instance_types[0].id,
        system_disk_category="cloud_efficiency",
        internet_charge_type="PayByTraffic",
        internet_max_bandwidth_out=5,
        security_groups=[example_security_group.id],
        instance_name=name,
        user_data="echo 'net.ipv4.ip_forward=1'>> /etc/sysctl.conf")
    example_ha_vip_attachment = alicloud.vpc.HAVipAttachment("example",
        havip_id=example_ha_vip.id,
        instance_id=example_instance.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		example, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
    			CpuCoreCount:     pulumi.IntRef(1),
    			MemorySize:       pulumi.Float64Ref(2),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex: pulumi.StringRef("^ubuntu_[0-9]+_[0-9]+_x64*"),
    			Owners:    pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleNetwork, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSwitch, err := vpc.NewSwitch(ctx, "example", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       exampleNetwork.ID(),
    			ZoneId:      pulumi.String(_default.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		exampleHAVip, err := vpc.NewHAVip(ctx, "example", &vpc.HAVipArgs{
    			VswitchId:   exampleSwitch.ID(),
    			Description: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSecurityGroup, err := ecs.NewSecurityGroup(ctx, "example", &ecs.SecurityGroupArgs{
    			Name:        pulumi.String(name),
    			Description: pulumi.String(name),
    			VpcId:       exampleNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := ecs.NewInstance(ctx, "example", &ecs.InstanceArgs{
    			AvailabilityZone:        pulumi.String(_default.Zones[0].Id),
    			VswitchId:               exampleSwitch.ID(),
    			ImageId:                 pulumi.String(exampleGetImages.Images[0].Id),
    			InstanceType:            pulumi.String(example.InstanceTypes[0].Id),
    			SystemDiskCategory:      pulumi.String("cloud_efficiency"),
    			InternetChargeType:      pulumi.String("PayByTraffic"),
    			InternetMaxBandwidthOut: pulumi.Int(5),
    			SecurityGroups: pulumi.StringArray{
    				exampleSecurityGroup.ID(),
    			},
    			InstanceName: pulumi.String(name),
    			UserData:     pulumi.String("echo 'net.ipv4.ip_forward=1'>> /etc/sysctl.conf"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewHAVipAttachment(ctx, "example", &vpc.HAVipAttachmentArgs{
    			HavipId:    exampleHAVip.ID(),
    			InstanceId: exampleInstance.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var example = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            CpuCoreCount = 1,
            MemorySize = 2,
        });
    
        var exampleGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_[0-9]+_[0-9]+_x64*",
            Owners = "system",
        });
    
        var exampleNetwork = new AliCloud.Vpc.Network("example", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var exampleSwitch = new AliCloud.Vpc.Switch("example", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = exampleNetwork.Id,
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        });
    
        var exampleHAVip = new AliCloud.Vpc.HAVip("example", new()
        {
            VswitchId = exampleSwitch.Id,
            Description = name,
        });
    
        var exampleSecurityGroup = new AliCloud.Ecs.SecurityGroup("example", new()
        {
            Name = name,
            Description = name,
            VpcId = exampleNetwork.Id,
        });
    
        var exampleInstance = new AliCloud.Ecs.Instance("example", new()
        {
            AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            VswitchId = exampleSwitch.Id,
            ImageId = exampleGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = example.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SystemDiskCategory = "cloud_efficiency",
            InternetChargeType = "PayByTraffic",
            InternetMaxBandwidthOut = 5,
            SecurityGroups = new[]
            {
                exampleSecurityGroup.Id,
            },
            InstanceName = name,
            UserData = "echo 'net.ipv4.ip_forward=1'>> /etc/sysctl.conf",
        });
    
        var exampleHAVipAttachment = new AliCloud.Vpc.HAVipAttachment("example", new()
        {
            HavipId = exampleHAVip.Id,
            InstanceId = exampleInstance.Id,
        });
    
    });
    
    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.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.vpc.HAVip;
    import com.pulumi.alicloud.vpc.HAVipArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.vpc.HAVipAttachment;
    import com.pulumi.alicloud.vpc.HAVipAttachmentArgs;
    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("terraform-example");
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var example = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .cpuCoreCount(1)
                .memorySize(2)
                .build());
    
            final var exampleGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_[0-9]+_[0-9]+_x64*")
                .owners("system")
                .build());
    
            var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var exampleSwitch = new Switch("exampleSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.0.0/24")
                .vpcId(exampleNetwork.id())
                .zoneId(default_.zones()[0].id())
                .build());
    
            var exampleHAVip = new HAVip("exampleHAVip", HAVipArgs.builder()
                .vswitchId(exampleSwitch.id())
                .description(name)
                .build());
    
            var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .description(name)
                .vpcId(exampleNetwork.id())
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .vswitchId(exampleSwitch.id())
                .imageId(exampleGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(example.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .systemDiskCategory("cloud_efficiency")
                .internetChargeType("PayByTraffic")
                .internetMaxBandwidthOut(5)
                .securityGroups(exampleSecurityGroup.id())
                .instanceName(name)
                .userData("echo 'net.ipv4.ip_forward=1'>> /etc/sysctl.conf")
                .build());
    
            var exampleHAVipAttachment = new HAVipAttachment("exampleHAVipAttachment", HAVipAttachmentArgs.builder()
                .havipId(exampleHAVip.id())
                .instanceId(exampleInstance.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      exampleNetwork:
        type: alicloud:vpc:Network
        name: example
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      exampleSwitch:
        type: alicloud:vpc:Switch
        name: example
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${exampleNetwork.id}
          zoneId: ${default.zones[0].id}
      exampleHAVip:
        type: alicloud:vpc:HAVip
        name: example
        properties:
          vswitchId: ${exampleSwitch.id}
          description: ${name}
      exampleSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: example
        properties:
          name: ${name}
          description: ${name}
          vpcId: ${exampleNetwork.id}
      exampleInstance:
        type: alicloud:ecs:Instance
        name: example
        properties:
          availabilityZone: ${default.zones[0].id}
          vswitchId: ${exampleSwitch.id}
          imageId: ${exampleGetImages.images[0].id}
          instanceType: ${example.instanceTypes[0].id}
          systemDiskCategory: cloud_efficiency
          internetChargeType: PayByTraffic
          internetMaxBandwidthOut: 5
          securityGroups:
            - ${exampleSecurityGroup.id}
          instanceName: ${name}
          userData: echo 'net.ipv4.ip_forward=1'>> /etc/sysctl.conf
      exampleHAVipAttachment:
        type: alicloud:vpc:HAVipAttachment
        name: example
        properties:
          havipId: ${exampleHAVip.id}
          instanceId: ${exampleInstance.id}
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
      example:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${default.zones[0].id}
            cpuCoreCount: 1
            memorySize: 2
      exampleGetImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            nameRegex: ^ubuntu_[0-9]+_[0-9]+_x64*
            owners: system
    

    Create HAVipAttachment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new HAVipAttachment(name: string, args: HAVipAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def HAVipAttachment(resource_name: str,
                        args: HAVipAttachmentArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def HAVipAttachment(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        instance_id: Optional[str] = None,
                        force: Optional[bool] = None,
                        ha_vip_id: Optional[str] = None,
                        havip_id: Optional[str] = None,
                        instance_type: Optional[str] = None)
    func NewHAVipAttachment(ctx *Context, name string, args HAVipAttachmentArgs, opts ...ResourceOption) (*HAVipAttachment, error)
    public HAVipAttachment(string name, HAVipAttachmentArgs args, CustomResourceOptions? opts = null)
    public HAVipAttachment(String name, HAVipAttachmentArgs args)
    public HAVipAttachment(String name, HAVipAttachmentArgs args, CustomResourceOptions options)
    
    type: alicloud:vpc:HAVipAttachment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args HAVipAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args HAVipAttachmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args HAVipAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HAVipAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HAVipAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var havipAttachmentResource = new AliCloud.Vpc.HAVipAttachment("havipAttachmentResource", new()
    {
        InstanceId = "string",
        Force = false,
        HaVipId = "string",
        InstanceType = "string",
    });
    
    example, err := vpc.NewHAVipAttachment(ctx, "havipAttachmentResource", &vpc.HAVipAttachmentArgs{
    	InstanceId:   pulumi.String("string"),
    	Force:        pulumi.Bool(false),
    	HaVipId:      pulumi.String("string"),
    	InstanceType: pulumi.String("string"),
    })
    
    var havipAttachmentResource = new HAVipAttachment("havipAttachmentResource", HAVipAttachmentArgs.builder()
        .instanceId("string")
        .force(false)
        .haVipId("string")
        .instanceType("string")
        .build());
    
    havip_attachment_resource = alicloud.vpc.HAVipAttachment("havipAttachmentResource",
        instance_id="string",
        force=False,
        ha_vip_id="string",
        instance_type="string")
    
    const havipAttachmentResource = new alicloud.vpc.HAVipAttachment("havipAttachmentResource", {
        instanceId: "string",
        force: false,
        haVipId: "string",
        instanceType: "string",
    });
    
    type: alicloud:vpc:HAVipAttachment
    properties:
        force: false
        haVipId: string
        instanceId: string
        instanceType: string
    

    HAVipAttachment Resource Properties

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

    Inputs

    The HAVipAttachment resource accepts the following input properties:

    InstanceId string
    The ID of the ECS instance bound to the HaVip instance.
    Force bool

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    HaVipId string
    The ID of the HaVip instance.
    HavipId string
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    InstanceType string

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    InstanceId string
    The ID of the ECS instance bound to the HaVip instance.
    Force bool

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    HaVipId string
    The ID of the HaVip instance.
    HavipId string
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    InstanceType string

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    instanceId String
    The ID of the ECS instance bound to the HaVip instance.
    force Boolean

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    haVipId String
    The ID of the HaVip instance.
    havipId String
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    instanceType String

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    instanceId string
    The ID of the ECS instance bound to the HaVip instance.
    force boolean

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    haVipId string
    The ID of the HaVip instance.
    havipId string
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    instanceType string

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    instance_id str
    The ID of the ECS instance bound to the HaVip instance.
    force bool

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    ha_vip_id str
    The ID of the HaVip instance.
    havip_id str
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    instance_type str

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    instanceId String
    The ID of the ECS instance bound to the HaVip instance.
    force Boolean

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    haVipId String
    The ID of the HaVip instance.
    havipId String
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    instanceType String

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.

    Look up Existing HAVipAttachment Resource

    Get an existing HAVipAttachment 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?: HAVipAttachmentState, opts?: CustomResourceOptions): HAVipAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            force: Optional[bool] = None,
            ha_vip_id: Optional[str] = None,
            havip_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_type: Optional[str] = None,
            status: Optional[str] = None) -> HAVipAttachment
    func GetHAVipAttachment(ctx *Context, name string, id IDInput, state *HAVipAttachmentState, opts ...ResourceOption) (*HAVipAttachment, error)
    public static HAVipAttachment Get(string name, Input<string> id, HAVipAttachmentState? state, CustomResourceOptions? opts = null)
    public static HAVipAttachment get(String name, Output<String> id, HAVipAttachmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    Force bool

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    HaVipId string
    The ID of the HaVip instance.
    HavipId string
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    InstanceId string
    The ID of the ECS instance bound to the HaVip instance.
    InstanceType string

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    Status string
    The status of the resource.
    Force bool

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    HaVipId string
    The ID of the HaVip instance.
    HavipId string
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    InstanceId string
    The ID of the ECS instance bound to the HaVip instance.
    InstanceType string

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    Status string
    The status of the resource.
    force Boolean

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    haVipId String
    The ID of the HaVip instance.
    havipId String
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    instanceId String
    The ID of the ECS instance bound to the HaVip instance.
    instanceType String

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    status String
    The status of the resource.
    force boolean

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    haVipId string
    The ID of the HaVip instance.
    havipId string
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    instanceId string
    The ID of the ECS instance bound to the HaVip instance.
    instanceType string

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    status string
    The status of the resource.
    force bool

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    ha_vip_id str
    The ID of the HaVip instance.
    havip_id str
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    instance_id str
    The ID of the ECS instance bound to the HaVip instance.
    instance_type str

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    status str
    The status of the resource.
    force Boolean

    Whether to force the ECS instance or Eni instance bound to AVIP to be unbound. The value is:

    • True: Force unbinding.
    • False (default): unbinding is not forced.

    NOTE: If the value of this parameter is False, the Master instance bound to HaVip cannot be unbound.

    haVipId String
    The ID of the HaVip instance.
    havipId String
    . Field 'havip_id' has been deprecated from provider version 1.211.0. New field 'ha_vip_id' instead.

    Deprecated: Field 'havip_id' has been deprecated since provider version 1.211.0. New field 'ha_vip_id' instead.

    instanceId String
    The ID of the ECS instance bound to the HaVip instance.
    instanceType String

    The type of the instance associated with the VIIP.

    The following arguments will be discarded. Please use new fields as soon as possible:

    status String
    The status of the resource.

    Import

    VPC Ha Vip Attachment can be imported using the id, e.g.

    $ pulumi import alicloud:vpc/hAVipAttachment:HAVipAttachment example <ha_vip_id>:<instance_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi