1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. HaVip
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.HaVip

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a HA VIP.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = new tencentcloud.HaVip("foo", {
        subnetId: "subnet-4d4m4cd4s",
        vip: "10.0.4.16",
        vpcId: "vpc-gzea3dd7",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.HaVip("foo",
        subnet_id="subnet-4d4m4cd4s",
        vip="10.0.4.16",
        vpc_id="vpc-gzea3dd7")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewHaVip(ctx, "foo", &tencentcloud.HaVipArgs{
    			SubnetId: pulumi.String("subnet-4d4m4cd4s"),
    			Vip:      pulumi.String("10.0.4.16"),
    			VpcId:    pulumi.String("vpc-gzea3dd7"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Tencentcloud.HaVip("foo", new()
        {
            SubnetId = "subnet-4d4m4cd4s",
            Vip = "10.0.4.16",
            VpcId = "vpc-gzea3dd7",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.HaVip;
    import com.pulumi.tencentcloud.HaVipArgs;
    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) {
            var foo = new HaVip("foo", HaVipArgs.builder()
                .subnetId("subnet-4d4m4cd4s")
                .vip("10.0.4.16")
                .vpcId("vpc-gzea3dd7")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: tencentcloud:HaVip
        properties:
          subnetId: subnet-4d4m4cd4s
          vip: 10.0.4.16
          vpcId: vpc-gzea3dd7
    

    Create HaVip Resource

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

    Constructor syntax

    new HaVip(name: string, args: HaVipArgs, opts?: CustomResourceOptions);
    @overload
    def HaVip(resource_name: str,
              args: HaVipArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def HaVip(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              subnet_id: Optional[str] = None,
              vpc_id: Optional[str] = None,
              ha_vip_id: Optional[str] = None,
              name: Optional[str] = None,
              vip: Optional[str] = None)
    func NewHaVip(ctx *Context, name string, args HaVipArgs, opts ...ResourceOption) (*HaVip, error)
    public HaVip(string name, HaVipArgs args, CustomResourceOptions? opts = null)
    public HaVip(String name, HaVipArgs args)
    public HaVip(String name, HaVipArgs args, CustomResourceOptions options)
    
    type: tencentcloud:HaVip
    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 HaVipArgs
    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 HaVipArgs
    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 HaVipArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HaVipArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HaVipArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    HaVip Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The HaVip resource accepts the following input properties:

    SubnetId string
    Subnet ID.
    VpcId string
    VPC ID.
    HaVipId string
    ID of the resource.
    Name string
    Name of the HA VIP. The length of character is limited to 1-60.
    Vip string
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    SubnetId string
    Subnet ID.
    VpcId string
    VPC ID.
    HaVipId string
    ID of the resource.
    Name string
    Name of the HA VIP. The length of character is limited to 1-60.
    Vip string
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    subnetId String
    Subnet ID.
    vpcId String
    VPC ID.
    haVipId String
    ID of the resource.
    name String
    Name of the HA VIP. The length of character is limited to 1-60.
    vip String
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    subnetId string
    Subnet ID.
    vpcId string
    VPC ID.
    haVipId string
    ID of the resource.
    name string
    Name of the HA VIP. The length of character is limited to 1-60.
    vip string
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    subnet_id str
    Subnet ID.
    vpc_id str
    VPC ID.
    ha_vip_id str
    ID of the resource.
    name str
    Name of the HA VIP. The length of character is limited to 1-60.
    vip str
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    subnetId String
    Subnet ID.
    vpcId String
    VPC ID.
    haVipId String
    ID of the resource.
    name String
    Name of the HA VIP. The length of character is limited to 1-60.
    vip String
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.

    Outputs

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

    AddressIp string
    EIP that is associated.
    CreateTime string
    Create time of the HA VIP.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    Instance ID that is associated.
    NetworkInterfaceId string
    Network interface ID that is associated.
    State string
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    AddressIp string
    EIP that is associated.
    CreateTime string
    Create time of the HA VIP.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    Instance ID that is associated.
    NetworkInterfaceId string
    Network interface ID that is associated.
    State string
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    addressIp String
    EIP that is associated.
    createTime String
    Create time of the HA VIP.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    Instance ID that is associated.
    networkInterfaceId String
    Network interface ID that is associated.
    state String
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    addressIp string
    EIP that is associated.
    createTime string
    Create time of the HA VIP.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceId string
    Instance ID that is associated.
    networkInterfaceId string
    Network interface ID that is associated.
    state string
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    address_ip str
    EIP that is associated.
    create_time str
    Create time of the HA VIP.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_id str
    Instance ID that is associated.
    network_interface_id str
    Network interface ID that is associated.
    state str
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    addressIp String
    EIP that is associated.
    createTime String
    Create time of the HA VIP.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    Instance ID that is associated.
    networkInterfaceId String
    Network interface ID that is associated.
    state String
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.

    Look up Existing HaVip Resource

    Get an existing HaVip 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?: HaVipState, opts?: CustomResourceOptions): HaVip
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address_ip: Optional[str] = None,
            create_time: Optional[str] = None,
            ha_vip_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            name: Optional[str] = None,
            network_interface_id: Optional[str] = None,
            state: Optional[str] = None,
            subnet_id: Optional[str] = None,
            vip: Optional[str] = None,
            vpc_id: Optional[str] = None) -> HaVip
    func GetHaVip(ctx *Context, name string, id IDInput, state *HaVipState, opts ...ResourceOption) (*HaVip, error)
    public static HaVip Get(string name, Input<string> id, HaVipState? state, CustomResourceOptions? opts = null)
    public static HaVip get(String name, Output<String> id, HaVipState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:HaVip    get:      id: ${id}
    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:
    AddressIp string
    EIP that is associated.
    CreateTime string
    Create time of the HA VIP.
    HaVipId string
    ID of the resource.
    InstanceId string
    Instance ID that is associated.
    Name string
    Name of the HA VIP. The length of character is limited to 1-60.
    NetworkInterfaceId string
    Network interface ID that is associated.
    State string
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    SubnetId string
    Subnet ID.
    Vip string
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    VpcId string
    VPC ID.
    AddressIp string
    EIP that is associated.
    CreateTime string
    Create time of the HA VIP.
    HaVipId string
    ID of the resource.
    InstanceId string
    Instance ID that is associated.
    Name string
    Name of the HA VIP. The length of character is limited to 1-60.
    NetworkInterfaceId string
    Network interface ID that is associated.
    State string
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    SubnetId string
    Subnet ID.
    Vip string
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    VpcId string
    VPC ID.
    addressIp String
    EIP that is associated.
    createTime String
    Create time of the HA VIP.
    haVipId String
    ID of the resource.
    instanceId String
    Instance ID that is associated.
    name String
    Name of the HA VIP. The length of character is limited to 1-60.
    networkInterfaceId String
    Network interface ID that is associated.
    state String
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    subnetId String
    Subnet ID.
    vip String
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    vpcId String
    VPC ID.
    addressIp string
    EIP that is associated.
    createTime string
    Create time of the HA VIP.
    haVipId string
    ID of the resource.
    instanceId string
    Instance ID that is associated.
    name string
    Name of the HA VIP. The length of character is limited to 1-60.
    networkInterfaceId string
    Network interface ID that is associated.
    state string
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    subnetId string
    Subnet ID.
    vip string
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    vpcId string
    VPC ID.
    address_ip str
    EIP that is associated.
    create_time str
    Create time of the HA VIP.
    ha_vip_id str
    ID of the resource.
    instance_id str
    Instance ID that is associated.
    name str
    Name of the HA VIP. The length of character is limited to 1-60.
    network_interface_id str
    Network interface ID that is associated.
    state str
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    subnet_id str
    Subnet ID.
    vip str
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    vpc_id str
    VPC ID.
    addressIp String
    EIP that is associated.
    createTime String
    Create time of the HA VIP.
    haVipId String
    ID of the resource.
    instanceId String
    Instance ID that is associated.
    name String
    Name of the HA VIP. The length of character is limited to 1-60.
    networkInterfaceId String
    Network interface ID that is associated.
    state String
    State of the HA VIP. Valid value: AVAILABLE, UNBIND.
    subnetId String
    Subnet ID.
    vip String
    Virtual IP address, it must not be occupied and in this VPC network segment. If not set, it will be assigned after resource created automatically.
    vpcId String
    VPC ID.

    Import

    HA VIP can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/haVip:HaVip foo havip-kjqwe4ba
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack