tencentcloud.HaVip
Explore with Pulumi AI
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)
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:
- Subnet
Id string - Subnet ID.
- Vpc
Id string - VPC ID.
- Ha
Vip stringId - 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 string - Subnet ID.
- Vpc
Id string - VPC ID.
- Ha
Vip stringId - 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 String - Subnet ID.
- vpc
Id String - VPC ID.
- ha
Vip StringId - 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 string - Subnet ID.
- vpc
Id string - VPC ID.
- ha
Vip stringId - 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 String - Subnet ID.
- vpc
Id String - VPC ID.
- ha
Vip StringId - 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:
- Address
Ip string - EIP that is associated.
- Create
Time string - Create time of the HA VIP.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Instance ID that is associated.
- Network
Interface stringId - Network interface ID that is associated.
- State string
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
.
- Address
Ip string - EIP that is associated.
- Create
Time string - Create time of the HA VIP.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Instance ID that is associated.
- Network
Interface stringId - Network interface ID that is associated.
- State string
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
.
- address
Ip String - EIP that is associated.
- create
Time String - Create time of the HA VIP.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - Instance ID that is associated.
- network
Interface StringId - Network interface ID that is associated.
- state String
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
.
- address
Ip string - EIP that is associated.
- create
Time string - Create time of the HA VIP.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - Instance ID that is associated.
- network
Interface stringId - 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_ strid - Network interface ID that is associated.
- state str
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
.
- address
Ip String - EIP that is associated.
- create
Time String - Create time of the HA VIP.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - Instance ID that is associated.
- network
Interface StringId - 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.
- Address
Ip string - EIP that is associated.
- Create
Time string - Create time of the HA VIP.
- Ha
Vip stringId - ID of the resource.
- Instance
Id string - Instance ID that is associated.
- Name string
- Name of the HA VIP. The length of character is limited to 1-60.
- Network
Interface stringId - Network interface ID that is associated.
- State string
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
. - Subnet
Id 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.
- Vpc
Id string - VPC ID.
- Address
Ip string - EIP that is associated.
- Create
Time string - Create time of the HA VIP.
- Ha
Vip stringId - ID of the resource.
- Instance
Id string - Instance ID that is associated.
- Name string
- Name of the HA VIP. The length of character is limited to 1-60.
- Network
Interface stringId - Network interface ID that is associated.
- State string
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
. - Subnet
Id 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.
- Vpc
Id string - VPC ID.
- address
Ip String - EIP that is associated.
- create
Time String - Create time of the HA VIP.
- ha
Vip StringId - ID of the resource.
- instance
Id String - Instance ID that is associated.
- name String
- Name of the HA VIP. The length of character is limited to 1-60.
- network
Interface StringId - Network interface ID that is associated.
- state String
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
. - subnet
Id 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.
- vpc
Id String - VPC ID.
- address
Ip string - EIP that is associated.
- create
Time string - Create time of the HA VIP.
- ha
Vip stringId - ID of the resource.
- instance
Id string - Instance ID that is associated.
- name string
- Name of the HA VIP. The length of character is limited to 1-60.
- network
Interface stringId - Network interface ID that is associated.
- state string
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
. - subnet
Id 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.
- vpc
Id string - VPC ID.
- address_
ip str - EIP that is associated.
- create_
time str - Create time of the HA VIP.
- ha_
vip_ strid - 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_ strid - 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.
- address
Ip String - EIP that is associated.
- create
Time String - Create time of the HA VIP.
- ha
Vip StringId - ID of the resource.
- instance
Id String - Instance ID that is associated.
- name String
- Name of the HA VIP. The length of character is limited to 1-60.
- network
Interface StringId - Network interface ID that is associated.
- state String
- State of the HA VIP. Valid value:
AVAILABLE
,UNBIND
. - subnet
Id 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.
- vpc
Id 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.