1. Packages
  2. Gcore Provider
  3. API Docs
  4. Loadbalancerv2
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

gcore.Loadbalancerv2

Explore with Pulumi AI

gcore logo
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

    Represent load balancer without nested listener

    Example Usage

    Prerequisite

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const project = gcore.getProject({
        name: "Default",
    });
    const region = gcore.getRegion({
        name: "Luxembourg-2",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    project = gcore.get_project(name="Default")
    region = gcore.get_region(name="Luxembourg-2")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
    			Name: "Default",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = gcore.GetRegion(ctx, &gcore.GetRegionArgs{
    			Name: "Luxembourg-2",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var project = Gcore.GetProject.Invoke(new()
        {
            Name = "Default",
        });
    
        var region = Gcore.GetRegion.Invoke(new()
        {
            Name = "Luxembourg-2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetProjectArgs;
    import com.pulumi.gcore.inputs.GetRegionArgs;
    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 project = GcoreFunctions.getProject(GetProjectArgs.builder()
                .name("Default")
                .build());
    
            final var region = GcoreFunctions.getRegion(GetRegionArgs.builder()
                .name("Luxembourg-2")
                .build());
    
        }
    }
    
    variables:
      project:
        fn::invoke:
          function: gcore:getProject
          arguments:
            name: Default
      region:
        fn::invoke:
          function: gcore:getRegion
          arguments:
            name: Luxembourg-2
    

    Creating Public Load Balancer

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const publicLb = new gcore.Loadbalancerv2("publicLb", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        flavor: "lb1-1-2",
        metadataMap: {
            managed_by: "terraform",
        },
    });
    export const publicLbIp = publicLb.vipAddress;
    
    import pulumi
    import pulumi_gcore as gcore
    
    public_lb = gcore.Loadbalancerv2("publicLb",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        flavor="lb1-1-2",
        metadata_map={
            "managed_by": "terraform",
        })
    pulumi.export("publicLbIp", public_lb.vip_address)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		publicLb, err := gcore.NewLoadbalancerv2(ctx, "publicLb", &gcore.Loadbalancerv2Args{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    			Flavor:    pulumi.String("lb1-1-2"),
    			MetadataMap: pulumi.StringMap{
    				"managed_by": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("publicLbIp", publicLb.VipAddress)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var publicLb = new Gcore.Loadbalancerv2("publicLb", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            Flavor = "lb1-1-2",
            MetadataMap = 
            {
                { "managed_by", "terraform" },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["publicLbIp"] = publicLb.VipAddress,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Loadbalancerv2;
    import com.pulumi.gcore.Loadbalancerv2Args;
    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 publicLb = new Loadbalancerv2("publicLb", Loadbalancerv2Args.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .flavor("lb1-1-2")
                .metadataMap(Map.of("managed_by", "terraform"))
                .build());
    
            ctx.export("publicLbIp", publicLb.vipAddress());
        }
    }
    
    resources:
      publicLb:
        type: gcore:Loadbalancerv2
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          flavor: lb1-1-2
          metadataMap:
            managed_by: terraform
    outputs:
      publicLbIp: ${publicLb.vipAddress}
    

    Creating Public Load Balancer with Reserved Fixed IP

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    // after destroying load balancer, you can attach the Reserved Fixed IP to another load balancer or instance
    const publicLbFixedIp = new gcore.Reservedfixedip("publicLbFixedIp", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        isVip: false,
        type: "external",
    });
    const publicLbWithFixedIpLoadbalancerv2 = new gcore.Loadbalancerv2("publicLbWithFixedIpLoadbalancerv2", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        flavor: "lb1-1-2",
        vipPortId: publicLbFixedIp.portId,
    });
    export const publicLbWithFixedIp = publicLbWithFixedIpLoadbalancerv2.vipAddress;
    
    import pulumi
    import pulumi_gcore as gcore
    
    # after destroying load balancer, you can attach the Reserved Fixed IP to another load balancer or instance
    public_lb_fixed_ip = gcore.Reservedfixedip("publicLbFixedIp",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        is_vip=False,
        type="external")
    public_lb_with_fixed_ip_loadbalancerv2 = gcore.Loadbalancerv2("publicLbWithFixedIpLoadbalancerv2",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        flavor="lb1-1-2",
        vip_port_id=public_lb_fixed_ip.port_id)
    pulumi.export("publicLbWithFixedIp", public_lb_with_fixed_ip_loadbalancerv2.vip_address)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// after destroying load balancer, you can attach the Reserved Fixed IP to another load balancer or instance
    		publicLbFixedIp, err := gcore.NewReservedfixedip(ctx, "publicLbFixedIp", &gcore.ReservedfixedipArgs{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    			IsVip:     pulumi.Bool(false),
    			Type:      pulumi.String("external"),
    		})
    		if err != nil {
    			return err
    		}
    		publicLbWithFixedIpLoadbalancerv2, err := gcore.NewLoadbalancerv2(ctx, "publicLbWithFixedIpLoadbalancerv2", &gcore.Loadbalancerv2Args{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    			Flavor:    pulumi.String("lb1-1-2"),
    			VipPortId: publicLbFixedIp.PortId,
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("publicLbWithFixedIp", publicLbWithFixedIpLoadbalancerv2.VipAddress)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        // after destroying load balancer, you can attach the Reserved Fixed IP to another load balancer or instance
        var publicLbFixedIp = new Gcore.Reservedfixedip("publicLbFixedIp", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            IsVip = false,
            Type = "external",
        });
    
        var publicLbWithFixedIpLoadbalancerv2 = new Gcore.Loadbalancerv2("publicLbWithFixedIpLoadbalancerv2", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            Flavor = "lb1-1-2",
            VipPortId = publicLbFixedIp.PortId,
        });
    
        return new Dictionary<string, object?>
        {
            ["publicLbWithFixedIp"] = publicLbWithFixedIpLoadbalancerv2.VipAddress,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Reservedfixedip;
    import com.pulumi.gcore.ReservedfixedipArgs;
    import com.pulumi.gcore.Loadbalancerv2;
    import com.pulumi.gcore.Loadbalancerv2Args;
    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) {
            // after destroying load balancer, you can attach the Reserved Fixed IP to another load balancer or instance
            var publicLbFixedIp = new Reservedfixedip("publicLbFixedIp", ReservedfixedipArgs.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .isVip(false)
                .type("external")
                .build());
    
            var publicLbWithFixedIpLoadbalancerv2 = new Loadbalancerv2("publicLbWithFixedIpLoadbalancerv2", Loadbalancerv2Args.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .flavor("lb1-1-2")
                .vipPortId(publicLbFixedIp.portId())
                .build());
    
            ctx.export("publicLbWithFixedIp", publicLbWithFixedIpLoadbalancerv2.vipAddress());
        }
    }
    
    resources:
      # after destroying load balancer, you can attach the Reserved Fixed IP to another load balancer or instance
      publicLbFixedIp:
        type: gcore:Reservedfixedip
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          isVip: false
          type: external
      publicLbWithFixedIpLoadbalancerv2:
        type: gcore:Loadbalancerv2
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          flavor: lb1-1-2
          vipPortId: ${publicLbFixedIp.portId}
    outputs:
      publicLbWithFixedIp: ${publicLbWithFixedIpLoadbalancerv2.vipAddress}
    

    Creating Private Load Balancer

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const privateNetwork = new gcore.Network("privateNetwork", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
    });
    const privateSubnet = new gcore.Subnet("privateSubnet", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        cidr: "10.0.0.0/24",
        networkId: privateNetwork.networkId,
    });
    const privateLb = new gcore.Loadbalancerv2("privateLb", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        flavor: "lb1-1-2",
        vipNetworkId: privateNetwork.networkId,
        vipSubnetId: privateSubnet.subnetId,
    });
    export const privateLbIp = privateLb.vipAddress;
    
    import pulumi
    import pulumi_gcore as gcore
    
    private_network = gcore.Network("privateNetwork",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"])
    private_subnet = gcore.Subnet("privateSubnet",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        cidr="10.0.0.0/24",
        network_id=private_network.network_id)
    private_lb = gcore.Loadbalancerv2("privateLb",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        flavor="lb1-1-2",
        vip_network_id=private_network.network_id,
        vip_subnet_id=private_subnet.subnet_id)
    pulumi.export("privateLbIp", private_lb.vip_address)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		privateNetwork, err := gcore.NewNetwork(ctx, "privateNetwork", &gcore.NetworkArgs{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    		})
    		if err != nil {
    			return err
    		}
    		privateSubnet, err := gcore.NewSubnet(ctx, "privateSubnet", &gcore.SubnetArgs{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    			Cidr:      pulumi.String("10.0.0.0/24"),
    			NetworkId: privateNetwork.NetworkId,
    		})
    		if err != nil {
    			return err
    		}
    		privateLb, err := gcore.NewLoadbalancerv2(ctx, "privateLb", &gcore.Loadbalancerv2Args{
    			ProjectId:    pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:     pulumi.Any(data.Gcore_region.Region.Id),
    			Flavor:       pulumi.String("lb1-1-2"),
    			VipNetworkId: privateNetwork.NetworkId,
    			VipSubnetId:  privateSubnet.SubnetId,
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("privateLbIp", privateLb.VipAddress)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var privateNetwork = new Gcore.Network("privateNetwork", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
        });
    
        var privateSubnet = new Gcore.Subnet("privateSubnet", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            Cidr = "10.0.0.0/24",
            NetworkId = privateNetwork.NetworkId,
        });
    
        var privateLb = new Gcore.Loadbalancerv2("privateLb", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            Flavor = "lb1-1-2",
            VipNetworkId = privateNetwork.NetworkId,
            VipSubnetId = privateSubnet.SubnetId,
        });
    
        return new Dictionary<string, object?>
        {
            ["privateLbIp"] = privateLb.VipAddress,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Network;
    import com.pulumi.gcore.NetworkArgs;
    import com.pulumi.gcore.Subnet;
    import com.pulumi.gcore.SubnetArgs;
    import com.pulumi.gcore.Loadbalancerv2;
    import com.pulumi.gcore.Loadbalancerv2Args;
    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 privateNetwork = new Network("privateNetwork", NetworkArgs.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .build());
    
            var privateSubnet = new Subnet("privateSubnet", SubnetArgs.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .cidr("10.0.0.0/24")
                .networkId(privateNetwork.networkId())
                .build());
    
            var privateLb = new Loadbalancerv2("privateLb", Loadbalancerv2Args.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .flavor("lb1-1-2")
                .vipNetworkId(privateNetwork.networkId())
                .vipSubnetId(privateSubnet.subnetId())
                .build());
    
            ctx.export("privateLbIp", privateLb.vipAddress());
        }
    }
    
    resources:
      privateNetwork:
        type: gcore:Network
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
      privateSubnet:
        type: gcore:Subnet
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          cidr: 10.0.0.0/24
          networkId: ${privateNetwork.networkId}
      privateLb:
        type: gcore:Loadbalancerv2
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          flavor: lb1-1-2
          vipNetworkId: ${privateNetwork.networkId}
          vipSubnetId: ${privateSubnet.subnetId}
    outputs:
      privateLbIp: ${privateLb.vipAddress}
    

    Creating Floating IP for Private Load Balancer

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const privateLbFipFloatingip = new gcore.Floatingip("privateLbFipFloatingip", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        fixedIpAddress: gcore_loadbalancerv2.private_lb.vip_address,
        portId: gcore_loadbalancerv2.private_lb.vip_port_id,
    });
    export const privateLbFip = privateLbFipFloatingip.floatingIpAddress;
    
    import pulumi
    import pulumi_gcore as gcore
    
    private_lb_fip_floatingip = gcore.Floatingip("privateLbFipFloatingip",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        fixed_ip_address=gcore_loadbalancerv2["private_lb"]["vip_address"],
        port_id=gcore_loadbalancerv2["private_lb"]["vip_port_id"])
    pulumi.export("privateLbFip", private_lb_fip_floatingip.floating_ip_address)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		privateLbFipFloatingip, err := gcore.NewFloatingip(ctx, "privateLbFipFloatingip", &gcore.FloatingipArgs{
    			ProjectId:      pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:       pulumi.Any(data.Gcore_region.Region.Id),
    			FixedIpAddress: pulumi.Any(gcore_loadbalancerv2.Private_lb.Vip_address),
    			PortId:         pulumi.Any(gcore_loadbalancerv2.Private_lb.Vip_port_id),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("privateLbFip", privateLbFipFloatingip.FloatingIpAddress)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var privateLbFipFloatingip = new Gcore.Floatingip("privateLbFipFloatingip", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            FixedIpAddress = gcore_loadbalancerv2.Private_lb.Vip_address,
            PortId = gcore_loadbalancerv2.Private_lb.Vip_port_id,
        });
    
        return new Dictionary<string, object?>
        {
            ["privateLbFip"] = privateLbFipFloatingip.FloatingIpAddress,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Floatingip;
    import com.pulumi.gcore.FloatingipArgs;
    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 privateLbFipFloatingip = new Floatingip("privateLbFipFloatingip", FloatingipArgs.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .fixedIpAddress(gcore_loadbalancerv2.private_lb().vip_address())
                .portId(gcore_loadbalancerv2.private_lb().vip_port_id())
                .build());
    
            ctx.export("privateLbFip", privateLbFipFloatingip.floatingIpAddress());
        }
    }
    
    resources:
      privateLbFipFloatingip:
        type: gcore:Floatingip
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          fixedIpAddress: ${gcore_loadbalancerv2.private_lb.vip_address}
          portId: ${gcore_loadbalancerv2.private_lb.vip_port_id}
    outputs:
      privateLbFip: ${privateLbFipFloatingip.floatingIpAddress}
    

    Creating Private Load Balancer in Dual Stack Mode

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const privateNetworkDualstack = new gcore.Network("privateNetworkDualstack", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
    });
    const privateSubnetIpv4 = new gcore.Subnet("privateSubnetIpv4", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        cidr: "10.0.0.0/24",
        networkId: privateNetworkDualstack.networkId,
    });
    const privateSubnetIpv6 = new gcore.Subnet("privateSubnetIpv6", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        cidr: "fd00::/120",
        networkId: privateNetworkDualstack.networkId,
    });
    const privateLbDualstack = new gcore.Loadbalancerv2("privateLbDualstack", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        flavor: "lb1-1-2",
        vipNetworkId: privateNetworkDualstack.networkId,
        vipIpFamily: "dual",
    }, {
        dependsOn: [
            privateSubnetIpv4,
            privateSubnetIpv6,
        ],
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    private_network_dualstack = gcore.Network("privateNetworkDualstack",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"])
    private_subnet_ipv4 = gcore.Subnet("privateSubnetIpv4",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        cidr="10.0.0.0/24",
        network_id=private_network_dualstack.network_id)
    private_subnet_ipv6 = gcore.Subnet("privateSubnetIpv6",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        cidr="fd00::/120",
        network_id=private_network_dualstack.network_id)
    private_lb_dualstack = gcore.Loadbalancerv2("privateLbDualstack",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        flavor="lb1-1-2",
        vip_network_id=private_network_dualstack.network_id,
        vip_ip_family="dual",
        opts = pulumi.ResourceOptions(depends_on=[
                private_subnet_ipv4,
                private_subnet_ipv6,
            ]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		privateNetworkDualstack, err := gcore.NewNetwork(ctx, "privateNetworkDualstack", &gcore.NetworkArgs{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    		})
    		if err != nil {
    			return err
    		}
    		privateSubnetIpv4, err := gcore.NewSubnet(ctx, "privateSubnetIpv4", &gcore.SubnetArgs{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    			Cidr:      pulumi.String("10.0.0.0/24"),
    			NetworkId: privateNetworkDualstack.NetworkId,
    		})
    		if err != nil {
    			return err
    		}
    		privateSubnetIpv6, err := gcore.NewSubnet(ctx, "privateSubnetIpv6", &gcore.SubnetArgs{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    			Cidr:      pulumi.String("fd00::/120"),
    			NetworkId: privateNetworkDualstack.NetworkId,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gcore.NewLoadbalancerv2(ctx, "privateLbDualstack", &gcore.Loadbalancerv2Args{
    			ProjectId:    pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:     pulumi.Any(data.Gcore_region.Region.Id),
    			Flavor:       pulumi.String("lb1-1-2"),
    			VipNetworkId: privateNetworkDualstack.NetworkId,
    			VipIpFamily:  pulumi.String("dual"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			privateSubnetIpv4,
    			privateSubnetIpv6,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var privateNetworkDualstack = new Gcore.Network("privateNetworkDualstack", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
        });
    
        var privateSubnetIpv4 = new Gcore.Subnet("privateSubnetIpv4", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            Cidr = "10.0.0.0/24",
            NetworkId = privateNetworkDualstack.NetworkId,
        });
    
        var privateSubnetIpv6 = new Gcore.Subnet("privateSubnetIpv6", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            Cidr = "fd00::/120",
            NetworkId = privateNetworkDualstack.NetworkId,
        });
    
        var privateLbDualstack = new Gcore.Loadbalancerv2("privateLbDualstack", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            Flavor = "lb1-1-2",
            VipNetworkId = privateNetworkDualstack.NetworkId,
            VipIpFamily = "dual",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                privateSubnetIpv4,
                privateSubnetIpv6,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.Network;
    import com.pulumi.gcore.NetworkArgs;
    import com.pulumi.gcore.Subnet;
    import com.pulumi.gcore.SubnetArgs;
    import com.pulumi.gcore.Loadbalancerv2;
    import com.pulumi.gcore.Loadbalancerv2Args;
    import com.pulumi.resources.CustomResourceOptions;
    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 privateNetworkDualstack = new Network("privateNetworkDualstack", NetworkArgs.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .build());
    
            var privateSubnetIpv4 = new Subnet("privateSubnetIpv4", SubnetArgs.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .cidr("10.0.0.0/24")
                .networkId(privateNetworkDualstack.networkId())
                .build());
    
            var privateSubnetIpv6 = new Subnet("privateSubnetIpv6", SubnetArgs.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .cidr("fd00::/120")
                .networkId(privateNetworkDualstack.networkId())
                .build());
    
            var privateLbDualstack = new Loadbalancerv2("privateLbDualstack", Loadbalancerv2Args.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .flavor("lb1-1-2")
                .vipNetworkId(privateNetworkDualstack.networkId())
                .vipIpFamily("dual")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        privateSubnetIpv4,
                        privateSubnetIpv6)
                    .build());
    
        }
    }
    
    resources:
      privateNetworkDualstack:
        type: gcore:Network
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
      privateSubnetIpv4:
        type: gcore:Subnet
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          cidr: 10.0.0.0/24
          networkId: ${privateNetworkDualstack.networkId}
      privateSubnetIpv6:
        type: gcore:Subnet
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          cidr: fd00::/120
          networkId: ${privateNetworkDualstack.networkId}
      privateLbDualstack:
        type: gcore:Loadbalancerv2
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          flavor: lb1-1-2
          vipNetworkId: ${privateNetworkDualstack.networkId}
          vipIpFamily: dual
        options:
          dependsOn:
            - ${privateSubnetIpv4}
            - ${privateSubnetIpv6}
    

    Create Loadbalancerv2 Resource

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

    Constructor syntax

    new Loadbalancerv2(name: string, args?: Loadbalancerv2Args, opts?: CustomResourceOptions);
    @overload
    def Loadbalancerv2(resource_name: str,
                       args: Optional[Loadbalancerv2Args] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def Loadbalancerv2(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       flavor: Optional[str] = None,
                       loadbalancerv2_id: Optional[str] = None,
                       metadata_map: Optional[Mapping[str, str]] = None,
                       name: Optional[str] = None,
                       preferred_connectivity: Optional[str] = None,
                       project_id: Optional[float] = None,
                       project_name: Optional[str] = None,
                       region_id: Optional[float] = None,
                       region_name: Optional[str] = None,
                       timeouts: Optional[Loadbalancerv2TimeoutsArgs] = None,
                       vip_ip_family: Optional[str] = None,
                       vip_network_id: Optional[str] = None,
                       vip_port_id: Optional[str] = None,
                       vip_subnet_id: Optional[str] = None)
    func NewLoadbalancerv2(ctx *Context, name string, args *Loadbalancerv2Args, opts ...ResourceOption) (*Loadbalancerv2, error)
    public Loadbalancerv2(string name, Loadbalancerv2Args? args = null, CustomResourceOptions? opts = null)
    public Loadbalancerv2(String name, Loadbalancerv2Args args)
    public Loadbalancerv2(String name, Loadbalancerv2Args args, CustomResourceOptions options)
    
    type: gcore:Loadbalancerv2
    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 Loadbalancerv2Args
    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 Loadbalancerv2Args
    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 Loadbalancerv2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Loadbalancerv2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Loadbalancerv2Args
    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 loadbalancerv2Resource = new Gcore.Loadbalancerv2("loadbalancerv2Resource", new()
    {
        Flavor = "string",
        Loadbalancerv2Id = "string",
        MetadataMap = 
        {
            { "string", "string" },
        },
        Name = "string",
        PreferredConnectivity = "string",
        ProjectId = 0,
        ProjectName = "string",
        RegionId = 0,
        RegionName = "string",
        Timeouts = new Gcore.Inputs.Loadbalancerv2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
        VipIpFamily = "string",
        VipNetworkId = "string",
        VipPortId = "string",
        VipSubnetId = "string",
    });
    
    example, err := gcore.NewLoadbalancerv2(ctx, "loadbalancerv2Resource", &gcore.Loadbalancerv2Args{
    	Flavor:           pulumi.String("string"),
    	Loadbalancerv2Id: pulumi.String("string"),
    	MetadataMap: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:                  pulumi.String("string"),
    	PreferredConnectivity: pulumi.String("string"),
    	ProjectId:             pulumi.Float64(0),
    	ProjectName:           pulumi.String("string"),
    	RegionId:              pulumi.Float64(0),
    	RegionName:            pulumi.String("string"),
    	Timeouts: &gcore.Loadbalancerv2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	VipIpFamily:  pulumi.String("string"),
    	VipNetworkId: pulumi.String("string"),
    	VipPortId:    pulumi.String("string"),
    	VipSubnetId:  pulumi.String("string"),
    })
    
    var loadbalancerv2Resource = new Loadbalancerv2("loadbalancerv2Resource", Loadbalancerv2Args.builder()
        .flavor("string")
        .loadbalancerv2Id("string")
        .metadataMap(Map.of("string", "string"))
        .name("string")
        .preferredConnectivity("string")
        .projectId(0)
        .projectName("string")
        .regionId(0)
        .regionName("string")
        .timeouts(Loadbalancerv2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .vipIpFamily("string")
        .vipNetworkId("string")
        .vipPortId("string")
        .vipSubnetId("string")
        .build());
    
    loadbalancerv2_resource = gcore.Loadbalancerv2("loadbalancerv2Resource",
        flavor="string",
        loadbalancerv2_id="string",
        metadata_map={
            "string": "string",
        },
        name="string",
        preferred_connectivity="string",
        project_id=0,
        project_name="string",
        region_id=0,
        region_name="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        },
        vip_ip_family="string",
        vip_network_id="string",
        vip_port_id="string",
        vip_subnet_id="string")
    
    const loadbalancerv2Resource = new gcore.Loadbalancerv2("loadbalancerv2Resource", {
        flavor: "string",
        loadbalancerv2Id: "string",
        metadataMap: {
            string: "string",
        },
        name: "string",
        preferredConnectivity: "string",
        projectId: 0,
        projectName: "string",
        regionId: 0,
        regionName: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
        vipIpFamily: "string",
        vipNetworkId: "string",
        vipPortId: "string",
        vipSubnetId: "string",
    });
    
    type: gcore:Loadbalancerv2
    properties:
        flavor: string
        loadbalancerv2Id: string
        metadataMap:
            string: string
        name: string
        preferredConnectivity: string
        projectId: 0
        projectName: string
        regionId: 0
        regionName: string
        timeouts:
            create: string
            delete: string
            update: string
        vipIpFamily: string
        vipNetworkId: string
        vipPortId: string
        vipSubnetId: string
    

    Loadbalancerv2 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 Loadbalancerv2 resource accepts the following input properties:

    Flavor string
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    Loadbalancerv2Id string
    The ID of this resource.
    MetadataMap Dictionary<string, string>
    Metadata map to apply to the load balancer.
    Name string
    Name of the load balancer.
    PreferredConnectivity string
    Available values are 'L2', 'L3'
    ProjectId double
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    ProjectName string
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    RegionId double
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    RegionName string
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    Timeouts Loadbalancerv2Timeouts
    VipIpFamily string
    Available values are 'ipv4', 'ipv6', 'dual'
    VipNetworkId string
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    VipPortId string
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    VipSubnetId string
    ID of the desired subnet. Should be used together with vipnetworkid.
    Flavor string
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    Loadbalancerv2Id string
    The ID of this resource.
    MetadataMap map[string]string
    Metadata map to apply to the load balancer.
    Name string
    Name of the load balancer.
    PreferredConnectivity string
    Available values are 'L2', 'L3'
    ProjectId float64
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    ProjectName string
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    RegionId float64
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    RegionName string
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    Timeouts Loadbalancerv2TimeoutsArgs
    VipIpFamily string
    Available values are 'ipv4', 'ipv6', 'dual'
    VipNetworkId string
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    VipPortId string
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    VipSubnetId string
    ID of the desired subnet. Should be used together with vipnetworkid.
    flavor String
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    loadbalancerv2Id String
    The ID of this resource.
    metadataMap Map<String,String>
    Metadata map to apply to the load balancer.
    name String
    Name of the load balancer.
    preferredConnectivity String
    Available values are 'L2', 'L3'
    projectId Double
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    projectName String
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    regionId Double
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    regionName String
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    timeouts Loadbalancerv2Timeouts
    vipIpFamily String
    Available values are 'ipv4', 'ipv6', 'dual'
    vipNetworkId String
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    vipPortId String
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    vipSubnetId String
    ID of the desired subnet. Should be used together with vipnetworkid.
    flavor string
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    loadbalancerv2Id string
    The ID of this resource.
    metadataMap {[key: string]: string}
    Metadata map to apply to the load balancer.
    name string
    Name of the load balancer.
    preferredConnectivity string
    Available values are 'L2', 'L3'
    projectId number
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    projectName string
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    regionId number
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    regionName string
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    timeouts Loadbalancerv2Timeouts
    vipIpFamily string
    Available values are 'ipv4', 'ipv6', 'dual'
    vipNetworkId string
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    vipPortId string
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    vipSubnetId string
    ID of the desired subnet. Should be used together with vipnetworkid.
    flavor str
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    loadbalancerv2_id str
    The ID of this resource.
    metadata_map Mapping[str, str]
    Metadata map to apply to the load balancer.
    name str
    Name of the load balancer.
    preferred_connectivity str
    Available values are 'L2', 'L3'
    project_id float
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    project_name str
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    region_id float
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    region_name str
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    timeouts Loadbalancerv2TimeoutsArgs
    vip_ip_family str
    Available values are 'ipv4', 'ipv6', 'dual'
    vip_network_id str
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    vip_port_id str
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    vip_subnet_id str
    ID of the desired subnet. Should be used together with vipnetworkid.
    flavor String
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    loadbalancerv2Id String
    The ID of this resource.
    metadataMap Map<String>
    Metadata map to apply to the load balancer.
    name String
    Name of the load balancer.
    preferredConnectivity String
    Available values are 'L2', 'L3'
    projectId Number
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    projectName String
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    regionId Number
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    regionName String
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    timeouts Property Map
    vipIpFamily String
    Available values are 'ipv4', 'ipv6', 'dual'
    vipNetworkId String
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    vipPortId String
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    vipSubnetId String
    ID of the desired subnet. Should be used together with vipnetworkid.

    Outputs

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

    AdditionalVips List<Loadbalancerv2AdditionalVip>
    Load Balancer additional VIPs
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Datetime when load balancer was updated at the last time.
    MetadataReadOnlies List<Loadbalancerv2MetadataReadOnly>
    List of metadata items.
    VipAddress string
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    VrrpIps List<Loadbalancerv2VrrpIp>
    AdditionalVips []Loadbalancerv2AdditionalVip
    Load Balancer additional VIPs
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Datetime when load balancer was updated at the last time.
    MetadataReadOnlies []Loadbalancerv2MetadataReadOnly
    List of metadata items.
    VipAddress string
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    VrrpIps []Loadbalancerv2VrrpIp
    additionalVips List<Loadbalancerv2AdditionalVip>
    Load Balancer additional VIPs
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    Datetime when load balancer was updated at the last time.
    metadataReadOnlies List<Loadbalancerv2MetadataReadOnly>
    List of metadata items.
    vipAddress String
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    vrrpIps List<Loadbalancerv2VrrpIp>
    additionalVips Loadbalancerv2AdditionalVip[]
    Load Balancer additional VIPs
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    Datetime when load balancer was updated at the last time.
    metadataReadOnlies Loadbalancerv2MetadataReadOnly[]
    List of metadata items.
    vipAddress string
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    vrrpIps Loadbalancerv2VrrpIp[]
    additional_vips Sequence[Loadbalancerv2AdditionalVip]
    Load Balancer additional VIPs
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    Datetime when load balancer was updated at the last time.
    metadata_read_onlies Sequence[Loadbalancerv2MetadataReadOnly]
    List of metadata items.
    vip_address str
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    vrrp_ips Sequence[Loadbalancerv2VrrpIp]
    additionalVips List<Property Map>
    Load Balancer additional VIPs
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    Datetime when load balancer was updated at the last time.
    metadataReadOnlies List<Property Map>
    List of metadata items.
    vipAddress String
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    vrrpIps List<Property Map>

    Look up Existing Loadbalancerv2 Resource

    Get an existing Loadbalancerv2 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?: Loadbalancerv2State, opts?: CustomResourceOptions): Loadbalancerv2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            additional_vips: Optional[Sequence[Loadbalancerv2AdditionalVipArgs]] = None,
            flavor: Optional[str] = None,
            last_updated: Optional[str] = None,
            loadbalancerv2_id: Optional[str] = None,
            metadata_map: Optional[Mapping[str, str]] = None,
            metadata_read_onlies: Optional[Sequence[Loadbalancerv2MetadataReadOnlyArgs]] = None,
            name: Optional[str] = None,
            preferred_connectivity: Optional[str] = None,
            project_id: Optional[float] = None,
            project_name: Optional[str] = None,
            region_id: Optional[float] = None,
            region_name: Optional[str] = None,
            timeouts: Optional[Loadbalancerv2TimeoutsArgs] = None,
            vip_address: Optional[str] = None,
            vip_ip_family: Optional[str] = None,
            vip_network_id: Optional[str] = None,
            vip_port_id: Optional[str] = None,
            vip_subnet_id: Optional[str] = None,
            vrrp_ips: Optional[Sequence[Loadbalancerv2VrrpIpArgs]] = None) -> Loadbalancerv2
    func GetLoadbalancerv2(ctx *Context, name string, id IDInput, state *Loadbalancerv2State, opts ...ResourceOption) (*Loadbalancerv2, error)
    public static Loadbalancerv2 Get(string name, Input<string> id, Loadbalancerv2State? state, CustomResourceOptions? opts = null)
    public static Loadbalancerv2 get(String name, Output<String> id, Loadbalancerv2State state, CustomResourceOptions options)
    resources:  _:    type: gcore:Loadbalancerv2    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:
    AdditionalVips List<Loadbalancerv2AdditionalVip>
    Load Balancer additional VIPs
    Flavor string
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    LastUpdated string
    Datetime when load balancer was updated at the last time.
    Loadbalancerv2Id string
    The ID of this resource.
    MetadataMap Dictionary<string, string>
    Metadata map to apply to the load balancer.
    MetadataReadOnlies List<Loadbalancerv2MetadataReadOnly>
    List of metadata items.
    Name string
    Name of the load balancer.
    PreferredConnectivity string
    Available values are 'L2', 'L3'
    ProjectId double
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    ProjectName string
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    RegionId double
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    RegionName string
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    Timeouts Loadbalancerv2Timeouts
    VipAddress string
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    VipIpFamily string
    Available values are 'ipv4', 'ipv6', 'dual'
    VipNetworkId string
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    VipPortId string
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    VipSubnetId string
    ID of the desired subnet. Should be used together with vipnetworkid.
    VrrpIps List<Loadbalancerv2VrrpIp>
    AdditionalVips []Loadbalancerv2AdditionalVipArgs
    Load Balancer additional VIPs
    Flavor string
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    LastUpdated string
    Datetime when load balancer was updated at the last time.
    Loadbalancerv2Id string
    The ID of this resource.
    MetadataMap map[string]string
    Metadata map to apply to the load balancer.
    MetadataReadOnlies []Loadbalancerv2MetadataReadOnlyArgs
    List of metadata items.
    Name string
    Name of the load balancer.
    PreferredConnectivity string
    Available values are 'L2', 'L3'
    ProjectId float64
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    ProjectName string
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    RegionId float64
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    RegionName string
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    Timeouts Loadbalancerv2TimeoutsArgs
    VipAddress string
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    VipIpFamily string
    Available values are 'ipv4', 'ipv6', 'dual'
    VipNetworkId string
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    VipPortId string
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    VipSubnetId string
    ID of the desired subnet. Should be used together with vipnetworkid.
    VrrpIps []Loadbalancerv2VrrpIpArgs
    additionalVips List<Loadbalancerv2AdditionalVip>
    Load Balancer additional VIPs
    flavor String
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    lastUpdated String
    Datetime when load balancer was updated at the last time.
    loadbalancerv2Id String
    The ID of this resource.
    metadataMap Map<String,String>
    Metadata map to apply to the load balancer.
    metadataReadOnlies List<Loadbalancerv2MetadataReadOnly>
    List of metadata items.
    name String
    Name of the load balancer.
    preferredConnectivity String
    Available values are 'L2', 'L3'
    projectId Double
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    projectName String
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    regionId Double
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    regionName String
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    timeouts Loadbalancerv2Timeouts
    vipAddress String
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    vipIpFamily String
    Available values are 'ipv4', 'ipv6', 'dual'
    vipNetworkId String
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    vipPortId String
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    vipSubnetId String
    ID of the desired subnet. Should be used together with vipnetworkid.
    vrrpIps List<Loadbalancerv2VrrpIp>
    additionalVips Loadbalancerv2AdditionalVip[]
    Load Balancer additional VIPs
    flavor string
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    lastUpdated string
    Datetime when load balancer was updated at the last time.
    loadbalancerv2Id string
    The ID of this resource.
    metadataMap {[key: string]: string}
    Metadata map to apply to the load balancer.
    metadataReadOnlies Loadbalancerv2MetadataReadOnly[]
    List of metadata items.
    name string
    Name of the load balancer.
    preferredConnectivity string
    Available values are 'L2', 'L3'
    projectId number
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    projectName string
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    regionId number
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    regionName string
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    timeouts Loadbalancerv2Timeouts
    vipAddress string
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    vipIpFamily string
    Available values are 'ipv4', 'ipv6', 'dual'
    vipNetworkId string
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    vipPortId string
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    vipSubnetId string
    ID of the desired subnet. Should be used together with vipnetworkid.
    vrrpIps Loadbalancerv2VrrpIp[]
    additional_vips Sequence[Loadbalancerv2AdditionalVipArgs]
    Load Balancer additional VIPs
    flavor str
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    last_updated str
    Datetime when load balancer was updated at the last time.
    loadbalancerv2_id str
    The ID of this resource.
    metadata_map Mapping[str, str]
    Metadata map to apply to the load balancer.
    metadata_read_onlies Sequence[Loadbalancerv2MetadataReadOnlyArgs]
    List of metadata items.
    name str
    Name of the load balancer.
    preferred_connectivity str
    Available values are 'L2', 'L3'
    project_id float
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    project_name str
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    region_id float
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    region_name str
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    timeouts Loadbalancerv2TimeoutsArgs
    vip_address str
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    vip_ip_family str
    Available values are 'ipv4', 'ipv6', 'dual'
    vip_network_id str
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    vip_port_id str
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    vip_subnet_id str
    ID of the desired subnet. Should be used together with vipnetworkid.
    vrrp_ips Sequence[Loadbalancerv2VrrpIpArgs]
    additionalVips List<Property Map>
    Load Balancer additional VIPs
    flavor String
    Desired flavor to be used for load balancer. By default, lb1-1-2 will be used.
    lastUpdated String
    Datetime when load balancer was updated at the last time.
    loadbalancerv2Id String
    The ID of this resource.
    metadataMap Map<String>
    Metadata map to apply to the load balancer.
    metadataReadOnlies List<Property Map>
    List of metadata items.
    name String
    Name of the load balancer.
    preferredConnectivity String
    Available values are 'L2', 'L3'
    projectId Number
    ID of the desired project to create load balancer in. Alternative for project_name. One of them should be specified.
    projectName String
    Name of the desired project to create load balancer in. Alternative for project_id. One of them should be specified.
    regionId Number
    ID of the desired region to create load balancer in. Alternative for region_name. One of them should be specified.
    regionName String
    Name of the desired region to create load balancer in. Alternative for region_id. One of them should be specified.
    timeouts Property Map
    vipAddress String
    Load balancer IP address. IP address will be changed when load balancer will be recreated if vip_port_id is not specified.
    vipIpFamily String
    Available values are 'ipv4', 'ipv6', 'dual'
    vipNetworkId String
    ID of the desired network. Can be used with vipsubnetid, in this case Load Balancer will be created in specified subnet, otherwise in most free subnet. Note: add all created gcore.Subnet resources within the network with this id to the depends_on to be sure that gcore.Loadbalancerv2 will be destroyed first
    vipPortId String
    Load balancer Port ID. It might be ID of the already created Reserved Fixed IP, otherwise we will create port automatically in specified vip_network_id/vip_subnet_id. It is an alternative for specifying vip_network_id/vip_subnet_id.
    vipSubnetId String
    ID of the desired subnet. Should be used together with vipnetworkid.
    vrrpIps List<Property Map>

    Supporting Types

    Loadbalancerv2AdditionalVip, Loadbalancerv2AdditionalVipArgs

    IpAddress string
    SubnetId string
    IpAddress string
    SubnetId string
    ipAddress String
    subnetId String
    ipAddress string
    subnetId string
    ipAddress String
    subnetId String

    Loadbalancerv2MetadataReadOnly, Loadbalancerv2MetadataReadOnlyArgs

    Key string
    ReadOnly bool
    Value string
    Key string
    ReadOnly bool
    Value string
    key String
    readOnly Boolean
    value String
    key string
    readOnly boolean
    value string
    key str
    read_only bool
    value str
    key String
    readOnly Boolean
    value String

    Loadbalancerv2Timeouts, Loadbalancerv2TimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Loadbalancerv2VrrpIp, Loadbalancerv2VrrpIpArgs

    IpAddress string
    SubnetId string
    IpAddress string
    SubnetId string
    ipAddress String
    subnetId String
    ipAddress string
    subnetId string
    ipAddress String
    subnetId String

    Import

    import using <project_id>:<region_id>:<loadbalancer_id> format

    $ pulumi import gcore:index/loadbalancerv2:Loadbalancerv2 loadbalancer1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
    

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

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core