1. Packages
  2. Scaleway
  3. API Docs
  4. loadbalancers
  5. PrivateNetwork
Scaleway v1.38.0 published on Tuesday, Nov 18, 2025 by pulumiverse
scaleway logo
Scaleway v1.38.0 published on Tuesday, Nov 18, 2025 by pulumiverse

    Creates and manages Scaleway Load Balancer Private Network attachments.

    For more information, see the main documentation.

    Example Usage

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const vpc01 = new scaleway.network.Vpc("vpc01", {name: "my vpc"});
    const pn01 = new scaleway.network.PrivateNetwork("pn01", {
        vpcId: vpc01.id,
        ipv4Subnet: {
            subnet: "172.16.32.0/22",
        },
    });
    const ip01 = new scaleway.ipam.Ip("ip01", {
        address: "172.16.32.7",
        sources: [{
            privateNetworkId: pn01.id,
        }],
    });
    const lb01 = new scaleway.loadbalancers.LoadBalancer("lb01", {
        name: "test-lb-private-network",
        type: "LB-S",
    });
    const lbpn01 = new scaleway.loadbalancers.PrivateNetwork("lbpn01", {
        lbId: lb01.id,
        privateNetworkId: pn01.id,
        ipamIpIds: ip01.id,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    vpc01 = scaleway.network.Vpc("vpc01", name="my vpc")
    pn01 = scaleway.network.PrivateNetwork("pn01",
        vpc_id=vpc01.id,
        ipv4_subnet={
            "subnet": "172.16.32.0/22",
        })
    ip01 = scaleway.ipam.Ip("ip01",
        address="172.16.32.7",
        sources=[{
            "private_network_id": pn01.id,
        }])
    lb01 = scaleway.loadbalancers.LoadBalancer("lb01",
        name="test-lb-private-network",
        type="LB-S")
    lbpn01 = scaleway.loadbalancers.PrivateNetwork("lbpn01",
        lb_id=lb01.id,
        private_network_id=pn01.id,
        ipam_ip_ids=ip01.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/ipam"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/loadbalancers"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/network"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		vpc01, err := network.NewVpc(ctx, "vpc01", &network.VpcArgs{
    			Name: pulumi.String("my vpc"),
    		})
    		if err != nil {
    			return err
    		}
    		pn01, err := network.NewPrivateNetwork(ctx, "pn01", &network.PrivateNetworkArgs{
    			VpcId: vpc01.ID(),
    			Ipv4Subnet: &network.PrivateNetworkIpv4SubnetArgs{
    				Subnet: pulumi.String("172.16.32.0/22"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ip01, err := ipam.NewIp(ctx, "ip01", &ipam.IpArgs{
    			Address: pulumi.String("172.16.32.7"),
    			Sources: ipam.IpSourceArray{
    				&ipam.IpSourceArgs{
    					PrivateNetworkId: pn01.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		lb01, err := loadbalancers.NewLoadBalancer(ctx, "lb01", &loadbalancers.LoadBalancerArgs{
    			Name: pulumi.String("test-lb-private-network"),
    			Type: pulumi.String("LB-S"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = loadbalancers.NewPrivateNetwork(ctx, "lbpn01", &loadbalancers.PrivateNetworkArgs{
    			LbId:             lb01.ID(),
    			PrivateNetworkId: pn01.ID(),
    			IpamIpIds:        ip01.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var vpc01 = new Scaleway.Network.Vpc("vpc01", new()
        {
            Name = "my vpc",
        });
    
        var pn01 = new Scaleway.Network.PrivateNetwork("pn01", new()
        {
            VpcId = vpc01.Id,
            Ipv4Subnet = new Scaleway.Network.Inputs.PrivateNetworkIpv4SubnetArgs
            {
                Subnet = "172.16.32.0/22",
            },
        });
    
        var ip01 = new Scaleway.Ipam.Ip("ip01", new()
        {
            Address = "172.16.32.7",
            Sources = new[]
            {
                new Scaleway.Ipam.Inputs.IpSourceArgs
                {
                    PrivateNetworkId = pn01.Id,
                },
            },
        });
    
        var lb01 = new Scaleway.Loadbalancers.LoadBalancer("lb01", new()
        {
            Name = "test-lb-private-network",
            Type = "LB-S",
        });
    
        var lbpn01 = new Scaleway.Loadbalancers.PrivateNetwork("lbpn01", new()
        {
            LbId = lb01.Id,
            PrivateNetworkId = pn01.Id,
            IpamIpIds = ip01.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.network.Vpc;
    import com.pulumi.scaleway.network.VpcArgs;
    import com.pulumi.scaleway.network.inputs.PrivateNetworkIpv4SubnetArgs;
    import com.pulumi.scaleway.ipam.Ip;
    import com.pulumi.scaleway.ipam.IpArgs;
    import com.pulumi.scaleway.ipam.inputs.IpSourceArgs;
    import com.pulumi.scaleway.loadbalancers.LoadBalancer;
    import com.pulumi.scaleway.loadbalancers.LoadBalancerArgs;
    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 vpc01 = new Vpc("vpc01", VpcArgs.builder()
                .name("my vpc")
                .build());
    
            var pn01 = new com.pulumi.scaleway.network.PrivateNetwork("pn01", com.pulumi.scaleway.network.PrivateNetworkArgs.builder()
                .vpcId(vpc01.id())
                .ipv4Subnet(PrivateNetworkIpv4SubnetArgs.builder()
                    .subnet("172.16.32.0/22")
                    .build())
                .build());
    
            var ip01 = new Ip("ip01", IpArgs.builder()
                .address("172.16.32.7")
                .sources(IpSourceArgs.builder()
                    .privateNetworkId(pn01.id())
                    .build())
                .build());
    
            var lb01 = new LoadBalancer("lb01", LoadBalancerArgs.builder()
                .name("test-lb-private-network")
                .type("LB-S")
                .build());
    
            var lbpn01 = new com.pulumi.scaleway.loadbalancers.PrivateNetwork("lbpn01", com.pulumi.scaleway.loadbalancers.PrivateNetworkArgs.builder()
                .lbId(lb01.id())
                .privateNetworkId(pn01.id())
                .ipamIpIds(ip01.id())
                .build());
    
        }
    }
    
    resources:
      vpc01:
        type: scaleway:network:Vpc
        properties:
          name: my vpc
      pn01:
        type: scaleway:network:PrivateNetwork
        properties:
          vpcId: ${vpc01.id}
          ipv4Subnet:
            subnet: 172.16.32.0/22
      ip01:
        type: scaleway:ipam:Ip
        properties:
          address: 172.16.32.7
          sources:
            - privateNetworkId: ${pn01.id}
      lb01:
        type: scaleway:loadbalancers:LoadBalancer
        properties:
          name: test-lb-private-network
          type: LB-S
      lbpn01:
        type: scaleway:loadbalancers:PrivateNetwork
        properties:
          lbId: ${lb01.id}
          privateNetworkId: ${pn01.id}
          ipamIpIds: ${ip01.id}
    

    Create PrivateNetwork Resource

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

    Constructor syntax

    new PrivateNetwork(name: string, args: PrivateNetworkArgs, opts?: CustomResourceOptions);
    @overload
    def PrivateNetwork(resource_name: str,
                       args: PrivateNetworkArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrivateNetwork(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       lb_id: Optional[str] = None,
                       private_network_id: Optional[str] = None,
                       ipam_ip_ids: Optional[str] = None,
                       project_id: Optional[str] = None,
                       zone: Optional[str] = None)
    func NewPrivateNetwork(ctx *Context, name string, args PrivateNetworkArgs, opts ...ResourceOption) (*PrivateNetwork, error)
    public PrivateNetwork(string name, PrivateNetworkArgs args, CustomResourceOptions? opts = null)
    public PrivateNetwork(String name, PrivateNetworkArgs args)
    public PrivateNetwork(String name, PrivateNetworkArgs args, CustomResourceOptions options)
    
    type: scaleway:loadbalancers:PrivateNetwork
    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 PrivateNetworkArgs
    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 PrivateNetworkArgs
    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 PrivateNetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivateNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivateNetworkArgs
    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 privateNetworkResource = new Scaleway.Loadbalancers.PrivateNetwork("privateNetworkResource", new()
    {
        LbId = "string",
        PrivateNetworkId = "string",
        IpamIpIds = "string",
        ProjectId = "string",
        Zone = "string",
    });
    
    example, err := loadbalancers.NewPrivateNetwork(ctx, "privateNetworkResource", &loadbalancers.PrivateNetworkArgs{
    	LbId:             pulumi.String("string"),
    	PrivateNetworkId: pulumi.String("string"),
    	IpamIpIds:        pulumi.String("string"),
    	ProjectId:        pulumi.String("string"),
    	Zone:             pulumi.String("string"),
    })
    
    var privateNetworkResource = new com.pulumi.scaleway.loadbalancers.PrivateNetwork("privateNetworkResource", com.pulumi.scaleway.loadbalancers.PrivateNetworkArgs.builder()
        .lbId("string")
        .privateNetworkId("string")
        .ipamIpIds("string")
        .projectId("string")
        .zone("string")
        .build());
    
    private_network_resource = scaleway.loadbalancers.PrivateNetwork("privateNetworkResource",
        lb_id="string",
        private_network_id="string",
        ipam_ip_ids="string",
        project_id="string",
        zone="string")
    
    const privateNetworkResource = new scaleway.loadbalancers.PrivateNetwork("privateNetworkResource", {
        lbId: "string",
        privateNetworkId: "string",
        ipamIpIds: "string",
        projectId: "string",
        zone: "string",
    });
    
    type: scaleway:loadbalancers:PrivateNetwork
    properties:
        ipamIpIds: string
        lbId: string
        privateNetworkId: string
        projectId: string
        zone: string
    

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

    LbId string
    The load-balancer ID to attach the private network to.
    PrivateNetworkId string
    The private network ID to attach.
    IpamIpIds string
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    ProjectId string
    project_id) The ID of the Project the Private Network attachment is associated with.
    Zone string
    zone) The zone in which the Private Network should be attached.
    LbId string
    The load-balancer ID to attach the private network to.
    PrivateNetworkId string
    The private network ID to attach.
    IpamIpIds string
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    ProjectId string
    project_id) The ID of the Project the Private Network attachment is associated with.
    Zone string
    zone) The zone in which the Private Network should be attached.
    lbId String
    The load-balancer ID to attach the private network to.
    privateNetworkId String
    The private network ID to attach.
    ipamIpIds String
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    projectId String
    project_id) The ID of the Project the Private Network attachment is associated with.
    zone String
    zone) The zone in which the Private Network should be attached.
    lbId string
    The load-balancer ID to attach the private network to.
    privateNetworkId string
    The private network ID to attach.
    ipamIpIds string
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    projectId string
    project_id) The ID of the Project the Private Network attachment is associated with.
    zone string
    zone) The zone in which the Private Network should be attached.
    lb_id str
    The load-balancer ID to attach the private network to.
    private_network_id str
    The private network ID to attach.
    ipam_ip_ids str
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    project_id str
    project_id) The ID of the Project the Private Network attachment is associated with.
    zone str
    zone) The zone in which the Private Network should be attached.
    lbId String
    The load-balancer ID to attach the private network to.
    privateNetworkId String
    The private network ID to attach.
    ipamIpIds String
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    projectId String
    project_id) The ID of the Project the Private Network attachment is associated with.
    zone String
    zone) The zone in which the Private Network should be attached.

    Outputs

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

    CreatedAt string
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Private Network attachment.
    UpdatedAt string
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    CreatedAt string
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Private Network attachment.
    UpdatedAt string
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    createdAt String
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Private Network attachment.
    updatedAt String
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    createdAt string
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the Private Network attachment.
    updatedAt string
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    created_at str
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the Private Network attachment.
    updated_at str
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    createdAt String
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Private Network attachment.
    updatedAt String
    The date and time of the last update of the Private Network attachment (RFC 3339 format).

    Look up Existing PrivateNetwork Resource

    Get an existing PrivateNetwork 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?: PrivateNetworkState, opts?: CustomResourceOptions): PrivateNetwork
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            ipam_ip_ids: Optional[str] = None,
            lb_id: Optional[str] = None,
            private_network_id: Optional[str] = None,
            project_id: Optional[str] = None,
            status: Optional[str] = None,
            updated_at: Optional[str] = None,
            zone: Optional[str] = None) -> PrivateNetwork
    func GetPrivateNetwork(ctx *Context, name string, id IDInput, state *PrivateNetworkState, opts ...ResourceOption) (*PrivateNetwork, error)
    public static PrivateNetwork Get(string name, Input<string> id, PrivateNetworkState? state, CustomResourceOptions? opts = null)
    public static PrivateNetwork get(String name, Output<String> id, PrivateNetworkState state, CustomResourceOptions options)
    resources:  _:    type: scaleway:loadbalancers:PrivateNetwork    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:
    CreatedAt string
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    IpamIpIds string
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    LbId string
    The load-balancer ID to attach the private network to.
    PrivateNetworkId string
    The private network ID to attach.
    ProjectId string
    project_id) The ID of the Project the Private Network attachment is associated with.
    Status string
    The status of the Private Network attachment.
    UpdatedAt string
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    Zone string
    zone) The zone in which the Private Network should be attached.
    CreatedAt string
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    IpamIpIds string
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    LbId string
    The load-balancer ID to attach the private network to.
    PrivateNetworkId string
    The private network ID to attach.
    ProjectId string
    project_id) The ID of the Project the Private Network attachment is associated with.
    Status string
    The status of the Private Network attachment.
    UpdatedAt string
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    Zone string
    zone) The zone in which the Private Network should be attached.
    createdAt String
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    ipamIpIds String
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    lbId String
    The load-balancer ID to attach the private network to.
    privateNetworkId String
    The private network ID to attach.
    projectId String
    project_id) The ID of the Project the Private Network attachment is associated with.
    status String
    The status of the Private Network attachment.
    updatedAt String
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    zone String
    zone) The zone in which the Private Network should be attached.
    createdAt string
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    ipamIpIds string
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    lbId string
    The load-balancer ID to attach the private network to.
    privateNetworkId string
    The private network ID to attach.
    projectId string
    project_id) The ID of the Project the Private Network attachment is associated with.
    status string
    The status of the Private Network attachment.
    updatedAt string
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    zone string
    zone) The zone in which the Private Network should be attached.
    created_at str
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    ipam_ip_ids str
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    lb_id str
    The load-balancer ID to attach the private network to.
    private_network_id str
    The private network ID to attach.
    project_id str
    project_id) The ID of the Project the Private Network attachment is associated with.
    status str
    The status of the Private Network attachment.
    updated_at str
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    zone str
    zone) The zone in which the Private Network should be attached.
    createdAt String
    The date and time of the creation of the Private Network attachment (RFC 3339 format).
    ipamIpIds String
    The IPAM ID of a pre-reserved IP address to assign to the Load Balancer on this Private Network.
    lbId String
    The load-balancer ID to attach the private network to.
    privateNetworkId String
    The private network ID to attach.
    projectId String
    project_id) The ID of the Project the Private Network attachment is associated with.
    status String
    The status of the Private Network attachment.
    updatedAt String
    The date and time of the last update of the Private Network attachment (RFC 3339 format).
    zone String
    zone) The zone in which the Private Network should be attached.

    Import

    Private Network attachments can be imported using {zone}/{lb-id}/{private-network-id}, e.g.

    bash

    $ pulumi import scaleway:loadbalancers/privateNetwork:PrivateNetwork lbpn01 fr-par-1/11111111-1111-1111-1111-111111111111/11111111-1111-1111-1111-111111111111
    

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

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.38.0 published on Tuesday, Nov 18, 2025 by pulumiverse
      Meet Neo: Your AI Platform Teammate