alicloud.vpc.HAVip
Explore with Pulumi AI
Import
The havip can be imported using the id, e.g.
$ pulumi import alicloud:vpc/hAVip:HAVip foo havip-abc123456
Example Usage
Basic Usage
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") ?? "tf-example";
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "VSwitch",
});
var exampleNetwork = new AliCloud.Vpc.Network("exampleNetwork", new()
{
VpcName = name,
CidrBlock = "10.4.0.0/16",
});
var exampleSwitch = new AliCloud.Vpc.Switch("exampleSwitch", 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("exampleHAVip", new()
{
VswitchId = exampleSwitch.Id,
Description = name,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"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 := "tf-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
}
exampleNetwork, err := vpc.NewNetwork(ctx, "exampleNetwork", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/16"),
})
if err != nil {
return err
}
exampleSwitch, err := vpc.NewSwitch(ctx, "exampleSwitch", &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
}
_, err = vpc.NewHAVip(ctx, "exampleHAVip", &vpc.HAVipArgs{
VswitchId: exampleSwitch.ID(),
Description: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
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.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 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-example");
final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.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());
}
}
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.get_zones(available_resource_creation="VSwitch")
example_network = alicloud.vpc.Network("exampleNetwork",
vpc_name=name,
cidr_block="10.4.0.0/16")
example_switch = alicloud.vpc.Switch("exampleSwitch",
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("exampleHAVip",
vswitch_id=example_switch.id,
description=name)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const default = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const exampleNetwork = new alicloud.vpc.Network("exampleNetwork", {
vpcName: name,
cidrBlock: "10.4.0.0/16",
});
const exampleSwitch = new alicloud.vpc.Switch("exampleSwitch", {
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("exampleHAVip", {
vswitchId: exampleSwitch.id,
description: name,
});
configuration:
name:
type: string
default: tf-example
resources:
exampleNetwork:
type: alicloud:vpc:Network
properties:
vpcName: ${name}
cidrBlock: 10.4.0.0/16
exampleSwitch:
type: alicloud:vpc:Switch
properties:
vswitchName: ${name}
cidrBlock: 10.4.0.0/24
vpcId: ${exampleNetwork.id}
zoneId: ${default.zones[0].id}
exampleHAVip:
type: alicloud:vpc:HAVip
properties:
vswitchId: ${exampleSwitch.id}
description: ${name}
variables:
default:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: VSwitch
Create HAVip Resource
new HAVip(name: string, args: HAVipArgs, opts?: CustomResourceOptions);
@overload
def HAVip(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
ha_vip_name: Optional[str] = None,
havip_name: Optional[str] = None,
ip_address: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
vswitch_id: Optional[str] = None)
@overload
def HAVip(resource_name: str,
args: HAVipArgs,
opts: Optional[ResourceOptions] = None)
func NewHAVip(ctx *Context, name string, args HAVipArgs, opts ...ResourceOption) (*HAVip, error)
public HAVip(string name, HAVipArgs args, CustomResourceOptions? opts = null)
type: alicloud:vpc:HAVip
properties: # The arguments to resource properties.
options: # 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.
- 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
The HAVip resource accepts the following input properties:
- Vswitch
Id string The vswitch_id of the HaVip, the field can't be changed.
- Description string
The description of the HaVip instance.
- Ha
Vip stringName The name of the HAVIP.
- Havip
Name string The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- Ip
Address string The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- Resource
Group stringId The ID of the resource group to which the HAVIP belongs.
- Dictionary<string, object>
The list of tags.
- Vswitch
Id string The vswitch_id of the HaVip, the field can't be changed.
- Description string
The description of the HaVip instance.
- Ha
Vip stringName The name of the HAVIP.
- Havip
Name string The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- Ip
Address string The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- Resource
Group stringId The ID of the resource group to which the HAVIP belongs.
- map[string]interface{}
The list of tags.
- vswitch
Id String The vswitch_id of the HaVip, the field can't be changed.
- description String
The description of the HaVip instance.
- ha
Vip StringName The name of the HAVIP.
- havip
Name String The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- ip
Address String The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- resource
Group StringId The ID of the resource group to which the HAVIP belongs.
- Map<String,Object>
The list of tags.
- vswitch
Id string The vswitch_id of the HaVip, the field can't be changed.
- description string
The description of the HaVip instance.
- ha
Vip stringName The name of the HAVIP.
- havip
Name string The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- ip
Address string The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- resource
Group stringId The ID of the resource group to which the HAVIP belongs.
- {[key: string]: any}
The list of tags.
- vswitch_
id str The vswitch_id of the HaVip, the field can't be changed.
- description str
The description of the HaVip instance.
- ha_
vip_ strname The name of the HAVIP.
- havip_
name str The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- ip_
address str The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- resource_
group_ strid The ID of the resource group to which the HAVIP belongs.
- Mapping[str, Any]
The list of tags.
- vswitch
Id String The vswitch_id of the HaVip, the field can't be changed.
- description String
The description of the HaVip instance.
- ha
Vip StringName The name of the HAVIP.
- havip
Name String The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- ip
Address String The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- resource
Group StringId The ID of the resource group to which the HAVIP belongs.
- Map<Any>
The list of tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the HAVip resource produces the following output properties:
- Associated
Eip List<string>Addresses The elastic IP address (EIP) associated with the HAVIP.
- Associated
Instance stringType The type of the instance with which the HAVIP is associated. Valid values:
- Associated
Instances List<string> The ID of the instance with which the HAVIP is associated.
- Create
Time string The time when the HAVIP was created.
- Ha
Vip stringId The ID of the HAVIP.
- Id string
The provider-assigned unique ID for this managed resource.
- Master
Instance stringId The ID of the active instance that is associated with the HAVIP.
- Status string
(Available in v1.120.0+) The status of the HaVip instance.
- Vpc
Id string The ID of the VPC to which the HAVIP belongs.
- Associated
Eip []stringAddresses The elastic IP address (EIP) associated with the HAVIP.
- Associated
Instance stringType The type of the instance with which the HAVIP is associated. Valid values:
- Associated
Instances []string The ID of the instance with which the HAVIP is associated.
- Create
Time string The time when the HAVIP was created.
- Ha
Vip stringId The ID of the HAVIP.
- Id string
The provider-assigned unique ID for this managed resource.
- Master
Instance stringId The ID of the active instance that is associated with the HAVIP.
- Status string
(Available in v1.120.0+) The status of the HaVip instance.
- Vpc
Id string The ID of the VPC to which the HAVIP belongs.
- associated
Eip List<String>Addresses The elastic IP address (EIP) associated with the HAVIP.
- associated
Instance StringType The type of the instance with which the HAVIP is associated. Valid values:
- associated
Instances List<String> The ID of the instance with which the HAVIP is associated.
- create
Time String The time when the HAVIP was created.
- ha
Vip StringId The ID of the HAVIP.
- id String
The provider-assigned unique ID for this managed resource.
- master
Instance StringId The ID of the active instance that is associated with the HAVIP.
- status String
(Available in v1.120.0+) The status of the HaVip instance.
- vpc
Id String The ID of the VPC to which the HAVIP belongs.
- associated
Eip string[]Addresses The elastic IP address (EIP) associated with the HAVIP.
- associated
Instance stringType The type of the instance with which the HAVIP is associated. Valid values:
- associated
Instances string[] The ID of the instance with which the HAVIP is associated.
- create
Time string The time when the HAVIP was created.
- ha
Vip stringId The ID of the HAVIP.
- id string
The provider-assigned unique ID for this managed resource.
- master
Instance stringId The ID of the active instance that is associated with the HAVIP.
- status string
(Available in v1.120.0+) The status of the HaVip instance.
- vpc
Id string The ID of the VPC to which the HAVIP belongs.
- associated_
eip_ Sequence[str]addresses The elastic IP address (EIP) associated with the HAVIP.
- associated_
instance_ strtype The type of the instance with which the HAVIP is associated. Valid values:
- associated_
instances Sequence[str] The ID of the instance with which the HAVIP is associated.
- create_
time str The time when the HAVIP was created.
- ha_
vip_ strid The ID of the HAVIP.
- id str
The provider-assigned unique ID for this managed resource.
- master_
instance_ strid The ID of the active instance that is associated with the HAVIP.
- status str
(Available in v1.120.0+) The status of the HaVip instance.
- vpc_
id str The ID of the VPC to which the HAVIP belongs.
- associated
Eip List<String>Addresses The elastic IP address (EIP) associated with the HAVIP.
- associated
Instance StringType The type of the instance with which the HAVIP is associated. Valid values:
- associated
Instances List<String> The ID of the instance with which the HAVIP is associated.
- create
Time String The time when the HAVIP was created.
- ha
Vip StringId The ID of the HAVIP.
- id String
The provider-assigned unique ID for this managed resource.
- master
Instance StringId The ID of the active instance that is associated with the HAVIP.
- status String
(Available in v1.120.0+) The status of the HaVip instance.
- vpc
Id String The ID of the VPC to which the HAVIP belongs.
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,
associated_eip_addresses: Optional[Sequence[str]] = None,
associated_instance_type: Optional[str] = None,
associated_instances: Optional[Sequence[str]] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
ha_vip_id: Optional[str] = None,
ha_vip_name: Optional[str] = None,
havip_name: Optional[str] = None,
ip_address: Optional[str] = None,
master_instance_id: Optional[str] = None,
resource_group_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
vpc_id: Optional[str] = None,
vswitch_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)
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.
- Associated
Eip List<string>Addresses The elastic IP address (EIP) associated with the HAVIP.
- Associated
Instance stringType The type of the instance with which the HAVIP is associated. Valid values:
- Associated
Instances List<string> The ID of the instance with which the HAVIP is associated.
- Create
Time string The time when the HAVIP was created.
- Description string
The description of the HaVip instance.
- Ha
Vip stringId The ID of the HAVIP.
- Ha
Vip stringName The name of the HAVIP.
- Havip
Name string The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- Ip
Address string The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- Master
Instance stringId The ID of the active instance that is associated with the HAVIP.
- Resource
Group stringId The ID of the resource group to which the HAVIP belongs.
- Status string
(Available in v1.120.0+) The status of the HaVip instance.
- Dictionary<string, object>
The list of tags.
- Vpc
Id string The ID of the VPC to which the HAVIP belongs.
- Vswitch
Id string The vswitch_id of the HaVip, the field can't be changed.
- Associated
Eip []stringAddresses The elastic IP address (EIP) associated with the HAVIP.
- Associated
Instance stringType The type of the instance with which the HAVIP is associated. Valid values:
- Associated
Instances []string The ID of the instance with which the HAVIP is associated.
- Create
Time string The time when the HAVIP was created.
- Description string
The description of the HaVip instance.
- Ha
Vip stringId The ID of the HAVIP.
- Ha
Vip stringName The name of the HAVIP.
- Havip
Name string The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- Ip
Address string The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- Master
Instance stringId The ID of the active instance that is associated with the HAVIP.
- Resource
Group stringId The ID of the resource group to which the HAVIP belongs.
- Status string
(Available in v1.120.0+) The status of the HaVip instance.
- map[string]interface{}
The list of tags.
- Vpc
Id string The ID of the VPC to which the HAVIP belongs.
- Vswitch
Id string The vswitch_id of the HaVip, the field can't be changed.
- associated
Eip List<String>Addresses The elastic IP address (EIP) associated with the HAVIP.
- associated
Instance StringType The type of the instance with which the HAVIP is associated. Valid values:
- associated
Instances List<String> The ID of the instance with which the HAVIP is associated.
- create
Time String The time when the HAVIP was created.
- description String
The description of the HaVip instance.
- ha
Vip StringId The ID of the HAVIP.
- ha
Vip StringName The name of the HAVIP.
- havip
Name String The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- ip
Address String The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- master
Instance StringId The ID of the active instance that is associated with the HAVIP.
- resource
Group StringId The ID of the resource group to which the HAVIP belongs.
- status String
(Available in v1.120.0+) The status of the HaVip instance.
- Map<String,Object>
The list of tags.
- vpc
Id String The ID of the VPC to which the HAVIP belongs.
- vswitch
Id String The vswitch_id of the HaVip, the field can't be changed.
- associated
Eip string[]Addresses The elastic IP address (EIP) associated with the HAVIP.
- associated
Instance stringType The type of the instance with which the HAVIP is associated. Valid values:
- associated
Instances string[] The ID of the instance with which the HAVIP is associated.
- create
Time string The time when the HAVIP was created.
- description string
The description of the HaVip instance.
- ha
Vip stringId The ID of the HAVIP.
- ha
Vip stringName The name of the HAVIP.
- havip
Name string The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- ip
Address string The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- master
Instance stringId The ID of the active instance that is associated with the HAVIP.
- resource
Group stringId The ID of the resource group to which the HAVIP belongs.
- status string
(Available in v1.120.0+) The status of the HaVip instance.
- {[key: string]: any}
The list of tags.
- vpc
Id string The ID of the VPC to which the HAVIP belongs.
- vswitch
Id string The vswitch_id of the HaVip, the field can't be changed.
- associated_
eip_ Sequence[str]addresses The elastic IP address (EIP) associated with the HAVIP.
- associated_
instance_ strtype The type of the instance with which the HAVIP is associated. Valid values:
- associated_
instances Sequence[str] The ID of the instance with which the HAVIP is associated.
- create_
time str The time when the HAVIP was created.
- description str
The description of the HaVip instance.
- ha_
vip_ strid The ID of the HAVIP.
- ha_
vip_ strname The name of the HAVIP.
- havip_
name str The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- ip_
address str The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- master_
instance_ strid The ID of the active instance that is associated with the HAVIP.
- resource_
group_ strid The ID of the resource group to which the HAVIP belongs.
- status str
(Available in v1.120.0+) The status of the HaVip instance.
- Mapping[str, Any]
The list of tags.
- vpc_
id str The ID of the VPC to which the HAVIP belongs.
- vswitch_
id str The vswitch_id of the HaVip, the field can't be changed.
- associated
Eip List<String>Addresses The elastic IP address (EIP) associated with the HAVIP.
- associated
Instance StringType The type of the instance with which the HAVIP is associated. Valid values:
- associated
Instances List<String> The ID of the instance with which the HAVIP is associated.
- create
Time String The time when the HAVIP was created.
- description String
The description of the HaVip instance.
- ha
Vip StringId The ID of the HAVIP.
- ha
Vip StringName The name of the HAVIP.
- havip
Name String The name of the HaVip instance.
Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.
- ip
Address String The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
- master
Instance StringId The ID of the active instance that is associated with the HAVIP.
- resource
Group StringId The ID of the resource group to which the HAVIP belongs.
- status String
(Available in v1.120.0+) The status of the HaVip instance.
- Map<Any>
The list of tags.
- vpc
Id String The ID of the VPC to which the HAVIP belongs.
- vswitch
Id String The vswitch_id of the HaVip, the field can't be changed.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.