1. Packages
  2. Scaleway
  3. API Docs
  4. InstanceServer
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

scaleway.InstanceServer

Explore with Pulumi AI

scaleway logo
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

    Creates and manages Scaleway Compute Instance servers. For more information, see the documentation.

    Please check our FAQ - Instances.

    Example Usage

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const publicIp = new scaleway.InstanceIp("publicIp", {});
    const web = new scaleway.InstanceServer("web", {
        type: "DEV1-S",
        image: "ubuntu_jammy",
        ipId: publicIp.id,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    public_ip = scaleway.InstanceIp("publicIp")
    web = scaleway.InstanceServer("web",
        type="DEV1-S",
        image="ubuntu_jammy",
        ip_id=public_ip.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		publicIp, err := scaleway.NewInstanceIp(ctx, "publicIp", nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceServer(ctx, "web", &scaleway.InstanceServerArgs{
    			Type:  pulumi.String("DEV1-S"),
    			Image: pulumi.String("ubuntu_jammy"),
    			IpId:  publicIp.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 publicIp = new Scaleway.InstanceIp("publicIp");
    
        var web = new Scaleway.InstanceServer("web", new()
        {
            Type = "DEV1-S",
            Image = "ubuntu_jammy",
            IpId = publicIp.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceIp;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    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 publicIp = new InstanceIp("publicIp");
    
            var web = new InstanceServer("web", InstanceServerArgs.builder()        
                .type("DEV1-S")
                .image("ubuntu_jammy")
                .ipId(publicIp.id())
                .build());
    
        }
    }
    
    resources:
      publicIp:
        type: scaleway:InstanceIp
      web:
        type: scaleway:InstanceServer
        properties:
          type: DEV1-S
          image: ubuntu_jammy
          ipId: ${publicIp.id}
    

    With additional volumes and tags

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const data = new scaleway.InstanceVolume("data", {
        sizeInGb: 100,
        type: "b_ssd",
    });
    const web = new scaleway.InstanceServer("web", {
        type: "DEV1-S",
        image: "ubuntu_jammy",
        tags: [
            "hello",
            "public",
        ],
        rootVolume: {
            deleteOnTermination: false,
        },
        additionalVolumeIds: [data.id],
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    data = scaleway.InstanceVolume("data",
        size_in_gb=100,
        type="b_ssd")
    web = scaleway.InstanceServer("web",
        type="DEV1-S",
        image="ubuntu_jammy",
        tags=[
            "hello",
            "public",
        ],
        root_volume=scaleway.InstanceServerRootVolumeArgs(
            delete_on_termination=False,
        ),
        additional_volume_ids=[data.id])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		data, err := scaleway.NewInstanceVolume(ctx, "data", &scaleway.InstanceVolumeArgs{
    			SizeInGb: pulumi.Int(100),
    			Type:     pulumi.String("b_ssd"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceServer(ctx, "web", &scaleway.InstanceServerArgs{
    			Type:  pulumi.String("DEV1-S"),
    			Image: pulumi.String("ubuntu_jammy"),
    			Tags: pulumi.StringArray{
    				pulumi.String("hello"),
    				pulumi.String("public"),
    			},
    			RootVolume: &scaleway.InstanceServerRootVolumeArgs{
    				DeleteOnTermination: pulumi.Bool(false),
    			},
    			AdditionalVolumeIds: pulumi.StringArray{
    				data.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 data = new Scaleway.InstanceVolume("data", new()
        {
            SizeInGb = 100,
            Type = "b_ssd",
        });
    
        var web = new Scaleway.InstanceServer("web", new()
        {
            Type = "DEV1-S",
            Image = "ubuntu_jammy",
            Tags = new[]
            {
                "hello",
                "public",
            },
            RootVolume = new Scaleway.Inputs.InstanceServerRootVolumeArgs
            {
                DeleteOnTermination = false,
            },
            AdditionalVolumeIds = new[]
            {
                data.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceVolume;
    import com.pulumi.scaleway.InstanceVolumeArgs;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    import com.pulumi.scaleway.inputs.InstanceServerRootVolumeArgs;
    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 data = new InstanceVolume("data", InstanceVolumeArgs.builder()        
                .sizeInGb(100)
                .type("b_ssd")
                .build());
    
            var web = new InstanceServer("web", InstanceServerArgs.builder()        
                .type("DEV1-S")
                .image("ubuntu_jammy")
                .tags(            
                    "hello",
                    "public")
                .rootVolume(InstanceServerRootVolumeArgs.builder()
                    .deleteOnTermination(false)
                    .build())
                .additionalVolumeIds(data.id())
                .build());
    
        }
    }
    
    resources:
      data:
        type: scaleway:InstanceVolume
        properties:
          sizeInGb: 100
          type: b_ssd
      web:
        type: scaleway:InstanceServer
        properties:
          type: DEV1-S
          image: ubuntu_jammy
          tags:
            - hello
            - public
          rootVolume:
            deleteOnTermination: false
          additionalVolumeIds:
            - ${data.id}
    

    With a reserved IP

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const ip = new scaleway.InstanceIp("ip", {});
    const web = new scaleway.InstanceServer("web", {
        type: "DEV1-S",
        image: "f974feac-abae-4365-b988-8ec7d1cec10d",
        tags: [
            "hello",
            "public",
        ],
        ipId: ip.id,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    ip = scaleway.InstanceIp("ip")
    web = scaleway.InstanceServer("web",
        type="DEV1-S",
        image="f974feac-abae-4365-b988-8ec7d1cec10d",
        tags=[
            "hello",
            "public",
        ],
        ip_id=ip.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ip, err := scaleway.NewInstanceIp(ctx, "ip", nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceServer(ctx, "web", &scaleway.InstanceServerArgs{
    			Type:  pulumi.String("DEV1-S"),
    			Image: pulumi.String("f974feac-abae-4365-b988-8ec7d1cec10d"),
    			Tags: pulumi.StringArray{
    				pulumi.String("hello"),
    				pulumi.String("public"),
    			},
    			IpId: ip.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 ip = new Scaleway.InstanceIp("ip");
    
        var web = new Scaleway.InstanceServer("web", new()
        {
            Type = "DEV1-S",
            Image = "f974feac-abae-4365-b988-8ec7d1cec10d",
            Tags = new[]
            {
                "hello",
                "public",
            },
            IpId = ip.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceIp;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    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 ip = new InstanceIp("ip");
    
            var web = new InstanceServer("web", InstanceServerArgs.builder()        
                .type("DEV1-S")
                .image("f974feac-abae-4365-b988-8ec7d1cec10d")
                .tags(            
                    "hello",
                    "public")
                .ipId(ip.id())
                .build());
    
        }
    }
    
    resources:
      ip:
        type: scaleway:InstanceIp
      web:
        type: scaleway:InstanceServer
        properties:
          type: DEV1-S
          image: f974feac-abae-4365-b988-8ec7d1cec10d
          tags:
            - hello
            - public
          ipId: ${ip.id}
    

    With security group

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const www = new scaleway.InstanceSecurityGroup("www", {
        inboundDefaultPolicy: "drop",
        outboundDefaultPolicy: "accept",
        inboundRules: [
            {
                action: "accept",
                port: 22,
                ip: "212.47.225.64",
            },
            {
                action: "accept",
                port: 80,
            },
            {
                action: "accept",
                port: 443,
            },
        ],
        outboundRules: [{
            action: "drop",
            ipRange: "10.20.0.0/24",
        }],
    });
    const web = new scaleway.InstanceServer("web", {
        type: "DEV1-S",
        image: "ubuntu_jammy",
        securityGroupId: www.id,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    www = scaleway.InstanceSecurityGroup("www",
        inbound_default_policy="drop",
        outbound_default_policy="accept",
        inbound_rules=[
            scaleway.InstanceSecurityGroupInboundRuleArgs(
                action="accept",
                port=22,
                ip="212.47.225.64",
            ),
            scaleway.InstanceSecurityGroupInboundRuleArgs(
                action="accept",
                port=80,
            ),
            scaleway.InstanceSecurityGroupInboundRuleArgs(
                action="accept",
                port=443,
            ),
        ],
        outbound_rules=[scaleway.InstanceSecurityGroupOutboundRuleArgs(
            action="drop",
            ip_range="10.20.0.0/24",
        )])
    web = scaleway.InstanceServer("web",
        type="DEV1-S",
        image="ubuntu_jammy",
        security_group_id=www.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		www, err := scaleway.NewInstanceSecurityGroup(ctx, "www", &scaleway.InstanceSecurityGroupArgs{
    			InboundDefaultPolicy:  pulumi.String("drop"),
    			OutboundDefaultPolicy: pulumi.String("accept"),
    			InboundRules: scaleway.InstanceSecurityGroupInboundRuleArray{
    				&scaleway.InstanceSecurityGroupInboundRuleArgs{
    					Action: pulumi.String("accept"),
    					Port:   pulumi.Int(22),
    					Ip:     pulumi.String("212.47.225.64"),
    				},
    				&scaleway.InstanceSecurityGroupInboundRuleArgs{
    					Action: pulumi.String("accept"),
    					Port:   pulumi.Int(80),
    				},
    				&scaleway.InstanceSecurityGroupInboundRuleArgs{
    					Action: pulumi.String("accept"),
    					Port:   pulumi.Int(443),
    				},
    			},
    			OutboundRules: scaleway.InstanceSecurityGroupOutboundRuleArray{
    				&scaleway.InstanceSecurityGroupOutboundRuleArgs{
    					Action:  pulumi.String("drop"),
    					IpRange: pulumi.String("10.20.0.0/24"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceServer(ctx, "web", &scaleway.InstanceServerArgs{
    			Type:            pulumi.String("DEV1-S"),
    			Image:           pulumi.String("ubuntu_jammy"),
    			SecurityGroupId: www.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 www = new Scaleway.InstanceSecurityGroup("www", new()
        {
            InboundDefaultPolicy = "drop",
            OutboundDefaultPolicy = "accept",
            InboundRules = new[]
            {
                new Scaleway.Inputs.InstanceSecurityGroupInboundRuleArgs
                {
                    Action = "accept",
                    Port = 22,
                    Ip = "212.47.225.64",
                },
                new Scaleway.Inputs.InstanceSecurityGroupInboundRuleArgs
                {
                    Action = "accept",
                    Port = 80,
                },
                new Scaleway.Inputs.InstanceSecurityGroupInboundRuleArgs
                {
                    Action = "accept",
                    Port = 443,
                },
            },
            OutboundRules = new[]
            {
                new Scaleway.Inputs.InstanceSecurityGroupOutboundRuleArgs
                {
                    Action = "drop",
                    IpRange = "10.20.0.0/24",
                },
            },
        });
    
        var web = new Scaleway.InstanceServer("web", new()
        {
            Type = "DEV1-S",
            Image = "ubuntu_jammy",
            SecurityGroupId = www.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceSecurityGroup;
    import com.pulumi.scaleway.InstanceSecurityGroupArgs;
    import com.pulumi.scaleway.inputs.InstanceSecurityGroupInboundRuleArgs;
    import com.pulumi.scaleway.inputs.InstanceSecurityGroupOutboundRuleArgs;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    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 www = new InstanceSecurityGroup("www", InstanceSecurityGroupArgs.builder()        
                .inboundDefaultPolicy("drop")
                .outboundDefaultPolicy("accept")
                .inboundRules(            
                    InstanceSecurityGroupInboundRuleArgs.builder()
                        .action("accept")
                        .port("22")
                        .ip("212.47.225.64")
                        .build(),
                    InstanceSecurityGroupInboundRuleArgs.builder()
                        .action("accept")
                        .port("80")
                        .build(),
                    InstanceSecurityGroupInboundRuleArgs.builder()
                        .action("accept")
                        .port("443")
                        .build())
                .outboundRules(InstanceSecurityGroupOutboundRuleArgs.builder()
                    .action("drop")
                    .ipRange("10.20.0.0/24")
                    .build())
                .build());
    
            var web = new InstanceServer("web", InstanceServerArgs.builder()        
                .type("DEV1-S")
                .image("ubuntu_jammy")
                .securityGroupId(www.id())
                .build());
    
        }
    }
    
    resources:
      www:
        type: scaleway:InstanceSecurityGroup
        properties:
          inboundDefaultPolicy: drop
          outboundDefaultPolicy: accept
          inboundRules:
            - action: accept
              port: '22'
              ip: 212.47.225.64
            - action: accept
              port: '80'
            - action: accept
              port: '443'
          outboundRules:
            - action: drop
              ipRange: 10.20.0.0/24
      web:
        type: scaleway:InstanceServer
        properties:
          type: DEV1-S
          image: ubuntu_jammy
          securityGroupId: ${www.id}
    

    With user data and cloud-init

    import * as pulumi from "@pulumi/pulumi";
    import * as fs from "fs";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const web = new scaleway.InstanceServer("web", {
        type: "DEV1-S",
        image: "ubuntu_jammy",
        userData: {
            foo: "bar",
            "cloud-init": fs.readFileSync(`${path.module}/cloud-init.yml`, "utf8"),
        },
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    web = scaleway.InstanceServer("web",
        type="DEV1-S",
        image="ubuntu_jammy",
        user_data={
            "foo": "bar",
            "cloud-init": (lambda path: open(path).read())(f"{path['module']}/cloud-init.yml"),
        })
    
    package main
    
    import (
    	"fmt"
    	"os"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewInstanceServer(ctx, "web", &scaleway.InstanceServerArgs{
    			Type:  pulumi.String("DEV1-S"),
    			Image: pulumi.String("ubuntu_jammy"),
    			UserData: pulumi.StringMap{
    				"foo":        pulumi.String("bar"),
    				"cloud-init": readFileOrPanic(fmt.Sprintf("%v/cloud-init.yml", path.Module)),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var web = new Scaleway.InstanceServer("web", new()
        {
            Type = "DEV1-S",
            Image = "ubuntu_jammy",
            UserData = 
            {
                { "foo", "bar" },
                { "cloud-init", File.ReadAllText($"{path.Module}/cloud-init.yml") },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    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 web = new InstanceServer("web", InstanceServerArgs.builder()        
                .type("DEV1-S")
                .image("ubuntu_jammy")
                .userData(Map.ofEntries(
                    Map.entry("foo", "bar"),
                    Map.entry("cloud-init", Files.readString(Paths.get(String.format("%s/cloud-init.yml", path.module()))))
                ))
                .build());
    
        }
    }
    
    resources:
      web:
        type: scaleway:InstanceServer
        properties:
          type: DEV1-S
          image: ubuntu_jammy
          userData:
            foo: bar
            cloud-init:
              fn::readFile: ${path.module}/cloud-init.yml
    

    With private network

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const pn01 = new scaleway.VpcPrivateNetwork("pn01", {});
    const base = new scaleway.InstanceServer("base", {
        image: "ubuntu_jammy",
        type: "DEV1-S",
        privateNetworks: [{
            pnId: pn01.id,
        }],
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    pn01 = scaleway.VpcPrivateNetwork("pn01")
    base = scaleway.InstanceServer("base",
        image="ubuntu_jammy",
        type="DEV1-S",
        private_networks=[scaleway.InstanceServerPrivateNetworkArgs(
            pn_id=pn01.id,
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pn01, err := scaleway.NewVpcPrivateNetwork(ctx, "pn01", nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceServer(ctx, "base", &scaleway.InstanceServerArgs{
    			Image: pulumi.String("ubuntu_jammy"),
    			Type:  pulumi.String("DEV1-S"),
    			PrivateNetworks: scaleway.InstanceServerPrivateNetworkArray{
    				&scaleway.InstanceServerPrivateNetworkArgs{
    					PnId: pn01.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 pn01 = new Scaleway.VpcPrivateNetwork("pn01");
    
        var @base = new Scaleway.InstanceServer("base", new()
        {
            Image = "ubuntu_jammy",
            Type = "DEV1-S",
            PrivateNetworks = new[]
            {
                new Scaleway.Inputs.InstanceServerPrivateNetworkArgs
                {
                    PnId = pn01.Id,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.VpcPrivateNetwork;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    import com.pulumi.scaleway.inputs.InstanceServerPrivateNetworkArgs;
    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 pn01 = new VpcPrivateNetwork("pn01");
    
            var base = new InstanceServer("base", InstanceServerArgs.builder()        
                .image("ubuntu_jammy")
                .type("DEV1-S")
                .privateNetworks(InstanceServerPrivateNetworkArgs.builder()
                    .pnId(pn01.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      pn01:
        type: scaleway:VpcPrivateNetwork
      base:
        type: scaleway:InstanceServer
        properties:
          image: ubuntu_jammy
          type: DEV1-S
          privateNetworks:
            - pnId: ${pn01.id}
    

    Root volume configuration

    Resized block volume with installed image

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const image = new scaleway.InstanceServer("image", {
        image: "ubuntu_jammy",
        rootVolume: {
            sizeInGb: 100,
            volumeType: "b_ssd",
        },
        type: "PRO2-XXS",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    image = scaleway.InstanceServer("image",
        image="ubuntu_jammy",
        root_volume=scaleway.InstanceServerRootVolumeArgs(
            size_in_gb=100,
            volume_type="b_ssd",
        ),
        type="PRO2-XXS")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewInstanceServer(ctx, "image", &scaleway.InstanceServerArgs{
    			Image: pulumi.String("ubuntu_jammy"),
    			RootVolume: &scaleway.InstanceServerRootVolumeArgs{
    				SizeInGb:   pulumi.Int(100),
    				VolumeType: pulumi.String("b_ssd"),
    			},
    			Type: pulumi.String("PRO2-XXS"),
    		})
    		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 image = new Scaleway.InstanceServer("image", new()
        {
            Image = "ubuntu_jammy",
            RootVolume = new Scaleway.Inputs.InstanceServerRootVolumeArgs
            {
                SizeInGb = 100,
                VolumeType = "b_ssd",
            },
            Type = "PRO2-XXS",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    import com.pulumi.scaleway.inputs.InstanceServerRootVolumeArgs;
    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 image = new InstanceServer("image", InstanceServerArgs.builder()        
                .image("ubuntu_jammy")
                .rootVolume(InstanceServerRootVolumeArgs.builder()
                    .sizeInGb(100)
                    .volumeType("b_ssd")
                    .build())
                .type("PRO2-XXS")
                .build());
    
        }
    }
    
    resources:
      image:
        type: scaleway:InstanceServer
        properties:
          image: ubuntu_jammy
          rootVolume:
            sizeInGb: 100
            volumeType: b_ssd
          type: PRO2-XXS
    

    From snapshot

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const snapshot = scaleway.getInstanceSnapshot({
        name: "my_snapshot",
    });
    const fromSnapshotInstanceVolume = new scaleway.InstanceVolume("fromSnapshotInstanceVolume", {
        fromSnapshotId: snapshot.then(snapshot => snapshot.id),
        type: "b_ssd",
    });
    const fromSnapshotInstanceServer = new scaleway.InstanceServer("fromSnapshotInstanceServer", {
        type: "PRO2-XXS",
        rootVolume: {
            volumeId: fromSnapshotInstanceVolume.id,
        },
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    snapshot = scaleway.get_instance_snapshot(name="my_snapshot")
    from_snapshot_instance_volume = scaleway.InstanceVolume("fromSnapshotInstanceVolume",
        from_snapshot_id=snapshot.id,
        type="b_ssd")
    from_snapshot_instance_server = scaleway.InstanceServer("fromSnapshotInstanceServer",
        type="PRO2-XXS",
        root_volume=scaleway.InstanceServerRootVolumeArgs(
            volume_id=from_snapshot_instance_volume.id,
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		snapshot, err := scaleway.LookupInstanceSnapshot(ctx, &scaleway.LookupInstanceSnapshotArgs{
    			Name: pulumi.StringRef("my_snapshot"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		fromSnapshotInstanceVolume, err := scaleway.NewInstanceVolume(ctx, "fromSnapshotInstanceVolume", &scaleway.InstanceVolumeArgs{
    			FromSnapshotId: pulumi.String(snapshot.Id),
    			Type:           pulumi.String("b_ssd"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceServer(ctx, "fromSnapshotInstanceServer", &scaleway.InstanceServerArgs{
    			Type: pulumi.String("PRO2-XXS"),
    			RootVolume: &scaleway.InstanceServerRootVolumeArgs{
    				VolumeId: fromSnapshotInstanceVolume.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var snapshot = Scaleway.GetInstanceSnapshot.Invoke(new()
        {
            Name = "my_snapshot",
        });
    
        var fromSnapshotInstanceVolume = new Scaleway.InstanceVolume("fromSnapshotInstanceVolume", new()
        {
            FromSnapshotId = snapshot.Apply(getInstanceSnapshotResult => getInstanceSnapshotResult.Id),
            Type = "b_ssd",
        });
    
        var fromSnapshotInstanceServer = new Scaleway.InstanceServer("fromSnapshotInstanceServer", new()
        {
            Type = "PRO2-XXS",
            RootVolume = new Scaleway.Inputs.InstanceServerRootVolumeArgs
            {
                VolumeId = fromSnapshotInstanceVolume.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetInstanceSnapshotArgs;
    import com.pulumi.scaleway.InstanceVolume;
    import com.pulumi.scaleway.InstanceVolumeArgs;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    import com.pulumi.scaleway.inputs.InstanceServerRootVolumeArgs;
    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 snapshot = ScalewayFunctions.getInstanceSnapshot(GetInstanceSnapshotArgs.builder()
                .name("my_snapshot")
                .build());
    
            var fromSnapshotInstanceVolume = new InstanceVolume("fromSnapshotInstanceVolume", InstanceVolumeArgs.builder()        
                .fromSnapshotId(snapshot.applyValue(getInstanceSnapshotResult -> getInstanceSnapshotResult.id()))
                .type("b_ssd")
                .build());
    
            var fromSnapshotInstanceServer = new InstanceServer("fromSnapshotInstanceServer", InstanceServerArgs.builder()        
                .type("PRO2-XXS")
                .rootVolume(InstanceServerRootVolumeArgs.builder()
                    .volumeId(fromSnapshotInstanceVolume.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      fromSnapshotInstanceVolume:
        type: scaleway:InstanceVolume
        properties:
          fromSnapshotId: ${snapshot.id}
          type: b_ssd
      fromSnapshotInstanceServer:
        type: scaleway:InstanceServer
        properties:
          type: PRO2-XXS
          rootVolume:
            volumeId: ${fromSnapshotInstanceVolume.id}
    variables:
      snapshot:
        fn::invoke:
          Function: scaleway:getInstanceSnapshot
          Arguments:
            name: my_snapshot
    

    Private Network

    Important: Updates to private_network will recreate a new private network interface.

    • pn_id - (Required) The private network ID where to connect.
    • mac_address The private NIC MAC address.
    • status The private NIC state.
    • zone - (Defaults to provider zone) The zone in which the server must be created.

    Important:

    • You can only attach an instance in the same zone as a private network.
    • Instance supports maximum 8 different private networks.

    Create InstanceServer Resource

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

    Constructor syntax

    new InstanceServer(name: string, args: InstanceServerArgs, opts?: CustomResourceOptions);
    @overload
    def InstanceServer(resource_name: str,
                       args: InstanceServerArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def InstanceServer(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       type: Optional[str] = None,
                       placement_group_id: Optional[str] = None,
                       cloud_init: Optional[str] = None,
                       project_id: Optional[str] = None,
                       enable_dynamic_ip: Optional[bool] = None,
                       enable_ipv6: Optional[bool] = None,
                       image: Optional[str] = None,
                       ip_id: Optional[str] = None,
                       ip_ids: Optional[Sequence[str]] = None,
                       public_ips: Optional[Sequence[InstanceServerPublicIpArgs]] = None,
                       additional_volume_ids: Optional[Sequence[str]] = None,
                       zone: Optional[str] = None,
                       bootscript_id: Optional[str] = None,
                       name: Optional[str] = None,
                       replace_on_type_change: Optional[bool] = None,
                       root_volume: Optional[InstanceServerRootVolumeArgs] = None,
                       routed_ip_enabled: Optional[bool] = None,
                       security_group_id: Optional[str] = None,
                       state: Optional[str] = None,
                       tags: Optional[Sequence[str]] = None,
                       boot_type: Optional[str] = None,
                       user_data: Optional[Mapping[str, str]] = None,
                       private_networks: Optional[Sequence[InstanceServerPrivateNetworkArgs]] = None)
    func NewInstanceServer(ctx *Context, name string, args InstanceServerArgs, opts ...ResourceOption) (*InstanceServer, error)
    public InstanceServer(string name, InstanceServerArgs args, CustomResourceOptions? opts = null)
    public InstanceServer(String name, InstanceServerArgs args)
    public InstanceServer(String name, InstanceServerArgs args, CustomResourceOptions options)
    
    type: scaleway:InstanceServer
    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 InstanceServerArgs
    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 InstanceServerArgs
    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 InstanceServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var instanceServerResource = new Scaleway.InstanceServer("instanceServerResource", new()
    {
        Type = "string",
        PlacementGroupId = "string",
        CloudInit = "string",
        ProjectId = "string",
        EnableDynamicIp = false,
        EnableIpv6 = false,
        Image = "string",
        IpId = "string",
        IpIds = new[]
        {
            "string",
        },
        PublicIps = new[]
        {
            new Scaleway.Inputs.InstanceServerPublicIpArgs
            {
                Address = "string",
                Id = "string",
            },
        },
        AdditionalVolumeIds = new[]
        {
            "string",
        },
        Zone = "string",
        BootscriptId = "string",
        Name = "string",
        ReplaceOnTypeChange = false,
        RootVolume = new Scaleway.Inputs.InstanceServerRootVolumeArgs
        {
            Boot = false,
            DeleteOnTermination = false,
            Name = "string",
            SizeInGb = 0,
            VolumeId = "string",
            VolumeType = "string",
        },
        RoutedIpEnabled = false,
        SecurityGroupId = "string",
        State = "string",
        Tags = new[]
        {
            "string",
        },
        BootType = "string",
        UserData = 
        {
            { "string", "string" },
        },
        PrivateNetworks = new[]
        {
            new Scaleway.Inputs.InstanceServerPrivateNetworkArgs
            {
                PnId = "string",
                MacAddress = "string",
                Status = "string",
                Zone = "string",
            },
        },
    });
    
    example, err := scaleway.NewInstanceServer(ctx, "instanceServerResource", &scaleway.InstanceServerArgs{
    	Type:             pulumi.String("string"),
    	PlacementGroupId: pulumi.String("string"),
    	CloudInit:        pulumi.String("string"),
    	ProjectId:        pulumi.String("string"),
    	EnableDynamicIp:  pulumi.Bool(false),
    	EnableIpv6:       pulumi.Bool(false),
    	Image:            pulumi.String("string"),
    	IpId:             pulumi.String("string"),
    	IpIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PublicIps: scaleway.InstanceServerPublicIpArray{
    		&scaleway.InstanceServerPublicIpArgs{
    			Address: pulumi.String("string"),
    			Id:      pulumi.String("string"),
    		},
    	},
    	AdditionalVolumeIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Zone:                pulumi.String("string"),
    	BootscriptId:        pulumi.String("string"),
    	Name:                pulumi.String("string"),
    	ReplaceOnTypeChange: pulumi.Bool(false),
    	RootVolume: &scaleway.InstanceServerRootVolumeArgs{
    		Boot:                pulumi.Bool(false),
    		DeleteOnTermination: pulumi.Bool(false),
    		Name:                pulumi.String("string"),
    		SizeInGb:            pulumi.Int(0),
    		VolumeId:            pulumi.String("string"),
    		VolumeType:          pulumi.String("string"),
    	},
    	RoutedIpEnabled: pulumi.Bool(false),
    	SecurityGroupId: pulumi.String("string"),
    	State:           pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	BootType: pulumi.String("string"),
    	UserData: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	PrivateNetworks: scaleway.InstanceServerPrivateNetworkArray{
    		&scaleway.InstanceServerPrivateNetworkArgs{
    			PnId:       pulumi.String("string"),
    			MacAddress: pulumi.String("string"),
    			Status:     pulumi.String("string"),
    			Zone:       pulumi.String("string"),
    		},
    	},
    })
    
    var instanceServerResource = new InstanceServer("instanceServerResource", InstanceServerArgs.builder()        
        .type("string")
        .placementGroupId("string")
        .cloudInit("string")
        .projectId("string")
        .enableDynamicIp(false)
        .enableIpv6(false)
        .image("string")
        .ipId("string")
        .ipIds("string")
        .publicIps(InstanceServerPublicIpArgs.builder()
            .address("string")
            .id("string")
            .build())
        .additionalVolumeIds("string")
        .zone("string")
        .bootscriptId("string")
        .name("string")
        .replaceOnTypeChange(false)
        .rootVolume(InstanceServerRootVolumeArgs.builder()
            .boot(false)
            .deleteOnTermination(false)
            .name("string")
            .sizeInGb(0)
            .volumeId("string")
            .volumeType("string")
            .build())
        .routedIpEnabled(false)
        .securityGroupId("string")
        .state("string")
        .tags("string")
        .bootType("string")
        .userData(Map.of("string", "string"))
        .privateNetworks(InstanceServerPrivateNetworkArgs.builder()
            .pnId("string")
            .macAddress("string")
            .status("string")
            .zone("string")
            .build())
        .build());
    
    instance_server_resource = scaleway.InstanceServer("instanceServerResource",
        type="string",
        placement_group_id="string",
        cloud_init="string",
        project_id="string",
        enable_dynamic_ip=False,
        enable_ipv6=False,
        image="string",
        ip_id="string",
        ip_ids=["string"],
        public_ips=[scaleway.InstanceServerPublicIpArgs(
            address="string",
            id="string",
        )],
        additional_volume_ids=["string"],
        zone="string",
        bootscript_id="string",
        name="string",
        replace_on_type_change=False,
        root_volume=scaleway.InstanceServerRootVolumeArgs(
            boot=False,
            delete_on_termination=False,
            name="string",
            size_in_gb=0,
            volume_id="string",
            volume_type="string",
        ),
        routed_ip_enabled=False,
        security_group_id="string",
        state="string",
        tags=["string"],
        boot_type="string",
        user_data={
            "string": "string",
        },
        private_networks=[scaleway.InstanceServerPrivateNetworkArgs(
            pn_id="string",
            mac_address="string",
            status="string",
            zone="string",
        )])
    
    const instanceServerResource = new scaleway.InstanceServer("instanceServerResource", {
        type: "string",
        placementGroupId: "string",
        cloudInit: "string",
        projectId: "string",
        enableDynamicIp: false,
        enableIpv6: false,
        image: "string",
        ipId: "string",
        ipIds: ["string"],
        publicIps: [{
            address: "string",
            id: "string",
        }],
        additionalVolumeIds: ["string"],
        zone: "string",
        bootscriptId: "string",
        name: "string",
        replaceOnTypeChange: false,
        rootVolume: {
            boot: false,
            deleteOnTermination: false,
            name: "string",
            sizeInGb: 0,
            volumeId: "string",
            volumeType: "string",
        },
        routedIpEnabled: false,
        securityGroupId: "string",
        state: "string",
        tags: ["string"],
        bootType: "string",
        userData: {
            string: "string",
        },
        privateNetworks: [{
            pnId: "string",
            macAddress: "string",
            status: "string",
            zone: "string",
        }],
    });
    
    type: scaleway:InstanceServer
    properties:
        additionalVolumeIds:
            - string
        bootType: string
        bootscriptId: string
        cloudInit: string
        enableDynamicIp: false
        enableIpv6: false
        image: string
        ipId: string
        ipIds:
            - string
        name: string
        placementGroupId: string
        privateNetworks:
            - macAddress: string
              pnId: string
              status: string
              zone: string
        projectId: string
        publicIps:
            - address: string
              id: string
        replaceOnTypeChange: false
        rootVolume:
            boot: false
            deleteOnTermination: false
            name: string
            sizeInGb: 0
            volumeId: string
            volumeType: string
        routedIpEnabled: false
        securityGroupId: string
        state: string
        tags:
            - string
        type: string
        userData:
            string: string
        zone: string
    

    InstanceServer Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The InstanceServer resource accepts the following input properties:

    Type string

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    AdditionalVolumeIds List<string>

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    BootType string
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    BootscriptId string
    The ID of the bootscript to use (set boot_type to bootscript).
    CloudInit string
    The cloud init script associated with this server
    EnableDynamicIp bool
    If true a dynamic IP will be attached to the server.
    EnableIpv6 bool
    Determines if IPv6 is enabled for the server.
    Image string

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    IpId string
    The ID of the reserved IP that is attached to the server.
    IpIds List<string>

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    Name string
    The name of the server.
    PlacementGroupId string

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    PrivateNetworks List<Pulumiverse.Scaleway.Inputs.InstanceServerPrivateNetwork>
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    ProjectId string
    project_id) The ID of the project the server is associated with.
    PublicIps List<Pulumiverse.Scaleway.Inputs.InstanceServerPublicIp>
    The list of public IPs of the server.
    ReplaceOnTypeChange bool
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    RootVolume Pulumiverse.Scaleway.Inputs.InstanceServerRootVolume
    Root volume attached to the server on creation.
    RoutedIpEnabled bool

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    SecurityGroupId string
    The security group the server is attached to.
    State string
    The state of the server. Possible values are: started, stopped or standby.
    Tags List<string>
    The tags associated with the server.
    UserData Dictionary<string, string>
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    Zone string
    zone) The zone in which the server should be created.
    Type string

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    AdditionalVolumeIds []string

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    BootType string
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    BootscriptId string
    The ID of the bootscript to use (set boot_type to bootscript).
    CloudInit string
    The cloud init script associated with this server
    EnableDynamicIp bool
    If true a dynamic IP will be attached to the server.
    EnableIpv6 bool
    Determines if IPv6 is enabled for the server.
    Image string

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    IpId string
    The ID of the reserved IP that is attached to the server.
    IpIds []string

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    Name string
    The name of the server.
    PlacementGroupId string

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    PrivateNetworks []InstanceServerPrivateNetworkArgs
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    ProjectId string
    project_id) The ID of the project the server is associated with.
    PublicIps []InstanceServerPublicIpArgs
    The list of public IPs of the server.
    ReplaceOnTypeChange bool
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    RootVolume InstanceServerRootVolumeArgs
    Root volume attached to the server on creation.
    RoutedIpEnabled bool

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    SecurityGroupId string
    The security group the server is attached to.
    State string
    The state of the server. Possible values are: started, stopped or standby.
    Tags []string
    The tags associated with the server.
    UserData map[string]string
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    Zone string
    zone) The zone in which the server should be created.
    type String

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    additionalVolumeIds List<String>

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    bootType String
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    bootscriptId String
    The ID of the bootscript to use (set boot_type to bootscript).
    cloudInit String
    The cloud init script associated with this server
    enableDynamicIp Boolean
    If true a dynamic IP will be attached to the server.
    enableIpv6 Boolean
    Determines if IPv6 is enabled for the server.
    image String

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    ipId String
    The ID of the reserved IP that is attached to the server.
    ipIds List<String>

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    name String
    The name of the server.
    placementGroupId String

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    privateNetworks List<InstanceServerPrivateNetwork>
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    projectId String
    project_id) The ID of the project the server is associated with.
    publicIps List<InstanceServerPublicIp>
    The list of public IPs of the server.
    replaceOnTypeChange Boolean
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    rootVolume InstanceServerRootVolume
    Root volume attached to the server on creation.
    routedIpEnabled Boolean

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    securityGroupId String
    The security group the server is attached to.
    state String
    The state of the server. Possible values are: started, stopped or standby.
    tags List<String>
    The tags associated with the server.
    userData Map<String,String>
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    zone String
    zone) The zone in which the server should be created.
    type string

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    additionalVolumeIds string[]

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    bootType string
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    bootscriptId string
    The ID of the bootscript to use (set boot_type to bootscript).
    cloudInit string
    The cloud init script associated with this server
    enableDynamicIp boolean
    If true a dynamic IP will be attached to the server.
    enableIpv6 boolean
    Determines if IPv6 is enabled for the server.
    image string

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    ipId string
    The ID of the reserved IP that is attached to the server.
    ipIds string[]

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    name string
    The name of the server.
    placementGroupId string

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    privateNetworks InstanceServerPrivateNetwork[]
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    projectId string
    project_id) The ID of the project the server is associated with.
    publicIps InstanceServerPublicIp[]
    The list of public IPs of the server.
    replaceOnTypeChange boolean
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    rootVolume InstanceServerRootVolume
    Root volume attached to the server on creation.
    routedIpEnabled boolean

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    securityGroupId string
    The security group the server is attached to.
    state string
    The state of the server. Possible values are: started, stopped or standby.
    tags string[]
    The tags associated with the server.
    userData {[key: string]: string}
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    zone string
    zone) The zone in which the server should be created.
    type str

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    additional_volume_ids Sequence[str]

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    boot_type str
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    bootscript_id str
    The ID of the bootscript to use (set boot_type to bootscript).
    cloud_init str
    The cloud init script associated with this server
    enable_dynamic_ip bool
    If true a dynamic IP will be attached to the server.
    enable_ipv6 bool
    Determines if IPv6 is enabled for the server.
    image str

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    ip_id str
    The ID of the reserved IP that is attached to the server.
    ip_ids Sequence[str]

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    name str
    The name of the server.
    placement_group_id str

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    private_networks Sequence[InstanceServerPrivateNetworkArgs]
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    project_id str
    project_id) The ID of the project the server is associated with.
    public_ips Sequence[InstanceServerPublicIpArgs]
    The list of public IPs of the server.
    replace_on_type_change bool
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    root_volume InstanceServerRootVolumeArgs
    Root volume attached to the server on creation.
    routed_ip_enabled bool

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    security_group_id str
    The security group the server is attached to.
    state str
    The state of the server. Possible values are: started, stopped or standby.
    tags Sequence[str]
    The tags associated with the server.
    user_data Mapping[str, str]
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    zone str
    zone) The zone in which the server should be created.
    type String

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    additionalVolumeIds List<String>

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    bootType String
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    bootscriptId String
    The ID of the bootscript to use (set boot_type to bootscript).
    cloudInit String
    The cloud init script associated with this server
    enableDynamicIp Boolean
    If true a dynamic IP will be attached to the server.
    enableIpv6 Boolean
    Determines if IPv6 is enabled for the server.
    image String

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    ipId String
    The ID of the reserved IP that is attached to the server.
    ipIds List<String>

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    name String
    The name of the server.
    placementGroupId String

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    privateNetworks List<Property Map>
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    projectId String
    project_id) The ID of the project the server is associated with.
    publicIps List<Property Map>
    The list of public IPs of the server.
    replaceOnTypeChange Boolean
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    rootVolume Property Map
    Root volume attached to the server on creation.
    routedIpEnabled Boolean

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    securityGroupId String
    The security group the server is attached to.
    state String
    The state of the server. Possible values are: started, stopped or standby.
    tags List<String>
    The tags associated with the server.
    userData Map<String>
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    zone String
    zone) The zone in which the server should be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6Address string
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    Ipv6Gateway string
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    Ipv6PrefixLength int
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    OrganizationId string
    The organization ID the server is associated with.
    PlacementGroupPolicyRespected bool
    True when the placement group policy is respected.
    PrivateIp string
    The Scaleway internal IP address of the server.
    PublicIp string
    The public IP address of the server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6Address string
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    Ipv6Gateway string
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    Ipv6PrefixLength int
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    OrganizationId string
    The organization ID the server is associated with.
    PlacementGroupPolicyRespected bool
    True when the placement group policy is respected.
    PrivateIp string
    The Scaleway internal IP address of the server.
    PublicIp string
    The public IP address of the server.
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6Address String
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    ipv6Gateway String
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    ipv6PrefixLength Integer
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    organizationId String
    The organization ID the server is associated with.
    placementGroupPolicyRespected Boolean
    True when the placement group policy is respected.
    privateIp String
    The Scaleway internal IP address of the server.
    publicIp String
    The public IP address of the server.
    id string
    The provider-assigned unique ID for this managed resource.
    ipv6Address string
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    ipv6Gateway string
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    ipv6PrefixLength number
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    organizationId string
    The organization ID the server is associated with.
    placementGroupPolicyRespected boolean
    True when the placement group policy is respected.
    privateIp string
    The Scaleway internal IP address of the server.
    publicIp string
    The public IP address of the server.
    id str
    The provider-assigned unique ID for this managed resource.
    ipv6_address str
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    ipv6_gateway str
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    ipv6_prefix_length int
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    organization_id str
    The organization ID the server is associated with.
    placement_group_policy_respected bool
    True when the placement group policy is respected.
    private_ip str
    The Scaleway internal IP address of the server.
    public_ip str
    The public IP address of the server.
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6Address String
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    ipv6Gateway String
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    ipv6PrefixLength Number
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    organizationId String
    The organization ID the server is associated with.
    placementGroupPolicyRespected Boolean
    True when the placement group policy is respected.
    privateIp String
    The Scaleway internal IP address of the server.
    publicIp String
    The public IP address of the server.

    Look up Existing InstanceServer Resource

    Get an existing InstanceServer 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?: InstanceServerState, opts?: CustomResourceOptions): InstanceServer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            additional_volume_ids: Optional[Sequence[str]] = None,
            boot_type: Optional[str] = None,
            bootscript_id: Optional[str] = None,
            cloud_init: Optional[str] = None,
            enable_dynamic_ip: Optional[bool] = None,
            enable_ipv6: Optional[bool] = None,
            image: Optional[str] = None,
            ip_id: Optional[str] = None,
            ip_ids: Optional[Sequence[str]] = None,
            ipv6_address: Optional[str] = None,
            ipv6_gateway: Optional[str] = None,
            ipv6_prefix_length: Optional[int] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None,
            placement_group_id: Optional[str] = None,
            placement_group_policy_respected: Optional[bool] = None,
            private_ip: Optional[str] = None,
            private_networks: Optional[Sequence[InstanceServerPrivateNetworkArgs]] = None,
            project_id: Optional[str] = None,
            public_ip: Optional[str] = None,
            public_ips: Optional[Sequence[InstanceServerPublicIpArgs]] = None,
            replace_on_type_change: Optional[bool] = None,
            root_volume: Optional[InstanceServerRootVolumeArgs] = None,
            routed_ip_enabled: Optional[bool] = None,
            security_group_id: Optional[str] = None,
            state: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            type: Optional[str] = None,
            user_data: Optional[Mapping[str, str]] = None,
            zone: Optional[str] = None) -> InstanceServer
    func GetInstanceServer(ctx *Context, name string, id IDInput, state *InstanceServerState, opts ...ResourceOption) (*InstanceServer, error)
    public static InstanceServer Get(string name, Input<string> id, InstanceServerState? state, CustomResourceOptions? opts = null)
    public static InstanceServer get(String name, Output<String> id, InstanceServerState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AdditionalVolumeIds List<string>

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    BootType string
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    BootscriptId string
    The ID of the bootscript to use (set boot_type to bootscript).
    CloudInit string
    The cloud init script associated with this server
    EnableDynamicIp bool
    If true a dynamic IP will be attached to the server.
    EnableIpv6 bool
    Determines if IPv6 is enabled for the server.
    Image string

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    IpId string
    The ID of the reserved IP that is attached to the server.
    IpIds List<string>

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    Ipv6Address string
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    Ipv6Gateway string
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    Ipv6PrefixLength int
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    Name string
    The name of the server.
    OrganizationId string
    The organization ID the server is associated with.
    PlacementGroupId string

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    PlacementGroupPolicyRespected bool
    True when the placement group policy is respected.
    PrivateIp string
    The Scaleway internal IP address of the server.
    PrivateNetworks List<Pulumiverse.Scaleway.Inputs.InstanceServerPrivateNetwork>
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    ProjectId string
    project_id) The ID of the project the server is associated with.
    PublicIp string
    The public IP address of the server.
    PublicIps List<Pulumiverse.Scaleway.Inputs.InstanceServerPublicIp>
    The list of public IPs of the server.
    ReplaceOnTypeChange bool
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    RootVolume Pulumiverse.Scaleway.Inputs.InstanceServerRootVolume
    Root volume attached to the server on creation.
    RoutedIpEnabled bool

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    SecurityGroupId string
    The security group the server is attached to.
    State string
    The state of the server. Possible values are: started, stopped or standby.
    Tags List<string>
    The tags associated with the server.
    Type string

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    UserData Dictionary<string, string>
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    Zone string
    zone) The zone in which the server should be created.
    AdditionalVolumeIds []string

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    BootType string
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    BootscriptId string
    The ID of the bootscript to use (set boot_type to bootscript).
    CloudInit string
    The cloud init script associated with this server
    EnableDynamicIp bool
    If true a dynamic IP will be attached to the server.
    EnableIpv6 bool
    Determines if IPv6 is enabled for the server.
    Image string

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    IpId string
    The ID of the reserved IP that is attached to the server.
    IpIds []string

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    Ipv6Address string
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    Ipv6Gateway string
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    Ipv6PrefixLength int
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    Name string
    The name of the server.
    OrganizationId string
    The organization ID the server is associated with.
    PlacementGroupId string

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    PlacementGroupPolicyRespected bool
    True when the placement group policy is respected.
    PrivateIp string
    The Scaleway internal IP address of the server.
    PrivateNetworks []InstanceServerPrivateNetworkArgs
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    ProjectId string
    project_id) The ID of the project the server is associated with.
    PublicIp string
    The public IP address of the server.
    PublicIps []InstanceServerPublicIpArgs
    The list of public IPs of the server.
    ReplaceOnTypeChange bool
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    RootVolume InstanceServerRootVolumeArgs
    Root volume attached to the server on creation.
    RoutedIpEnabled bool

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    SecurityGroupId string
    The security group the server is attached to.
    State string
    The state of the server. Possible values are: started, stopped or standby.
    Tags []string
    The tags associated with the server.
    Type string

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    UserData map[string]string
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    Zone string
    zone) The zone in which the server should be created.
    additionalVolumeIds List<String>

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    bootType String
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    bootscriptId String
    The ID of the bootscript to use (set boot_type to bootscript).
    cloudInit String
    The cloud init script associated with this server
    enableDynamicIp Boolean
    If true a dynamic IP will be attached to the server.
    enableIpv6 Boolean
    Determines if IPv6 is enabled for the server.
    image String

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    ipId String
    The ID of the reserved IP that is attached to the server.
    ipIds List<String>

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    ipv6Address String
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    ipv6Gateway String
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    ipv6PrefixLength Integer
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    name String
    The name of the server.
    organizationId String
    The organization ID the server is associated with.
    placementGroupId String

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    placementGroupPolicyRespected Boolean
    True when the placement group policy is respected.
    privateIp String
    The Scaleway internal IP address of the server.
    privateNetworks List<InstanceServerPrivateNetwork>
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    projectId String
    project_id) The ID of the project the server is associated with.
    publicIp String
    The public IP address of the server.
    publicIps List<InstanceServerPublicIp>
    The list of public IPs of the server.
    replaceOnTypeChange Boolean
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    rootVolume InstanceServerRootVolume
    Root volume attached to the server on creation.
    routedIpEnabled Boolean

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    securityGroupId String
    The security group the server is attached to.
    state String
    The state of the server. Possible values are: started, stopped or standby.
    tags List<String>
    The tags associated with the server.
    type String

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    userData Map<String,String>
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    zone String
    zone) The zone in which the server should be created.
    additionalVolumeIds string[]

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    bootType string
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    bootscriptId string
    The ID of the bootscript to use (set boot_type to bootscript).
    cloudInit string
    The cloud init script associated with this server
    enableDynamicIp boolean
    If true a dynamic IP will be attached to the server.
    enableIpv6 boolean
    Determines if IPv6 is enabled for the server.
    image string

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    ipId string
    The ID of the reserved IP that is attached to the server.
    ipIds string[]

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    ipv6Address string
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    ipv6Gateway string
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    ipv6PrefixLength number
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    name string
    The name of the server.
    organizationId string
    The organization ID the server is associated with.
    placementGroupId string

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    placementGroupPolicyRespected boolean
    True when the placement group policy is respected.
    privateIp string
    The Scaleway internal IP address of the server.
    privateNetworks InstanceServerPrivateNetwork[]
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    projectId string
    project_id) The ID of the project the server is associated with.
    publicIp string
    The public IP address of the server.
    publicIps InstanceServerPublicIp[]
    The list of public IPs of the server.
    replaceOnTypeChange boolean
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    rootVolume InstanceServerRootVolume
    Root volume attached to the server on creation.
    routedIpEnabled boolean

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    securityGroupId string
    The security group the server is attached to.
    state string
    The state of the server. Possible values are: started, stopped or standby.
    tags string[]
    The tags associated with the server.
    type string

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    userData {[key: string]: string}
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    zone string
    zone) The zone in which the server should be created.
    additional_volume_ids Sequence[str]

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    boot_type str
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    bootscript_id str
    The ID of the bootscript to use (set boot_type to bootscript).
    cloud_init str
    The cloud init script associated with this server
    enable_dynamic_ip bool
    If true a dynamic IP will be attached to the server.
    enable_ipv6 bool
    Determines if IPv6 is enabled for the server.
    image str

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    ip_id str
    The ID of the reserved IP that is attached to the server.
    ip_ids Sequence[str]

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    ipv6_address str
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    ipv6_gateway str
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    ipv6_prefix_length int
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    name str
    The name of the server.
    organization_id str
    The organization ID the server is associated with.
    placement_group_id str

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    placement_group_policy_respected bool
    True when the placement group policy is respected.
    private_ip str
    The Scaleway internal IP address of the server.
    private_networks Sequence[InstanceServerPrivateNetworkArgs]
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    project_id str
    project_id) The ID of the project the server is associated with.
    public_ip str
    The public IP address of the server.
    public_ips Sequence[InstanceServerPublicIpArgs]
    The list of public IPs of the server.
    replace_on_type_change bool
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    root_volume InstanceServerRootVolumeArgs
    Root volume attached to the server on creation.
    routed_ip_enabled bool

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    security_group_id str
    The security group the server is attached to.
    state str
    The state of the server. Possible values are: started, stopped or standby.
    tags Sequence[str]
    The tags associated with the server.
    type str

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    user_data Mapping[str, str]
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    zone str
    zone) The zone in which the server should be created.
    additionalVolumeIds List<String>

    The additional volumes attached to the server. Updates to this field will trigger a stop/start of the server.

    Important: If this field contains local volumes, the state must be set to stopped, otherwise it will fail.

    Important: If this field contains local volumes, you have to first detach them, in one apply, and then delete the volume in another apply.

    bootType String
    The boot Type of the server. Possible values are: local, bootscript or rescue.
    bootscriptId String
    The ID of the bootscript to use (set boot_type to bootscript).
    cloudInit String
    The cloud init script associated with this server
    enableDynamicIp Boolean
    If true a dynamic IP will be attached to the server.
    enableIpv6 Boolean
    Determines if IPv6 is enabled for the server.
    image String

    The UUID or the label of the base image used by the server. You can use this endpoint to find either the right label or the right local image ID for a given type. Optional when creating an instance with an existing root volume.

    You can check the available labels with our CLI. scw marketplace image list

    To retrieve more information by label please use: scw marketplace image get label=<LABEL>

    ipId String
    The ID of the reserved IP that is attached to the server.
    ipIds List<String>

    List of ID of reserved IPs that are attached to the server. Cannot be used with ip_id.

    ip_id to ip_ids migration: if moving the ip from the old ip_id field to the new ip_ids, it should not detach the ip.

    ipv6Address String
    The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
    ipv6Gateway String
    The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
    ipv6PrefixLength Number
    The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
    name String
    The name of the server.
    organizationId String
    The organization ID the server is associated with.
    placementGroupId String

    The placement group the server is attached to.

    Important: When updating placement_group_id the state must be set to stopped, otherwise it will fail.

    placementGroupPolicyRespected Boolean
    True when the placement group policy is respected.
    privateIp String
    The Scaleway internal IP address of the server.
    privateNetworks List<Property Map>
    The private network associated with the server. Use the pn_id key to attach a private_network on your instance.
    projectId String
    project_id) The ID of the project the server is associated with.
    publicIp String
    The public IP address of the server.
    publicIps List<Property Map>
    The list of public IPs of the server.
    replaceOnTypeChange Boolean
    If true, the server will be replaced if type is changed. Otherwise, the server will migrate.
    rootVolume Property Map
    Root volume attached to the server on creation.
    routedIpEnabled Boolean

    If true, the server will support routed ips only. Changing it to true will migrate the server and its IP to routed type.

    Important: Enabling routed ip will restart the server

    securityGroupId String
    The security group the server is attached to.
    state String
    The state of the server. Possible values are: started, stopped or standby.
    tags List<String>
    The tags associated with the server.
    type String

    The commercial type of the server. You find all the available types on the pricing page. Updates to this field will migrate the server, local storage constraint must be respected. More info. Use replace_on_type_change to trigger replacement instead of migration.

    Important: If type change and migration occurs, the server will be stopped and changed backed to its original state. It will be started again if it was running.

    userData Map<String>
    The user data associated with the server. Use the cloud-init key to use cloud-init on your instance. You can define values using:

    • string
    • UTF-8 encoded file content using file
    • Binary files using filebase64.
    zone String
    zone) The zone in which the server should be created.

    Supporting Types

    InstanceServerPrivateNetwork, InstanceServerPrivateNetworkArgs

    PnId string
    The Private Network ID
    MacAddress string
    MAC address of the NIC
    Status string
    The private NIC state
    Zone string
    zone) The zone in which the server should be created.
    PnId string
    The Private Network ID
    MacAddress string
    MAC address of the NIC
    Status string
    The private NIC state
    Zone string
    zone) The zone in which the server should be created.
    pnId String
    The Private Network ID
    macAddress String
    MAC address of the NIC
    status String
    The private NIC state
    zone String
    zone) The zone in which the server should be created.
    pnId string
    The Private Network ID
    macAddress string
    MAC address of the NIC
    status string
    The private NIC state
    zone string
    zone) The zone in which the server should be created.
    pn_id str
    The Private Network ID
    mac_address str
    MAC address of the NIC
    status str
    The private NIC state
    zone str
    zone) The zone in which the server should be created.
    pnId String
    The Private Network ID
    macAddress String
    MAC address of the NIC
    status String
    The private NIC state
    zone String
    zone) The zone in which the server should be created.

    InstanceServerPublicIp, InstanceServerPublicIpArgs

    Address string
    The address of the IP
    Id string
    The ID of the IP
    Address string
    The address of the IP
    Id string
    The ID of the IP
    address String
    The address of the IP
    id String
    The ID of the IP
    address string
    The address of the IP
    id string
    The ID of the IP
    address str
    The address of the IP
    id str
    The ID of the IP
    address String
    The address of the IP
    id String
    The ID of the IP

    InstanceServerRootVolume, InstanceServerRootVolumeArgs

    Boot bool
    Set the volume where the boot the server
    DeleteOnTermination bool

    Forces deletion of the root volume on instance termination.

    Important: Updates to root_volume.size_in_gb will be ignored after the creation of the server.

    Name string
    The name of the server.
    SizeInGb int
    Size of the root volume in gigabytes. To find the right size use this endpoint and check the volumes_constraint.{min|max}_size (in bytes) for your commercial_type. Updates to this field will recreate a new resource.
    VolumeId string
    The volume ID of the root volume of the server, allows you to create server with an existing volume. If empty, will be computed to a created volume ID.
    VolumeType string
    Volume type of root volume, can be b_ssd or l_ssd, default value depends on server type
    Boot bool
    Set the volume where the boot the server
    DeleteOnTermination bool

    Forces deletion of the root volume on instance termination.

    Important: Updates to root_volume.size_in_gb will be ignored after the creation of the server.

    Name string
    The name of the server.
    SizeInGb int
    Size of the root volume in gigabytes. To find the right size use this endpoint and check the volumes_constraint.{min|max}_size (in bytes) for your commercial_type. Updates to this field will recreate a new resource.
    VolumeId string
    The volume ID of the root volume of the server, allows you to create server with an existing volume. If empty, will be computed to a created volume ID.
    VolumeType string
    Volume type of root volume, can be b_ssd or l_ssd, default value depends on server type
    boot Boolean
    Set the volume where the boot the server
    deleteOnTermination Boolean

    Forces deletion of the root volume on instance termination.

    Important: Updates to root_volume.size_in_gb will be ignored after the creation of the server.

    name String
    The name of the server.
    sizeInGb Integer
    Size of the root volume in gigabytes. To find the right size use this endpoint and check the volumes_constraint.{min|max}_size (in bytes) for your commercial_type. Updates to this field will recreate a new resource.
    volumeId String
    The volume ID of the root volume of the server, allows you to create server with an existing volume. If empty, will be computed to a created volume ID.
    volumeType String
    Volume type of root volume, can be b_ssd or l_ssd, default value depends on server type
    boot boolean
    Set the volume where the boot the server
    deleteOnTermination boolean

    Forces deletion of the root volume on instance termination.

    Important: Updates to root_volume.size_in_gb will be ignored after the creation of the server.

    name string
    The name of the server.
    sizeInGb number
    Size of the root volume in gigabytes. To find the right size use this endpoint and check the volumes_constraint.{min|max}_size (in bytes) for your commercial_type. Updates to this field will recreate a new resource.
    volumeId string
    The volume ID of the root volume of the server, allows you to create server with an existing volume. If empty, will be computed to a created volume ID.
    volumeType string
    Volume type of root volume, can be b_ssd or l_ssd, default value depends on server type
    boot bool
    Set the volume where the boot the server
    delete_on_termination bool

    Forces deletion of the root volume on instance termination.

    Important: Updates to root_volume.size_in_gb will be ignored after the creation of the server.

    name str
    The name of the server.
    size_in_gb int
    Size of the root volume in gigabytes. To find the right size use this endpoint and check the volumes_constraint.{min|max}_size (in bytes) for your commercial_type. Updates to this field will recreate a new resource.
    volume_id str
    The volume ID of the root volume of the server, allows you to create server with an existing volume. If empty, will be computed to a created volume ID.
    volume_type str
    Volume type of root volume, can be b_ssd or l_ssd, default value depends on server type
    boot Boolean
    Set the volume where the boot the server
    deleteOnTermination Boolean

    Forces deletion of the root volume on instance termination.

    Important: Updates to root_volume.size_in_gb will be ignored after the creation of the server.

    name String
    The name of the server.
    sizeInGb Number
    Size of the root volume in gigabytes. To find the right size use this endpoint and check the volumes_constraint.{min|max}_size (in bytes) for your commercial_type. Updates to this field will recreate a new resource.
    volumeId String
    The volume ID of the root volume of the server, allows you to create server with an existing volume. If empty, will be computed to a created volume ID.
    volumeType String
    Volume type of root volume, can be b_ssd or l_ssd, default value depends on server type

    Import

    Instance servers can be imported using the {zone}/{id}, e.g.

    bash

    $ pulumi import scaleway:index/instanceServer:InstanceServer web fr-par-1/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.12.1 published on Monday, Apr 15, 2024 by pulumiverse