volcengine.vpc.HaVip
Explore with Pulumi AI
Provides a resource to manage ha vip
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooHaVip = new Volcengine.Vpc.HaVip("fooHaVip", new()
{
HaVipName = "acc-test-ha-vip",
Description = "acc-test",
SubnetId = fooSubnet.Id,
});
// ip_address = "172.16.0.5"
var fooAddress = new Volcengine.Eip.Address("fooAddress", new()
{
BillingType = "PostPaidByTraffic",
});
var fooAssociate = new Volcengine.Eip.Associate("fooAssociate", new()
{
AllocationId = fooAddress.Id,
InstanceId = fooHaVip.Id,
InstanceType = "HaVip",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/eip"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooHaVip, err := vpc.NewHaVip(ctx, "fooHaVip", &vpc.HaVipArgs{
HaVipName: pulumi.String("acc-test-ha-vip"),
Description: pulumi.String("acc-test"),
SubnetId: fooSubnet.ID(),
})
if err != nil {
return err
}
fooAddress, err := eip.NewAddress(ctx, "fooAddress", &eip.AddressArgs{
BillingType: pulumi.String("PostPaidByTraffic"),
})
if err != nil {
return err
}
_, err = eip.NewAssociate(ctx, "fooAssociate", &eip.AssociateArgs{
AllocationId: fooAddress.ID(),
InstanceId: fooHaVip.ID(),
InstanceType: pulumi.String("HaVip"),
})
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.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.vpc.HaVip;
import com.pulumi.volcengine.vpc.HaVipArgs;
import com.pulumi.volcengine.eip.Address;
import com.pulumi.volcengine.eip.AddressArgs;
import com.pulumi.volcengine.eip.Associate;
import com.pulumi.volcengine.eip.AssociateArgs;
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 fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooHaVip = new HaVip("fooHaVip", HaVipArgs.builder()
.haVipName("acc-test-ha-vip")
.description("acc-test")
.subnetId(fooSubnet.id())
.build());
var fooAddress = new Address("fooAddress", AddressArgs.builder()
.billingType("PostPaidByTraffic")
.build());
var fooAssociate = new Associate("fooAssociate", AssociateArgs.builder()
.allocationId(fooAddress.id())
.instanceId(fooHaVip.id())
.instanceType("HaVip")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_ha_vip = volcengine.vpc.HaVip("fooHaVip",
ha_vip_name="acc-test-ha-vip",
description="acc-test",
subnet_id=foo_subnet.id)
# ip_address = "172.16.0.5"
foo_address = volcengine.eip.Address("fooAddress", billing_type="PostPaidByTraffic")
foo_associate = volcengine.eip.Associate("fooAssociate",
allocation_id=foo_address.id,
instance_id=foo_ha_vip.id,
instance_type="HaVip")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooHaVip = new volcengine.vpc.HaVip("fooHaVip", {
haVipName: "acc-test-ha-vip",
description: "acc-test",
subnetId: fooSubnet.id,
});
// ip_address = "172.16.0.5"
const fooAddress = new volcengine.eip.Address("fooAddress", {billingType: "PostPaidByTraffic"});
const fooAssociate = new volcengine.eip.Associate("fooAssociate", {
allocationId: fooAddress.id,
instanceId: fooHaVip.id,
instanceType: "HaVip",
});
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooHaVip:
type: volcengine:vpc:HaVip
properties:
haVipName: acc-test-ha-vip
description: acc-test
subnetId: ${fooSubnet.id}
fooAddress:
type: volcengine:eip:Address
properties:
billingType: PostPaidByTraffic
fooAssociate:
type: volcengine:eip:Associate
properties:
allocationId: ${fooAddress.id}
instanceId: ${fooHaVip.id}
instanceType: HaVip
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
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,
description: Optional[str] = None,
ha_vip_name: Optional[str] = None,
ip_address: 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: volcengine:vpc: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.
Constructor example
The following reference example uses placeholder values for all input properties.
var haVipResource = new Volcengine.Vpc.HaVip("haVipResource", new()
{
SubnetId = "string",
Description = "string",
HaVipName = "string",
IpAddress = "string",
});
example, err := vpc.NewHaVip(ctx, "haVipResource", &vpc.HaVipArgs{
SubnetId: pulumi.String("string"),
Description: pulumi.String("string"),
HaVipName: pulumi.String("string"),
IpAddress: pulumi.String("string"),
})
var haVipResource = new HaVip("haVipResource", HaVipArgs.builder()
.subnetId("string")
.description("string")
.haVipName("string")
.ipAddress("string")
.build());
ha_vip_resource = volcengine.vpc.HaVip("haVipResource",
subnet_id="string",
description="string",
ha_vip_name="string",
ip_address="string")
const haVipResource = new volcengine.vpc.HaVip("haVipResource", {
subnetId: "string",
description: "string",
haVipName: "string",
ipAddress: "string",
});
type: volcengine:vpc:HaVip
properties:
description: string
haVipName: string
ipAddress: string
subnetId: string
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 - The subnet id of the Ha Vip.
- Description string
- The description of the Ha Vip.
- Ha
Vip stringName - The name of the Ha Vip.
- Ip
Address string - The ip address of the Ha Vip.
- Subnet
Id string - The subnet id of the Ha Vip.
- Description string
- The description of the Ha Vip.
- Ha
Vip stringName - The name of the Ha Vip.
- Ip
Address string - The ip address of the Ha Vip.
- subnet
Id String - The subnet id of the Ha Vip.
- description String
- The description of the Ha Vip.
- ha
Vip StringName - The name of the Ha Vip.
- ip
Address String - The ip address of the Ha Vip.
- subnet
Id string - The subnet id of the Ha Vip.
- description string
- The description of the Ha Vip.
- ha
Vip stringName - The name of the Ha Vip.
- ip
Address string - The ip address of the Ha Vip.
- subnet_
id str - The subnet id of the Ha Vip.
- description str
- The description of the Ha Vip.
- ha_
vip_ strname - The name of the Ha Vip.
- ip_
address str - The ip address of the Ha Vip.
- subnet
Id String - The subnet id of the Ha Vip.
- description String
- The description of the Ha Vip.
- ha
Vip StringName - The name of the Ha Vip.
- ip
Address String - The ip address of the Ha Vip.
Outputs
All input properties are implicitly available as output properties. Additionally, the HaVip resource produces the following output properties:
- Associated
Eip stringAddress - The associated eip address of the Ha Vip.
- Associated
Eip stringId - The associated eip id of the Ha Vip.
- Associated
Instance List<string>Ids - The associated instance ids of the Ha Vip.
- Associated
Instance stringType - The associated instance type of the Ha Vip.
- Created
At string - The create time of the Ha Vip.
- Id string
- The provider-assigned unique ID for this managed resource.
- Master
Instance stringId - The master instance id of the Ha Vip.
- Project
Name string - The project name of the Ha Vip.
- Status string
- The status of the Ha Vip.
- Updated
At string - The update time of the Ha Vip.
- Vpc
Id string - The vpc id of the Ha Vip.
- Associated
Eip stringAddress - The associated eip address of the Ha Vip.
- Associated
Eip stringId - The associated eip id of the Ha Vip.
- Associated
Instance []stringIds - The associated instance ids of the Ha Vip.
- Associated
Instance stringType - The associated instance type of the Ha Vip.
- Created
At string - The create time of the Ha Vip.
- Id string
- The provider-assigned unique ID for this managed resource.
- Master
Instance stringId - The master instance id of the Ha Vip.
- Project
Name string - The project name of the Ha Vip.
- Status string
- The status of the Ha Vip.
- Updated
At string - The update time of the Ha Vip.
- Vpc
Id string - The vpc id of the Ha Vip.
- associated
Eip StringAddress - The associated eip address of the Ha Vip.
- associated
Eip StringId - The associated eip id of the Ha Vip.
- associated
Instance List<String>Ids - The associated instance ids of the Ha Vip.
- associated
Instance StringType - The associated instance type of the Ha Vip.
- created
At String - The create time of the Ha Vip.
- id String
- The provider-assigned unique ID for this managed resource.
- master
Instance StringId - The master instance id of the Ha Vip.
- project
Name String - The project name of the Ha Vip.
- status String
- The status of the Ha Vip.
- updated
At String - The update time of the Ha Vip.
- vpc
Id String - The vpc id of the Ha Vip.
- associated
Eip stringAddress - The associated eip address of the Ha Vip.
- associated
Eip stringId - The associated eip id of the Ha Vip.
- associated
Instance string[]Ids - The associated instance ids of the Ha Vip.
- associated
Instance stringType - The associated instance type of the Ha Vip.
- created
At string - The create time of the Ha Vip.
- id string
- The provider-assigned unique ID for this managed resource.
- master
Instance stringId - The master instance id of the Ha Vip.
- project
Name string - The project name of the Ha Vip.
- status string
- The status of the Ha Vip.
- updated
At string - The update time of the Ha Vip.
- vpc
Id string - The vpc id of the Ha Vip.
- associated_
eip_ straddress - The associated eip address of the Ha Vip.
- associated_
eip_ strid - The associated eip id of the Ha Vip.
- associated_
instance_ Sequence[str]ids - The associated instance ids of the Ha Vip.
- associated_
instance_ strtype - The associated instance type of the Ha Vip.
- created_
at str - The create time of the Ha Vip.
- id str
- The provider-assigned unique ID for this managed resource.
- master_
instance_ strid - The master instance id of the Ha Vip.
- project_
name str - The project name of the Ha Vip.
- status str
- The status of the Ha Vip.
- updated_
at str - The update time of the Ha Vip.
- vpc_
id str - The vpc id of the Ha Vip.
- associated
Eip StringAddress - The associated eip address of the Ha Vip.
- associated
Eip StringId - The associated eip id of the Ha Vip.
- associated
Instance List<String>Ids - The associated instance ids of the Ha Vip.
- associated
Instance StringType - The associated instance type of the Ha Vip.
- created
At String - The create time of the Ha Vip.
- id String
- The provider-assigned unique ID for this managed resource.
- master
Instance StringId - The master instance id of the Ha Vip.
- project
Name String - The project name of the Ha Vip.
- status String
- The status of the Ha Vip.
- updated
At String - The update time of the Ha Vip.
- vpc
Id String - The vpc id of the Ha Vip.
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_address: Optional[str] = None,
associated_eip_id: Optional[str] = None,
associated_instance_ids: Optional[Sequence[str]] = None,
associated_instance_type: Optional[str] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
ha_vip_name: Optional[str] = None,
ip_address: Optional[str] = None,
master_instance_id: Optional[str] = None,
project_name: Optional[str] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
updated_at: 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)
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 stringAddress - The associated eip address of the Ha Vip.
- Associated
Eip stringId - The associated eip id of the Ha Vip.
- Associated
Instance List<string>Ids - The associated instance ids of the Ha Vip.
- Associated
Instance stringType - The associated instance type of the Ha Vip.
- Created
At string - The create time of the Ha Vip.
- Description string
- The description of the Ha Vip.
- Ha
Vip stringName - The name of the Ha Vip.
- Ip
Address string - The ip address of the Ha Vip.
- Master
Instance stringId - The master instance id of the Ha Vip.
- Project
Name string - The project name of the Ha Vip.
- Status string
- The status of the Ha Vip.
- Subnet
Id string - The subnet id of the Ha Vip.
- Updated
At string - The update time of the Ha Vip.
- Vpc
Id string - The vpc id of the Ha Vip.
- Associated
Eip stringAddress - The associated eip address of the Ha Vip.
- Associated
Eip stringId - The associated eip id of the Ha Vip.
- Associated
Instance []stringIds - The associated instance ids of the Ha Vip.
- Associated
Instance stringType - The associated instance type of the Ha Vip.
- Created
At string - The create time of the Ha Vip.
- Description string
- The description of the Ha Vip.
- Ha
Vip stringName - The name of the Ha Vip.
- Ip
Address string - The ip address of the Ha Vip.
- Master
Instance stringId - The master instance id of the Ha Vip.
- Project
Name string - The project name of the Ha Vip.
- Status string
- The status of the Ha Vip.
- Subnet
Id string - The subnet id of the Ha Vip.
- Updated
At string - The update time of the Ha Vip.
- Vpc
Id string - The vpc id of the Ha Vip.
- associated
Eip StringAddress - The associated eip address of the Ha Vip.
- associated
Eip StringId - The associated eip id of the Ha Vip.
- associated
Instance List<String>Ids - The associated instance ids of the Ha Vip.
- associated
Instance StringType - The associated instance type of the Ha Vip.
- created
At String - The create time of the Ha Vip.
- description String
- The description of the Ha Vip.
- ha
Vip StringName - The name of the Ha Vip.
- ip
Address String - The ip address of the Ha Vip.
- master
Instance StringId - The master instance id of the Ha Vip.
- project
Name String - The project name of the Ha Vip.
- status String
- The status of the Ha Vip.
- subnet
Id String - The subnet id of the Ha Vip.
- updated
At String - The update time of the Ha Vip.
- vpc
Id String - The vpc id of the Ha Vip.
- associated
Eip stringAddress - The associated eip address of the Ha Vip.
- associated
Eip stringId - The associated eip id of the Ha Vip.
- associated
Instance string[]Ids - The associated instance ids of the Ha Vip.
- associated
Instance stringType - The associated instance type of the Ha Vip.
- created
At string - The create time of the Ha Vip.
- description string
- The description of the Ha Vip.
- ha
Vip stringName - The name of the Ha Vip.
- ip
Address string - The ip address of the Ha Vip.
- master
Instance stringId - The master instance id of the Ha Vip.
- project
Name string - The project name of the Ha Vip.
- status string
- The status of the Ha Vip.
- subnet
Id string - The subnet id of the Ha Vip.
- updated
At string - The update time of the Ha Vip.
- vpc
Id string - The vpc id of the Ha Vip.
- associated_
eip_ straddress - The associated eip address of the Ha Vip.
- associated_
eip_ strid - The associated eip id of the Ha Vip.
- associated_
instance_ Sequence[str]ids - The associated instance ids of the Ha Vip.
- associated_
instance_ strtype - The associated instance type of the Ha Vip.
- created_
at str - The create time of the Ha Vip.
- description str
- The description of the Ha Vip.
- ha_
vip_ strname - The name of the Ha Vip.
- ip_
address str - The ip address of the Ha Vip.
- master_
instance_ strid - The master instance id of the Ha Vip.
- project_
name str - The project name of the Ha Vip.
- status str
- The status of the Ha Vip.
- subnet_
id str - The subnet id of the Ha Vip.
- updated_
at str - The update time of the Ha Vip.
- vpc_
id str - The vpc id of the Ha Vip.
- associated
Eip StringAddress - The associated eip address of the Ha Vip.
- associated
Eip StringId - The associated eip id of the Ha Vip.
- associated
Instance List<String>Ids - The associated instance ids of the Ha Vip.
- associated
Instance StringType - The associated instance type of the Ha Vip.
- created
At String - The create time of the Ha Vip.
- description String
- The description of the Ha Vip.
- ha
Vip StringName - The name of the Ha Vip.
- ip
Address String - The ip address of the Ha Vip.
- master
Instance StringId - The master instance id of the Ha Vip.
- project
Name String - The project name of the Ha Vip.
- status String
- The status of the Ha Vip.
- subnet
Id String - The subnet id of the Ha Vip.
- updated
At String - The update time of the Ha Vip.
- vpc
Id String - The vpc id of the Ha Vip.
Import
HaVip can be imported using the id, e.g.
$ pulumi import volcengine:vpc/haVip:HaVip default havip-2byzv8icq1b7k2dx0eegb****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.