HaVipv2Args

data class HaVipv2Args(val description: Output<String>? = null, val haVipName: Output<String>? = null, val havipName: Output<String>? = null, val ipAddress: Output<String>? = null, val resourceGroupId: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val vswitchId: Output<String>? = null) : ConvertibleToJava<HaVipv2Args>

Provides a Vpc Ha Vip resource. Highly available virtual IP For information about Vpc Ha Vip and how to use it, see What is Ha Vip.

Example Usage

Basic Usage

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.resourcemanager.ResourceGroup;
import com.pulumi.alicloud.resourcemanager.ResourceGroupArgs;
import com.pulumi.alicloud.vpc.HaVipv2;
import com.pulumi.alicloud.vpc.HaVipv2Args;
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-testacc-example");
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var defaultVpc = new Network("defaultVpc", NetworkArgs.builder()
.description("tf-test-acc-vpc")
.vpcName(name)
.cidrBlock("192.168.0.0/16")
.build());
var defaultVswitch = new Switch("defaultVswitch", SwitchArgs.builder()
.vpcId(defaultVpc.id())
.cidrBlock("192.168.0.0/21")
.vswitchName(String.format("%s1", name))
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.description("tf-testacc-vswitch")
.build());
var defaultRg = new ResourceGroup("defaultRg", ResourceGroupArgs.builder()
.displayName("tf-testacc-rg819")
.resourceGroupName(String.format("%s2", name))
.build());
var changeRg = new ResourceGroup("changeRg", ResourceGroupArgs.builder()
.displayName("tf-testacc-changerg670")
.resourceGroupName(String.format("%s3", name))
.build());
var defaultHaVipv2 = new HaVipv2("defaultHaVipv2", HaVipv2Args.builder()
.description("test")
.vswitchId(defaultVswitch.id())
.haVipName(name)
.ipAddress("192.168.1.101")
.resourceGroupId(defaultRg.id())
.build());
}
}

Import

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

$ pulumi import alicloud:vpc/haVipv2:HaVipv2 example <id>

Constructors

Link copied to clipboard
fun HaVipv2Args(description: Output<String>? = null, haVipName: Output<String>? = null, havipName: Output<String>? = null, ipAddress: Output<String>? = null, resourceGroupId: Output<String>? = null, tags: Output<Map<String, Any>>? = null, vswitchId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): HaVipv2Args

Properties

Link copied to clipboard
val description: Output<String>? = null

The description of the HaVip instance. The length is 2 to 256 characters.

Link copied to clipboard
val haVipName: Output<String>? = null

The name of the HaVip instance.

Link copied to clipboard
val havipName: Output<String>? = null

Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

Link copied to clipboard
val ipAddress: Output<String>? = null

The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the resource group.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

The tags of HaVip.

Link copied to clipboard
val vswitchId: Output<String>? = null

The switch ID to which the HaVip instance belongs. The following arguments will be discarded. Please use new fields as soon as possible: