1. Packages
  2. Scaleway
  3. API Docs
  4. BaremetalServer
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.BaremetalServer

Explore with Pulumi AI

Deprecated: scaleway.index/baremetalserver.BaremetalServer has been deprecated in favor of scaleway.elasticmetal/server.Server

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

Example Usage

Basic

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";

const main = scaleway.iam.getSshKey({
    name: "main",
});
const myOffer = scaleway.elasticmetal.getOffer({
    zone: "fr-par-2",
    name: "EM-I220E-NVME",
});
const base = new scaleway.elasticmetal.Server("base", {
    zone: "fr-par-2",
    offer: myOffer.then(myOffer => myOffer.offerId),
    os: "d17d6872-0412-45d9-a198-af82c34d3c5c",
    sshKeyIds: [mainScalewayAccountSshKey.id],
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

main = scaleway.iam.get_ssh_key(name="main")
my_offer = scaleway.elasticmetal.get_offer(zone="fr-par-2",
    name="EM-I220E-NVME")
base = scaleway.elasticmetal.Server("base",
    zone="fr-par-2",
    offer=my_offer.offer_id,
    os="d17d6872-0412-45d9-a198-af82c34d3c5c",
    ssh_key_ids=[main_scaleway_account_ssh_key["id"]])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/elasticmetal"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iam"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.LookupSshKey(ctx, &iam.LookupSshKeyArgs{
			Name: pulumi.StringRef("main"),
		}, nil)
		if err != nil {
			return err
		}
		myOffer, err := elasticmetal.GetOffer(ctx, &elasticmetal.GetOfferArgs{
			Zone: pulumi.StringRef("fr-par-2"),
			Name: pulumi.StringRef("EM-I220E-NVME"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = elasticmetal.NewServer(ctx, "base", &elasticmetal.ServerArgs{
			Zone:  pulumi.String("fr-par-2"),
			Offer: pulumi.String(myOffer.OfferId),
			Os:    pulumi.String("d17d6872-0412-45d9-a198-af82c34d3c5c"),
			SshKeyIds: pulumi.StringArray{
				mainScalewayAccountSshKey.Id,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = Scaleway.Iam.GetSshKey.Invoke(new()
    {
        Name = "main",
    });

    var myOffer = Scaleway.Elasticmetal.GetOffer.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "EM-I220E-NVME",
    });

    var @base = new Scaleway.Elasticmetal.Server("base", new()
    {
        Zone = "fr-par-2",
        Offer = myOffer.Apply(getOfferResult => getOfferResult.OfferId),
        Os = "d17d6872-0412-45d9-a198-af82c34d3c5c",
        SshKeyIds = new[]
        {
            mainScalewayAccountSshKey.Id,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iam.IamFunctions;
import com.pulumi.scaleway.iam.inputs.GetSshKeyArgs;
import com.pulumi.scaleway.elasticmetal.ElasticmetalFunctions;
import com.pulumi.scaleway.elasticmetal.inputs.GetOfferArgs;
import com.pulumi.scaleway.elasticmetal.Server;
import com.pulumi.scaleway.elasticmetal.ServerArgs;
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 main = IamFunctions.getSshKey(GetSshKeyArgs.builder()
            .name("main")
            .build());

        final var myOffer = ElasticmetalFunctions.getOffer(GetOfferArgs.builder()
            .zone("fr-par-2")
            .name("EM-I220E-NVME")
            .build());

        var base = new Server("base", ServerArgs.builder()
            .zone("fr-par-2")
            .offer(myOffer.applyValue(getOfferResult -> getOfferResult.offerId()))
            .os("d17d6872-0412-45d9-a198-af82c34d3c5c")
            .sshKeyIds(mainScalewayAccountSshKey.id())
            .build());

    }
}
Copy
resources:
  base:
    type: scaleway:elasticmetal:Server
    properties:
      zone: fr-par-2
      offer: ${myOffer.offerId}
      os: d17d6872-0412-45d9-a198-af82c34d3c5c
      sshKeyIds:
        - ${mainScalewayAccountSshKey.id}
variables:
  main:
    fn::invoke:
      function: scaleway:iam:getSshKey
      arguments:
        name: main
  myOffer:
    fn::invoke:
      function: scaleway:elasticmetal:getOffer
      arguments:
        zone: fr-par-2
        name: EM-I220E-NVME
Copy

With option

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";

const main = scaleway.iam.getSshKey({
    name: "main",
});
const myOs = scaleway.elasticmetal.getOs({
    zone: "fr-par-2",
    name: "Ubuntu",
    version: "22.04 LTS (Jammy Jellyfish)",
});
const myOffer = scaleway.elasticmetal.getOffer({
    zone: "fr-par-2",
    name: "EM-B112X-SSD",
});
const privateNetwork = scaleway.elasticmetal.getOption({
    zone: "fr-par-2",
    name: "Private Network",
});
const remoteAccess = scaleway.elasticmetal.getOption({
    zone: "fr-par-2",
    name: "Remote Access",
});
const base = new scaleway.elasticmetal.Server("base", {
    zone: "fr-par-2",
    offer: myOffer.then(myOffer => myOffer.offerId),
    os: myOs.then(myOs => myOs.osId),
    sshKeyIds: [mainScalewayAccountSshKey.id],
    options: [
        {
            id: privateNetwork.then(privateNetwork => privateNetwork.optionId),
        },
        {
            id: remoteAccess.then(remoteAccess => remoteAccess.optionId),
        },
    ],
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

main = scaleway.iam.get_ssh_key(name="main")
my_os = scaleway.elasticmetal.get_os(zone="fr-par-2",
    name="Ubuntu",
    version="22.04 LTS (Jammy Jellyfish)")
my_offer = scaleway.elasticmetal.get_offer(zone="fr-par-2",
    name="EM-B112X-SSD")
private_network = scaleway.elasticmetal.get_option(zone="fr-par-2",
    name="Private Network")
remote_access = scaleway.elasticmetal.get_option(zone="fr-par-2",
    name="Remote Access")
base = scaleway.elasticmetal.Server("base",
    zone="fr-par-2",
    offer=my_offer.offer_id,
    os=my_os.os_id,
    ssh_key_ids=[main_scaleway_account_ssh_key["id"]],
    options=[
        {
            "id": private_network.option_id,
        },
        {
            "id": remote_access.option_id,
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/elasticmetal"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iam"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.LookupSshKey(ctx, &iam.LookupSshKeyArgs{
			Name: pulumi.StringRef("main"),
		}, nil)
		if err != nil {
			return err
		}
		myOs, err := elasticmetal.GetOs(ctx, &elasticmetal.GetOsArgs{
			Zone:    pulumi.StringRef("fr-par-2"),
			Name:    pulumi.StringRef("Ubuntu"),
			Version: pulumi.StringRef("22.04 LTS (Jammy Jellyfish)"),
		}, nil)
		if err != nil {
			return err
		}
		myOffer, err := elasticmetal.GetOffer(ctx, &elasticmetal.GetOfferArgs{
			Zone: pulumi.StringRef("fr-par-2"),
			Name: pulumi.StringRef("EM-B112X-SSD"),
		}, nil)
		if err != nil {
			return err
		}
		privateNetwork, err := elasticmetal.GetOption(ctx, &elasticmetal.GetOptionArgs{
			Zone: pulumi.StringRef("fr-par-2"),
			Name: pulumi.StringRef("Private Network"),
		}, nil)
		if err != nil {
			return err
		}
		remoteAccess, err := elasticmetal.GetOption(ctx, &elasticmetal.GetOptionArgs{
			Zone: pulumi.StringRef("fr-par-2"),
			Name: pulumi.StringRef("Remote Access"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = elasticmetal.NewServer(ctx, "base", &elasticmetal.ServerArgs{
			Zone:  pulumi.String("fr-par-2"),
			Offer: pulumi.String(myOffer.OfferId),
			Os:    pulumi.String(myOs.OsId),
			SshKeyIds: pulumi.StringArray{
				mainScalewayAccountSshKey.Id,
			},
			Options: elasticmetal.ServerOptionArray{
				&elasticmetal.ServerOptionArgs{
					Id: pulumi.String(privateNetwork.OptionId),
				},
				&elasticmetal.ServerOptionArgs{
					Id: pulumi.String(remoteAccess.OptionId),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = Scaleway.Iam.GetSshKey.Invoke(new()
    {
        Name = "main",
    });

    var myOs = Scaleway.Elasticmetal.GetOs.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "Ubuntu",
        Version = "22.04 LTS (Jammy Jellyfish)",
    });

    var myOffer = Scaleway.Elasticmetal.GetOffer.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "EM-B112X-SSD",
    });

    var privateNetwork = Scaleway.Elasticmetal.GetOption.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "Private Network",
    });

    var remoteAccess = Scaleway.Elasticmetal.GetOption.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "Remote Access",
    });

    var @base = new Scaleway.Elasticmetal.Server("base", new()
    {
        Zone = "fr-par-2",
        Offer = myOffer.Apply(getOfferResult => getOfferResult.OfferId),
        Os = myOs.Apply(getOsResult => getOsResult.OsId),
        SshKeyIds = new[]
        {
            mainScalewayAccountSshKey.Id,
        },
        Options = new[]
        {
            new Scaleway.Elasticmetal.Inputs.ServerOptionArgs
            {
                Id = privateNetwork.Apply(getOptionResult => getOptionResult.OptionId),
            },
            new Scaleway.Elasticmetal.Inputs.ServerOptionArgs
            {
                Id = remoteAccess.Apply(getOptionResult => getOptionResult.OptionId),
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iam.IamFunctions;
import com.pulumi.scaleway.iam.inputs.GetSshKeyArgs;
import com.pulumi.scaleway.elasticmetal.ElasticmetalFunctions;
import com.pulumi.scaleway.elasticmetal.inputs.GetOsArgs;
import com.pulumi.scaleway.elasticmetal.inputs.GetOfferArgs;
import com.pulumi.scaleway.elasticmetal.inputs.GetOptionArgs;
import com.pulumi.scaleway.elasticmetal.Server;
import com.pulumi.scaleway.elasticmetal.ServerArgs;
import com.pulumi.scaleway.elasticmetal.inputs.ServerOptionArgs;
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 main = IamFunctions.getSshKey(GetSshKeyArgs.builder()
            .name("main")
            .build());

        final var myOs = ElasticmetalFunctions.getOs(GetOsArgs.builder()
            .zone("fr-par-2")
            .name("Ubuntu")
            .version("22.04 LTS (Jammy Jellyfish)")
            .build());

        final var myOffer = ElasticmetalFunctions.getOffer(GetOfferArgs.builder()
            .zone("fr-par-2")
            .name("EM-B112X-SSD")
            .build());

        final var privateNetwork = ElasticmetalFunctions.getOption(GetOptionArgs.builder()
            .zone("fr-par-2")
            .name("Private Network")
            .build());

        final var remoteAccess = ElasticmetalFunctions.getOption(GetOptionArgs.builder()
            .zone("fr-par-2")
            .name("Remote Access")
            .build());

        var base = new Server("base", ServerArgs.builder()
            .zone("fr-par-2")
            .offer(myOffer.applyValue(getOfferResult -> getOfferResult.offerId()))
            .os(myOs.applyValue(getOsResult -> getOsResult.osId()))
            .sshKeyIds(mainScalewayAccountSshKey.id())
            .options(            
                ServerOptionArgs.builder()
                    .id(privateNetwork.applyValue(getOptionResult -> getOptionResult.optionId()))
                    .build(),
                ServerOptionArgs.builder()
                    .id(remoteAccess.applyValue(getOptionResult -> getOptionResult.optionId()))
                    .build())
            .build());

    }
}
Copy
resources:
  base:
    type: scaleway:elasticmetal:Server
    properties:
      zone: fr-par-2
      offer: ${myOffer.offerId}
      os: ${myOs.osId}
      sshKeyIds:
        - ${mainScalewayAccountSshKey.id}
      options:
        - id: ${privateNetwork.optionId}
        - id: ${remoteAccess.optionId}
variables:
  main:
    fn::invoke:
      function: scaleway:iam:getSshKey
      arguments:
        name: main
  myOs:
    fn::invoke:
      function: scaleway:elasticmetal:getOs
      arguments:
        zone: fr-par-2
        name: Ubuntu
        version: 22.04 LTS (Jammy Jellyfish)
  myOffer:
    fn::invoke:
      function: scaleway:elasticmetal:getOffer
      arguments:
        zone: fr-par-2
        name: EM-B112X-SSD
  privateNetwork:
    fn::invoke:
      function: scaleway:elasticmetal:getOption
      arguments:
        zone: fr-par-2
        name: Private Network
  remoteAccess:
    fn::invoke:
      function: scaleway:elasticmetal:getOption
      arguments:
        zone: fr-par-2
        name: Remote Access
Copy

With private network

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";

const main = scaleway.iam.getSshKey({
    name: "main",
});
const myOs = scaleway.elasticmetal.getOs({
    zone: "fr-par-2",
    name: "Ubuntu",
    version: "22.04 LTS (Jammy Jellyfish)",
});
const myOffer = scaleway.elasticmetal.getOffer({
    zone: "fr-par-2",
    name: "EM-B112X-SSD",
});
const privateNetwork = scaleway.elasticmetal.getOption({
    zone: "fr-par-2",
    name: "Private Network",
});
const pn = new scaleway.network.PrivateNetwork("pn", {
    region: "fr-par",
    name: "baremetal_private_network",
});
const base = new scaleway.elasticmetal.Server("base", {
    zone: "fr-par-2",
    offer: myOffer.then(myOffer => myOffer.offerId),
    os: myOs.then(myOs => myOs.osId),
    sshKeyIds: [mainScalewayAccountSshKey.id],
    options: [{
        id: privateNetwork.then(privateNetwork => privateNetwork.optionId),
    }],
    privateNetworks: [{
        id: pn.id,
    }],
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

main = scaleway.iam.get_ssh_key(name="main")
my_os = scaleway.elasticmetal.get_os(zone="fr-par-2",
    name="Ubuntu",
    version="22.04 LTS (Jammy Jellyfish)")
my_offer = scaleway.elasticmetal.get_offer(zone="fr-par-2",
    name="EM-B112X-SSD")
private_network = scaleway.elasticmetal.get_option(zone="fr-par-2",
    name="Private Network")
pn = scaleway.network.PrivateNetwork("pn",
    region="fr-par",
    name="baremetal_private_network")
base = scaleway.elasticmetal.Server("base",
    zone="fr-par-2",
    offer=my_offer.offer_id,
    os=my_os.os_id,
    ssh_key_ids=[main_scaleway_account_ssh_key["id"]],
    options=[{
        "id": private_network.option_id,
    }],
    private_networks=[{
        "id": pn.id,
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/elasticmetal"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iam"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/network"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.LookupSshKey(ctx, &iam.LookupSshKeyArgs{
			Name: pulumi.StringRef("main"),
		}, nil)
		if err != nil {
			return err
		}
		myOs, err := elasticmetal.GetOs(ctx, &elasticmetal.GetOsArgs{
			Zone:    pulumi.StringRef("fr-par-2"),
			Name:    pulumi.StringRef("Ubuntu"),
			Version: pulumi.StringRef("22.04 LTS (Jammy Jellyfish)"),
		}, nil)
		if err != nil {
			return err
		}
		myOffer, err := elasticmetal.GetOffer(ctx, &elasticmetal.GetOfferArgs{
			Zone: pulumi.StringRef("fr-par-2"),
			Name: pulumi.StringRef("EM-B112X-SSD"),
		}, nil)
		if err != nil {
			return err
		}
		privateNetwork, err := elasticmetal.GetOption(ctx, &elasticmetal.GetOptionArgs{
			Zone: pulumi.StringRef("fr-par-2"),
			Name: pulumi.StringRef("Private Network"),
		}, nil)
		if err != nil {
			return err
		}
		pn, err := network.NewPrivateNetwork(ctx, "pn", &network.PrivateNetworkArgs{
			Region: pulumi.String("fr-par"),
			Name:   pulumi.String("baremetal_private_network"),
		})
		if err != nil {
			return err
		}
		_, err = elasticmetal.NewServer(ctx, "base", &elasticmetal.ServerArgs{
			Zone:  pulumi.String("fr-par-2"),
			Offer: pulumi.String(myOffer.OfferId),
			Os:    pulumi.String(myOs.OsId),
			SshKeyIds: pulumi.StringArray{
				mainScalewayAccountSshKey.Id,
			},
			Options: elasticmetal.ServerOptionArray{
				&elasticmetal.ServerOptionArgs{
					Id: pulumi.String(privateNetwork.OptionId),
				},
			},
			PrivateNetworks: elasticmetal.ServerPrivateNetworkArray{
				&elasticmetal.ServerPrivateNetworkArgs{
					Id: pn.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = Scaleway.Iam.GetSshKey.Invoke(new()
    {
        Name = "main",
    });

    var myOs = Scaleway.Elasticmetal.GetOs.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "Ubuntu",
        Version = "22.04 LTS (Jammy Jellyfish)",
    });

    var myOffer = Scaleway.Elasticmetal.GetOffer.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "EM-B112X-SSD",
    });

    var privateNetwork = Scaleway.Elasticmetal.GetOption.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "Private Network",
    });

    var pn = new Scaleway.Network.PrivateNetwork("pn", new()
    {
        Region = "fr-par",
        Name = "baremetal_private_network",
    });

    var @base = new Scaleway.Elasticmetal.Server("base", new()
    {
        Zone = "fr-par-2",
        Offer = myOffer.Apply(getOfferResult => getOfferResult.OfferId),
        Os = myOs.Apply(getOsResult => getOsResult.OsId),
        SshKeyIds = new[]
        {
            mainScalewayAccountSshKey.Id,
        },
        Options = new[]
        {
            new Scaleway.Elasticmetal.Inputs.ServerOptionArgs
            {
                Id = privateNetwork.Apply(getOptionResult => getOptionResult.OptionId),
            },
        },
        PrivateNetworks = new[]
        {
            new Scaleway.Elasticmetal.Inputs.ServerPrivateNetworkArgs
            {
                Id = pn.Id,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iam.IamFunctions;
import com.pulumi.scaleway.iam.inputs.GetSshKeyArgs;
import com.pulumi.scaleway.elasticmetal.ElasticmetalFunctions;
import com.pulumi.scaleway.elasticmetal.inputs.GetOsArgs;
import com.pulumi.scaleway.elasticmetal.inputs.GetOfferArgs;
import com.pulumi.scaleway.elasticmetal.inputs.GetOptionArgs;
import com.pulumi.scaleway.network.PrivateNetwork;
import com.pulumi.scaleway.network.PrivateNetworkArgs;
import com.pulumi.scaleway.elasticmetal.Server;
import com.pulumi.scaleway.elasticmetal.ServerArgs;
import com.pulumi.scaleway.elasticmetal.inputs.ServerOptionArgs;
import com.pulumi.scaleway.elasticmetal.inputs.ServerPrivateNetworkArgs;
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 main = IamFunctions.getSshKey(GetSshKeyArgs.builder()
            .name("main")
            .build());

        final var myOs = ElasticmetalFunctions.getOs(GetOsArgs.builder()
            .zone("fr-par-2")
            .name("Ubuntu")
            .version("22.04 LTS (Jammy Jellyfish)")
            .build());

        final var myOffer = ElasticmetalFunctions.getOffer(GetOfferArgs.builder()
            .zone("fr-par-2")
            .name("EM-B112X-SSD")
            .build());

        final var privateNetwork = ElasticmetalFunctions.getOption(GetOptionArgs.builder()
            .zone("fr-par-2")
            .name("Private Network")
            .build());

        var pn = new PrivateNetwork("pn", PrivateNetworkArgs.builder()
            .region("fr-par")
            .name("baremetal_private_network")
            .build());

        var base = new Server("base", ServerArgs.builder()
            .zone("fr-par-2")
            .offer(myOffer.applyValue(getOfferResult -> getOfferResult.offerId()))
            .os(myOs.applyValue(getOsResult -> getOsResult.osId()))
            .sshKeyIds(mainScalewayAccountSshKey.id())
            .options(ServerOptionArgs.builder()
                .id(privateNetwork.applyValue(getOptionResult -> getOptionResult.optionId()))
                .build())
            .privateNetworks(ServerPrivateNetworkArgs.builder()
                .id(pn.id())
                .build())
            .build());

    }
}
Copy
resources:
  pn:
    type: scaleway:network:PrivateNetwork
    properties:
      region: fr-par
      name: baremetal_private_network
  base:
    type: scaleway:elasticmetal:Server
    properties:
      zone: fr-par-2
      offer: ${myOffer.offerId}
      os: ${myOs.osId}
      sshKeyIds:
        - ${mainScalewayAccountSshKey.id}
      options:
        - id: ${privateNetwork.optionId}
      privateNetworks:
        - id: ${pn.id}
variables:
  main:
    fn::invoke:
      function: scaleway:iam:getSshKey
      arguments:
        name: main
  myOs:
    fn::invoke:
      function: scaleway:elasticmetal:getOs
      arguments:
        zone: fr-par-2
        name: Ubuntu
        version: 22.04 LTS (Jammy Jellyfish)
  myOffer:
    fn::invoke:
      function: scaleway:elasticmetal:getOffer
      arguments:
        zone: fr-par-2
        name: EM-B112X-SSD
  privateNetwork:
    fn::invoke:
      function: scaleway:elasticmetal:getOption
      arguments:
        zone: fr-par-2
        name: Private Network
Copy

With IPAM IP IDs

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";

const vpc01 = new scaleway.network.Vpc("vpc01", {name: "vpc_baremetal"});
const pn01 = new scaleway.network.PrivateNetwork("pn01", {
    name: "private_network_baremetal",
    ipv4Subnet: {
        subnet: "172.16.64.0/22",
    },
    vpcId: vpc01.id,
});
const ip01 = new scaleway.ipam.Ip("ip01", {
    address: "172.16.64.7",
    sources: [{
        privateNetworkId: pn01.id,
    }],
});
const myKey = scaleway.iam.getSshKey({
    name: "main",
});
const myOs = scaleway.elasticmetal.getOs({
    zone: "fr-par-1",
    name: "Ubuntu",
    version: "22.04 LTS (Jammy Jellyfish)",
});
const myOffer = scaleway.elasticmetal.getOffer({
    zone: "fr-par-1",
    name: "EM-A115X-SSD",
});
const privateNetwork = scaleway.elasticmetal.getOption({
    zone: "fr-par-1",
    name: "Private Network",
});
const base = new scaleway.elasticmetal.Server("base", {
    zone: "fr-par-2",
    offer: myOffer.then(myOffer => myOffer.offerId),
    os: myOs.then(myOs => myOs.osId),
    sshKeyIds: [myKeyScalewayAccountSshKey.id],
    options: [{
        id: privateNetwork.then(privateNetwork => privateNetwork.optionId),
    }],
    privateNetworks: [{
        id: pn01.id,
        ipamIpIds: [ip01.id],
    }],
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

vpc01 = scaleway.network.Vpc("vpc01", name="vpc_baremetal")
pn01 = scaleway.network.PrivateNetwork("pn01",
    name="private_network_baremetal",
    ipv4_subnet={
        "subnet": "172.16.64.0/22",
    },
    vpc_id=vpc01.id)
ip01 = scaleway.ipam.Ip("ip01",
    address="172.16.64.7",
    sources=[{
        "private_network_id": pn01.id,
    }])
my_key = scaleway.iam.get_ssh_key(name="main")
my_os = scaleway.elasticmetal.get_os(zone="fr-par-1",
    name="Ubuntu",
    version="22.04 LTS (Jammy Jellyfish)")
my_offer = scaleway.elasticmetal.get_offer(zone="fr-par-1",
    name="EM-A115X-SSD")
private_network = scaleway.elasticmetal.get_option(zone="fr-par-1",
    name="Private Network")
base = scaleway.elasticmetal.Server("base",
    zone="fr-par-2",
    offer=my_offer.offer_id,
    os=my_os.os_id,
    ssh_key_ids=[my_key_scaleway_account_ssh_key["id"]],
    options=[{
        "id": private_network.option_id,
    }],
    private_networks=[{
        "id": pn01.id,
        "ipam_ip_ids": [ip01.id],
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/elasticmetal"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iam"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/ipam"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/network"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		vpc01, err := network.NewVpc(ctx, "vpc01", &network.VpcArgs{
			Name: pulumi.String("vpc_baremetal"),
		})
		if err != nil {
			return err
		}
		pn01, err := network.NewPrivateNetwork(ctx, "pn01", &network.PrivateNetworkArgs{
			Name: pulumi.String("private_network_baremetal"),
			Ipv4Subnet: &network.PrivateNetworkIpv4SubnetArgs{
				Subnet: pulumi.String("172.16.64.0/22"),
			},
			VpcId: vpc01.ID(),
		})
		if err != nil {
			return err
		}
		ip01, err := ipam.NewIp(ctx, "ip01", &ipam.IpArgs{
			Address: pulumi.String("172.16.64.7"),
			Sources: ipam.IpSourceArray{
				&ipam.IpSourceArgs{
					PrivateNetworkId: pn01.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = iam.LookupSshKey(ctx, &iam.LookupSshKeyArgs{
			Name: pulumi.StringRef("main"),
		}, nil)
		if err != nil {
			return err
		}
		myOs, err := elasticmetal.GetOs(ctx, &elasticmetal.GetOsArgs{
			Zone:    pulumi.StringRef("fr-par-1"),
			Name:    pulumi.StringRef("Ubuntu"),
			Version: pulumi.StringRef("22.04 LTS (Jammy Jellyfish)"),
		}, nil)
		if err != nil {
			return err
		}
		myOffer, err := elasticmetal.GetOffer(ctx, &elasticmetal.GetOfferArgs{
			Zone: pulumi.StringRef("fr-par-1"),
			Name: pulumi.StringRef("EM-A115X-SSD"),
		}, nil)
		if err != nil {
			return err
		}
		privateNetwork, err := elasticmetal.GetOption(ctx, &elasticmetal.GetOptionArgs{
			Zone: pulumi.StringRef("fr-par-1"),
			Name: pulumi.StringRef("Private Network"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = elasticmetal.NewServer(ctx, "base", &elasticmetal.ServerArgs{
			Zone:  pulumi.String("fr-par-2"),
			Offer: pulumi.String(myOffer.OfferId),
			Os:    pulumi.String(myOs.OsId),
			SshKeyIds: pulumi.StringArray{
				myKeyScalewayAccountSshKey.Id,
			},
			Options: elasticmetal.ServerOptionArray{
				&elasticmetal.ServerOptionArgs{
					Id: pulumi.String(privateNetwork.OptionId),
				},
			},
			PrivateNetworks: elasticmetal.ServerPrivateNetworkArray{
				&elasticmetal.ServerPrivateNetworkArgs{
					Id: pn01.ID(),
					IpamIpIds: pulumi.StringArray{
						ip01.ID(),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var vpc01 = new Scaleway.Network.Vpc("vpc01", new()
    {
        Name = "vpc_baremetal",
    });

    var pn01 = new Scaleway.Network.PrivateNetwork("pn01", new()
    {
        Name = "private_network_baremetal",
        Ipv4Subnet = new Scaleway.Network.Inputs.PrivateNetworkIpv4SubnetArgs
        {
            Subnet = "172.16.64.0/22",
        },
        VpcId = vpc01.Id,
    });

    var ip01 = new Scaleway.Ipam.Ip("ip01", new()
    {
        Address = "172.16.64.7",
        Sources = new[]
        {
            new Scaleway.Ipam.Inputs.IpSourceArgs
            {
                PrivateNetworkId = pn01.Id,
            },
        },
    });

    var myKey = Scaleway.Iam.GetSshKey.Invoke(new()
    {
        Name = "main",
    });

    var myOs = Scaleway.Elasticmetal.GetOs.Invoke(new()
    {
        Zone = "fr-par-1",
        Name = "Ubuntu",
        Version = "22.04 LTS (Jammy Jellyfish)",
    });

    var myOffer = Scaleway.Elasticmetal.GetOffer.Invoke(new()
    {
        Zone = "fr-par-1",
        Name = "EM-A115X-SSD",
    });

    var privateNetwork = Scaleway.Elasticmetal.GetOption.Invoke(new()
    {
        Zone = "fr-par-1",
        Name = "Private Network",
    });

    var @base = new Scaleway.Elasticmetal.Server("base", new()
    {
        Zone = "fr-par-2",
        Offer = myOffer.Apply(getOfferResult => getOfferResult.OfferId),
        Os = myOs.Apply(getOsResult => getOsResult.OsId),
        SshKeyIds = new[]
        {
            myKeyScalewayAccountSshKey.Id,
        },
        Options = new[]
        {
            new Scaleway.Elasticmetal.Inputs.ServerOptionArgs
            {
                Id = privateNetwork.Apply(getOptionResult => getOptionResult.OptionId),
            },
        },
        PrivateNetworks = new[]
        {
            new Scaleway.Elasticmetal.Inputs.ServerPrivateNetworkArgs
            {
                Id = pn01.Id,
                IpamIpIds = new[]
                {
                    ip01.Id,
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.network.Vpc;
import com.pulumi.scaleway.network.VpcArgs;
import com.pulumi.scaleway.network.PrivateNetwork;
import com.pulumi.scaleway.network.PrivateNetworkArgs;
import com.pulumi.scaleway.network.inputs.PrivateNetworkIpv4SubnetArgs;
import com.pulumi.scaleway.ipam.Ip;
import com.pulumi.scaleway.ipam.IpArgs;
import com.pulumi.scaleway.ipam.inputs.IpSourceArgs;
import com.pulumi.scaleway.iam.IamFunctions;
import com.pulumi.scaleway.iam.inputs.GetSshKeyArgs;
import com.pulumi.scaleway.elasticmetal.ElasticmetalFunctions;
import com.pulumi.scaleway.elasticmetal.inputs.GetOsArgs;
import com.pulumi.scaleway.elasticmetal.inputs.GetOfferArgs;
import com.pulumi.scaleway.elasticmetal.inputs.GetOptionArgs;
import com.pulumi.scaleway.elasticmetal.Server;
import com.pulumi.scaleway.elasticmetal.ServerArgs;
import com.pulumi.scaleway.elasticmetal.inputs.ServerOptionArgs;
import com.pulumi.scaleway.elasticmetal.inputs.ServerPrivateNetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var vpc01 = new Vpc("vpc01", VpcArgs.builder()
            .name("vpc_baremetal")
            .build());

        var pn01 = new PrivateNetwork("pn01", PrivateNetworkArgs.builder()
            .name("private_network_baremetal")
            .ipv4Subnet(PrivateNetworkIpv4SubnetArgs.builder()
                .subnet("172.16.64.0/22")
                .build())
            .vpcId(vpc01.id())
            .build());

        var ip01 = new Ip("ip01", IpArgs.builder()
            .address("172.16.64.7")
            .sources(IpSourceArgs.builder()
                .privateNetworkId(pn01.id())
                .build())
            .build());

        final var myKey = IamFunctions.getSshKey(GetSshKeyArgs.builder()
            .name("main")
            .build());

        final var myOs = ElasticmetalFunctions.getOs(GetOsArgs.builder()
            .zone("fr-par-1")
            .name("Ubuntu")
            .version("22.04 LTS (Jammy Jellyfish)")
            .build());

        final var myOffer = ElasticmetalFunctions.getOffer(GetOfferArgs.builder()
            .zone("fr-par-1")
            .name("EM-A115X-SSD")
            .build());

        final var privateNetwork = ElasticmetalFunctions.getOption(GetOptionArgs.builder()
            .zone("fr-par-1")
            .name("Private Network")
            .build());

        var base = new Server("base", ServerArgs.builder()
            .zone("fr-par-2")
            .offer(myOffer.applyValue(getOfferResult -> getOfferResult.offerId()))
            .os(myOs.applyValue(getOsResult -> getOsResult.osId()))
            .sshKeyIds(myKeyScalewayAccountSshKey.id())
            .options(ServerOptionArgs.builder()
                .id(privateNetwork.applyValue(getOptionResult -> getOptionResult.optionId()))
                .build())
            .privateNetworks(ServerPrivateNetworkArgs.builder()
                .id(pn01.id())
                .ipamIpIds(ip01.id())
                .build())
            .build());

    }
}
Copy
resources:
  vpc01:
    type: scaleway:network:Vpc
    properties:
      name: vpc_baremetal
  pn01:
    type: scaleway:network:PrivateNetwork
    properties:
      name: private_network_baremetal
      ipv4Subnet:
        subnet: 172.16.64.0/22
      vpcId: ${vpc01.id}
  ip01:
    type: scaleway:ipam:Ip
    properties:
      address: 172.16.64.7
      sources:
        - privateNetworkId: ${pn01.id}
  base:
    type: scaleway:elasticmetal:Server
    properties:
      zone: fr-par-2
      offer: ${myOffer.offerId}
      os: ${myOs.osId}
      sshKeyIds:
        - ${myKeyScalewayAccountSshKey.id}
      options:
        - id: ${privateNetwork.optionId}
      privateNetworks:
        - id: ${pn01.id}
          ipamIpIds:
            - ${ip01.id}
variables:
  myKey:
    fn::invoke:
      function: scaleway:iam:getSshKey
      arguments:
        name: main
  myOs:
    fn::invoke:
      function: scaleway:elasticmetal:getOs
      arguments:
        zone: fr-par-1
        name: Ubuntu
        version: 22.04 LTS (Jammy Jellyfish)
  myOffer:
    fn::invoke:
      function: scaleway:elasticmetal:getOffer
      arguments:
        zone: fr-par-1
        name: EM-A115X-SSD
  privateNetwork:
    fn::invoke:
      function: scaleway:elasticmetal:getOption
      arguments:
        zone: fr-par-1
        name: Private Network
Copy

Without install config

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";

const myOffer = scaleway.elasticmetal.getOffer({
    zone: "fr-par-2",
    name: "EM-B112X-SSD",
});
const base = new scaleway.elasticmetal.Server("base", {
    zone: "fr-par-2",
    offer: myOffer.then(myOffer => myOffer.offerId),
    installConfigAfterward: true,
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

my_offer = scaleway.elasticmetal.get_offer(zone="fr-par-2",
    name="EM-B112X-SSD")
base = scaleway.elasticmetal.Server("base",
    zone="fr-par-2",
    offer=my_offer.offer_id,
    install_config_afterward=True)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/elasticmetal"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myOffer, err := elasticmetal.GetOffer(ctx, &elasticmetal.GetOfferArgs{
			Zone: pulumi.StringRef("fr-par-2"),
			Name: pulumi.StringRef("EM-B112X-SSD"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = elasticmetal.NewServer(ctx, "base", &elasticmetal.ServerArgs{
			Zone:                   pulumi.String("fr-par-2"),
			Offer:                  pulumi.String(myOffer.OfferId),
			InstallConfigAfterward: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var myOffer = Scaleway.Elasticmetal.GetOffer.Invoke(new()
    {
        Zone = "fr-par-2",
        Name = "EM-B112X-SSD",
    });

    var @base = new Scaleway.Elasticmetal.Server("base", new()
    {
        Zone = "fr-par-2",
        Offer = myOffer.Apply(getOfferResult => getOfferResult.OfferId),
        InstallConfigAfterward = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.elasticmetal.ElasticmetalFunctions;
import com.pulumi.scaleway.elasticmetal.inputs.GetOfferArgs;
import com.pulumi.scaleway.elasticmetal.Server;
import com.pulumi.scaleway.elasticmetal.ServerArgs;
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 myOffer = ElasticmetalFunctions.getOffer(GetOfferArgs.builder()
            .zone("fr-par-2")
            .name("EM-B112X-SSD")
            .build());

        var base = new Server("base", ServerArgs.builder()
            .zone("fr-par-2")
            .offer(myOffer.applyValue(getOfferResult -> getOfferResult.offerId()))
            .installConfigAfterward(true)
            .build());

    }
}
Copy
resources:
  base:
    type: scaleway:elasticmetal:Server
    properties:
      zone: fr-par-2
      offer: ${myOffer.offerId}
      installConfigAfterward: true
variables:
  myOffer:
    fn::invoke:
      function: scaleway:elasticmetal:getOffer
      arguments:
        zone: fr-par-2
        name: EM-B112X-SSD
Copy

With custom partitioning

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";

const config = new pulumi.Config();
const configCustomPartitioning = config.get("configCustomPartitioning") || "{\"disks\":[{\"device\":\"/dev/nvme0n1\",\"partitions\":[{\"label\":\"uefi\",\"number\":1,\"size\":536870912},{\"label\":\"swap\",\"number\":2,\"size\":4294967296},{\"label\":\"boot\",\"number\":3,\"size\":1073741824},{\"label\":\"root\",\"number\":4,\"size\":1017827045376}]},{\"device\":\"/dev/nvme1n1\",\"partitions\":[{\"label\":\"swap\",\"number\":1,\"size\":4294967296},{\"label\":\"boot\",\"number\":2,\"size\":1073741824},{\"label\":\"root\",\"number\":3,\"size\":1017827045376}]}],\"filesystems\":[{\"device\":\"/dev/nvme0n1p1\",\"format\":\"fat32\",\"mountpoint\":\"/boot/efi\"},{\"device\":\"/dev/md0\",\"format\":\"ext4\",\"mountpoint\":\"/boot\"},{\"device\":\"/dev/md1\",\"format\":\"ext4\",\"mountpoint\":\"/\"}],\"raids\":[{\"devices\":[\"/dev/nvme0n1p3\",\"/dev/nvme1n1p2\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md0\"},{\"devices\":[\"/dev/nvme0n1p4\",\"/dev/nvme1n1p3\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md1\"}],\"zfs\":{\"pools\":[]}}";
const myOs = scaleway.elasticmetal.getOs({
    zone: "fr-par-1",
    name: "Ubuntu",
    version: "22.04 LTS (Jammy Jellyfish)",
});
const main = new scaleway.iam.SshKey("main", {name: "main"});
const myOffer = scaleway.elasticmetal.getOffer({
    zone: "fr-par-1",
    name: "EM-B220E-NVME",
    subscriptionPeriod: "hourly",
});
const base = new scaleway.elasticmetal.Server("base", {
    name: "%s",
    zone: "fr-par-1",
    description: "test a description",
    offer: myOffer.then(myOffer => myOffer.offerId),
    os: myOs.then(myOs => myOs.osId),
    partitioning: configCustomPartitioning,
    tags: [
        "terraform-test",
        "scaleway_baremetal_server",
        "minimal",
    ],
    sshKeyIds: [main.id],
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

config = pulumi.Config()
config_custom_partitioning = config.get("configCustomPartitioning")
if config_custom_partitioning is None:
    config_custom_partitioning = "{\"disks\":[{\"device\":\"/dev/nvme0n1\",\"partitions\":[{\"label\":\"uefi\",\"number\":1,\"size\":536870912},{\"label\":\"swap\",\"number\":2,\"size\":4294967296},{\"label\":\"boot\",\"number\":3,\"size\":1073741824},{\"label\":\"root\",\"number\":4,\"size\":1017827045376}]},{\"device\":\"/dev/nvme1n1\",\"partitions\":[{\"label\":\"swap\",\"number\":1,\"size\":4294967296},{\"label\":\"boot\",\"number\":2,\"size\":1073741824},{\"label\":\"root\",\"number\":3,\"size\":1017827045376}]}],\"filesystems\":[{\"device\":\"/dev/nvme0n1p1\",\"format\":\"fat32\",\"mountpoint\":\"/boot/efi\"},{\"device\":\"/dev/md0\",\"format\":\"ext4\",\"mountpoint\":\"/boot\"},{\"device\":\"/dev/md1\",\"format\":\"ext4\",\"mountpoint\":\"/\"}],\"raids\":[{\"devices\":[\"/dev/nvme0n1p3\",\"/dev/nvme1n1p2\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md0\"},{\"devices\":[\"/dev/nvme0n1p4\",\"/dev/nvme1n1p3\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md1\"}],\"zfs\":{\"pools\":[]}}"
my_os = scaleway.elasticmetal.get_os(zone="fr-par-1",
    name="Ubuntu",
    version="22.04 LTS (Jammy Jellyfish)")
main = scaleway.iam.SshKey("main", name="main")
my_offer = scaleway.elasticmetal.get_offer(zone="fr-par-1",
    name="EM-B220E-NVME",
    subscription_period="hourly")
base = scaleway.elasticmetal.Server("base",
    name="%s",
    zone="fr-par-1",
    description="test a description",
    offer=my_offer.offer_id,
    os=my_os.os_id,
    partitioning=config_custom_partitioning,
    tags=[
        "terraform-test",
        "scaleway_baremetal_server",
        "minimal",
    ],
    ssh_key_ids=[main.id])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/elasticmetal"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iam"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		configCustomPartitioning := "{\"disks\":[{\"device\":\"/dev/nvme0n1\",\"partitions\":[{\"label\":\"uefi\",\"number\":1,\"size\":536870912},{\"label\":\"swap\",\"number\":2,\"size\":4294967296},{\"label\":\"boot\",\"number\":3,\"size\":1073741824},{\"label\":\"root\",\"number\":4,\"size\":1017827045376}]},{\"device\":\"/dev/nvme1n1\",\"partitions\":[{\"label\":\"swap\",\"number\":1,\"size\":4294967296},{\"label\":\"boot\",\"number\":2,\"size\":1073741824},{\"label\":\"root\",\"number\":3,\"size\":1017827045376}]}],\"filesystems\":[{\"device\":\"/dev/nvme0n1p1\",\"format\":\"fat32\",\"mountpoint\":\"/boot/efi\"},{\"device\":\"/dev/md0\",\"format\":\"ext4\",\"mountpoint\":\"/boot\"},{\"device\":\"/dev/md1\",\"format\":\"ext4\",\"mountpoint\":\"/\"}],\"raids\":[{\"devices\":[\"/dev/nvme0n1p3\",\"/dev/nvme1n1p2\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md0\"},{\"devices\":[\"/dev/nvme0n1p4\",\"/dev/nvme1n1p3\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md1\"}],\"zfs\":{\"pools\":[]}}"
		if param := cfg.Get("configCustomPartitioning"); param != "" {
			configCustomPartitioning = param
		}
		myOs, err := elasticmetal.GetOs(ctx, &elasticmetal.GetOsArgs{
			Zone:    pulumi.StringRef("fr-par-1"),
			Name:    pulumi.StringRef("Ubuntu"),
			Version: pulumi.StringRef("22.04 LTS (Jammy Jellyfish)"),
		}, nil)
		if err != nil {
			return err
		}
		main, err := iam.NewSshKey(ctx, "main", &iam.SshKeyArgs{
			Name: pulumi.String("main"),
		})
		if err != nil {
			return err
		}
		myOffer, err := elasticmetal.GetOffer(ctx, &elasticmetal.GetOfferArgs{
			Zone:               pulumi.StringRef("fr-par-1"),
			Name:               pulumi.StringRef("EM-B220E-NVME"),
			SubscriptionPeriod: pulumi.StringRef("hourly"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = elasticmetal.NewServer(ctx, "base", &elasticmetal.ServerArgs{
			Name:         pulumi.String("%s"),
			Zone:         pulumi.String("fr-par-1"),
			Description:  pulumi.String("test a description"),
			Offer:        pulumi.String(myOffer.OfferId),
			Os:           pulumi.String(myOs.OsId),
			Partitioning: pulumi.String(configCustomPartitioning),
			Tags: pulumi.StringArray{
				pulumi.String("terraform-test"),
				pulumi.String("scaleway_baremetal_server"),
				pulumi.String("minimal"),
			},
			SshKeyIds: pulumi.StringArray{
				main.ID(),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var configCustomPartitioning = config.Get("configCustomPartitioning") ?? "{\"disks\":[{\"device\":\"/dev/nvme0n1\",\"partitions\":[{\"label\":\"uefi\",\"number\":1,\"size\":536870912},{\"label\":\"swap\",\"number\":2,\"size\":4294967296},{\"label\":\"boot\",\"number\":3,\"size\":1073741824},{\"label\":\"root\",\"number\":4,\"size\":1017827045376}]},{\"device\":\"/dev/nvme1n1\",\"partitions\":[{\"label\":\"swap\",\"number\":1,\"size\":4294967296},{\"label\":\"boot\",\"number\":2,\"size\":1073741824},{\"label\":\"root\",\"number\":3,\"size\":1017827045376}]}],\"filesystems\":[{\"device\":\"/dev/nvme0n1p1\",\"format\":\"fat32\",\"mountpoint\":\"/boot/efi\"},{\"device\":\"/dev/md0\",\"format\":\"ext4\",\"mountpoint\":\"/boot\"},{\"device\":\"/dev/md1\",\"format\":\"ext4\",\"mountpoint\":\"/\"}],\"raids\":[{\"devices\":[\"/dev/nvme0n1p3\",\"/dev/nvme1n1p2\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md0\"},{\"devices\":[\"/dev/nvme0n1p4\",\"/dev/nvme1n1p3\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md1\"}],\"zfs\":{\"pools\":[]}}";
    var myOs = Scaleway.Elasticmetal.GetOs.Invoke(new()
    {
        Zone = "fr-par-1",
        Name = "Ubuntu",
        Version = "22.04 LTS (Jammy Jellyfish)",
    });

    var main = new Scaleway.Iam.SshKey("main", new()
    {
        Name = "main",
    });

    var myOffer = Scaleway.Elasticmetal.GetOffer.Invoke(new()
    {
        Zone = "fr-par-1",
        Name = "EM-B220E-NVME",
        SubscriptionPeriod = "hourly",
    });

    var @base = new Scaleway.Elasticmetal.Server("base", new()
    {
        Name = "%s",
        Zone = "fr-par-1",
        Description = "test a description",
        Offer = myOffer.Apply(getOfferResult => getOfferResult.OfferId),
        Os = myOs.Apply(getOsResult => getOsResult.OsId),
        Partitioning = configCustomPartitioning,
        Tags = new[]
        {
            "terraform-test",
            "scaleway_baremetal_server",
            "minimal",
        },
        SshKeyIds = new[]
        {
            main.Id,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.elasticmetal.ElasticmetalFunctions;
import com.pulumi.scaleway.elasticmetal.inputs.GetOsArgs;
import com.pulumi.scaleway.iam.SshKey;
import com.pulumi.scaleway.iam.SshKeyArgs;
import com.pulumi.scaleway.elasticmetal.inputs.GetOfferArgs;
import com.pulumi.scaleway.elasticmetal.Server;
import com.pulumi.scaleway.elasticmetal.ServerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var configCustomPartitioning = config.get("configCustomPartitioning").orElse("{\"disks\":[{\"device\":\"/dev/nvme0n1\",\"partitions\":[{\"label\":\"uefi\",\"number\":1,\"size\":536870912},{\"label\":\"swap\",\"number\":2,\"size\":4294967296},{\"label\":\"boot\",\"number\":3,\"size\":1073741824},{\"label\":\"root\",\"number\":4,\"size\":1017827045376}]},{\"device\":\"/dev/nvme1n1\",\"partitions\":[{\"label\":\"swap\",\"number\":1,\"size\":4294967296},{\"label\":\"boot\",\"number\":2,\"size\":1073741824},{\"label\":\"root\",\"number\":3,\"size\":1017827045376}]}],\"filesystems\":[{\"device\":\"/dev/nvme0n1p1\",\"format\":\"fat32\",\"mountpoint\":\"/boot/efi\"},{\"device\":\"/dev/md0\",\"format\":\"ext4\",\"mountpoint\":\"/boot\"},{\"device\":\"/dev/md1\",\"format\":\"ext4\",\"mountpoint\":\"/\"}],\"raids\":[{\"devices\":[\"/dev/nvme0n1p3\",\"/dev/nvme1n1p2\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md0\"},{\"devices\":[\"/dev/nvme0n1p4\",\"/dev/nvme1n1p3\"],\"level\":\"raid_level_1\",\"name\":\"/dev/md1\"}],\"zfs\":{\"pools\":[]}}");
        final var myOs = ElasticmetalFunctions.getOs(GetOsArgs.builder()
            .zone("fr-par-1")
            .name("Ubuntu")
            .version("22.04 LTS (Jammy Jellyfish)")
            .build());

        var main = new SshKey("main", SshKeyArgs.builder()
            .name("main")
            .build());

        final var myOffer = ElasticmetalFunctions.getOffer(GetOfferArgs.builder()
            .zone("fr-par-1")
            .name("EM-B220E-NVME")
            .subscriptionPeriod("hourly")
            .build());

        var base = new Server("base", ServerArgs.builder()
            .name("%s")
            .zone("fr-par-1")
            .description("test a description")
            .offer(myOffer.applyValue(getOfferResult -> getOfferResult.offerId()))
            .os(myOs.applyValue(getOsResult -> getOsResult.osId()))
            .partitioning(configCustomPartitioning)
            .tags(            
                "terraform-test",
                "scaleway_baremetal_server",
                "minimal")
            .sshKeyIds(main.id())
            .build());

    }
}
Copy
configuration:
  configCustomPartitioning:
    type: string
    default: '{"disks":[{"device":"/dev/nvme0n1","partitions":[{"label":"uefi","number":1,"size":536870912},{"label":"swap","number":2,"size":4294967296},{"label":"boot","number":3,"size":1073741824},{"label":"root","number":4,"size":1017827045376}]},{"device":"/dev/nvme1n1","partitions":[{"label":"swap","number":1,"size":4294967296},{"label":"boot","number":2,"size":1073741824},{"label":"root","number":3,"size":1017827045376}]}],"filesystems":[{"device":"/dev/nvme0n1p1","format":"fat32","mountpoint":"/boot/efi"},{"device":"/dev/md0","format":"ext4","mountpoint":"/boot"},{"device":"/dev/md1","format":"ext4","mountpoint":"/"}],"raids":[{"devices":["/dev/nvme0n1p3","/dev/nvme1n1p2"],"level":"raid_level_1","name":"/dev/md0"},{"devices":["/dev/nvme0n1p4","/dev/nvme1n1p3"],"level":"raid_level_1","name":"/dev/md1"}],"zfs":{"pools":[]}}'
resources:
  main:
    type: scaleway:iam:SshKey
    properties:
      name: main
  base:
    type: scaleway:elasticmetal:Server
    properties:
      name: '%s'
      zone: fr-par-1
      description: test a description
      offer: ${myOffer.offerId}
      os: ${myOs.osId}
      partitioning: ${configCustomPartitioning}
      tags:
        - terraform-test
        - scaleway_baremetal_server
        - minimal
      sshKeyIds:
        - ${main.id}
variables:
  myOs:
    fn::invoke:
      function: scaleway:elasticmetal:getOs
      arguments:
        zone: fr-par-1
        name: Ubuntu
        version: 22.04 LTS (Jammy Jellyfish)
  myOffer:
    fn::invoke:
      function: scaleway:elasticmetal:getOffer
      arguments:
        zone: fr-par-1
        name: EM-B220E-NVME
        subscriptionPeriod: hourly
Copy

Create BaremetalServer Resource

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

Constructor syntax

new BaremetalServer(name: string, args: BaremetalServerArgs, opts?: CustomResourceOptions);
@overload
def BaremetalServer(resource_name: str,
                    args: BaremetalServerArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def BaremetalServer(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    description: Optional[str] = None,
                    hostname: Optional[str] = None,
                    install_config_afterward: Optional[bool] = None,
                    name: Optional[str] = None,
                    offer: Optional[str] = None,
                    options: Optional[Sequence[BaremetalServerOptionArgs]] = None,
                    os: Optional[str] = None,
                    partitioning: Optional[str] = None,
                    password: Optional[str] = None,
                    private_networks: Optional[Sequence[BaremetalServerPrivateNetworkArgs]] = None,
                    project_id: Optional[str] = None,
                    reinstall_on_config_changes: Optional[bool] = None,
                    service_password: Optional[str] = None,
                    service_user: Optional[str] = None,
                    ssh_key_ids: Optional[Sequence[str]] = None,
                    tags: Optional[Sequence[str]] = None,
                    user: Optional[str] = None,
                    zone: Optional[str] = None)
func NewBaremetalServer(ctx *Context, name string, args BaremetalServerArgs, opts ...ResourceOption) (*BaremetalServer, error)
public BaremetalServer(string name, BaremetalServerArgs args, CustomResourceOptions? opts = null)
public BaremetalServer(String name, BaremetalServerArgs args)
public BaremetalServer(String name, BaremetalServerArgs args, CustomResourceOptions options)
type: scaleway:BaremetalServer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BaremetalServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BaremetalServerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BaremetalServerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BaremetalServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BaremetalServerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BaremetalServer Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The BaremetalServer resource accepts the following input properties:

Offer
This property is required.
Changes to this property will trigger replacement.
string

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

Description string
A description for the server.
Hostname string
The hostname of the server.
InstallConfigAfterward bool
If True, this boolean allows to create a server without the install config if you want to provide it later.
Name string
The name of the server.
Options List<Pulumiverse.Scaleway.Inputs.BaremetalServerOption>

The options to enable on the server.

The options block supports:

Os string

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

Partitioning string
The partitioning schema in JSON format
Password string
Password used for the installation. May be required depending on used os.
PrivateNetworks List<Pulumiverse.Scaleway.Inputs.BaremetalServerPrivateNetwork>
The private networks to attach to the server. For more information, see the documentation
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the server is associated with.
ReinstallOnConfigChanges bool

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

ServicePassword string
Password used for the service to install. May be required depending on used os.
ServiceUser string
User used for the service to install.
SshKeyIds List<string>
List of SSH keys allowed to connect to the server.
Tags List<string>
The tags associated with the server.
User string
User used for the installation.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the server should be created.
Offer
This property is required.
Changes to this property will trigger replacement.
string

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

Description string
A description for the server.
Hostname string
The hostname of the server.
InstallConfigAfterward bool
If True, this boolean allows to create a server without the install config if you want to provide it later.
Name string
The name of the server.
Options []BaremetalServerOptionArgs

The options to enable on the server.

The options block supports:

Os string

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

Partitioning string
The partitioning schema in JSON format
Password string
Password used for the installation. May be required depending on used os.
PrivateNetworks []BaremetalServerPrivateNetworkArgs
The private networks to attach to the server. For more information, see the documentation
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the server is associated with.
ReinstallOnConfigChanges bool

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

ServicePassword string
Password used for the service to install. May be required depending on used os.
ServiceUser string
User used for the service to install.
SshKeyIds []string
List of SSH keys allowed to connect to the server.
Tags []string
The tags associated with the server.
User string
User used for the installation.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the server should be created.
offer
This property is required.
Changes to this property will trigger replacement.
String

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

description String
A description for the server.
hostname String
The hostname of the server.
installConfigAfterward Boolean
If True, this boolean allows to create a server without the install config if you want to provide it later.
name String
The name of the server.
options List<BaremetalServerOption>

The options to enable on the server.

The options block supports:

os String

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

partitioning String
The partitioning schema in JSON format
password String
Password used for the installation. May be required depending on used os.
privateNetworks List<BaremetalServerPrivateNetwork>
The private networks to attach to the server. For more information, see the documentation
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the server is associated with.
reinstallOnConfigChanges Boolean

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

servicePassword String
Password used for the service to install. May be required depending on used os.
serviceUser String
User used for the service to install.
sshKeyIds List<String>
List of SSH keys allowed to connect to the server.
tags List<String>
The tags associated with the server.
user String
User used for the installation.
zone Changes to this property will trigger replacement. String
zone) The zone in which the server should be created.
offer
This property is required.
Changes to this property will trigger replacement.
string

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

description string
A description for the server.
hostname string
The hostname of the server.
installConfigAfterward boolean
If True, this boolean allows to create a server without the install config if you want to provide it later.
name string
The name of the server.
options BaremetalServerOption[]

The options to enable on the server.

The options block supports:

os string

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

partitioning string
The partitioning schema in JSON format
password string
Password used for the installation. May be required depending on used os.
privateNetworks BaremetalServerPrivateNetwork[]
The private networks to attach to the server. For more information, see the documentation
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project the server is associated with.
reinstallOnConfigChanges boolean

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

servicePassword string
Password used for the service to install. May be required depending on used os.
serviceUser string
User used for the service to install.
sshKeyIds string[]
List of SSH keys allowed to connect to the server.
tags string[]
The tags associated with the server.
user string
User used for the installation.
zone Changes to this property will trigger replacement. string
zone) The zone in which the server should be created.
offer
This property is required.
Changes to this property will trigger replacement.
str

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

description str
A description for the server.
hostname str
The hostname of the server.
install_config_afterward bool
If True, this boolean allows to create a server without the install config if you want to provide it later.
name str
The name of the server.
options Sequence[BaremetalServerOptionArgs]

The options to enable on the server.

The options block supports:

os str

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

partitioning str
The partitioning schema in JSON format
password str
Password used for the installation. May be required depending on used os.
private_networks Sequence[BaremetalServerPrivateNetworkArgs]
The private networks to attach to the server. For more information, see the documentation
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project the server is associated with.
reinstall_on_config_changes bool

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

service_password str
Password used for the service to install. May be required depending on used os.
service_user str
User used for the service to install.
ssh_key_ids Sequence[str]
List of SSH keys allowed to connect to the server.
tags Sequence[str]
The tags associated with the server.
user str
User used for the installation.
zone Changes to this property will trigger replacement. str
zone) The zone in which the server should be created.
offer
This property is required.
Changes to this property will trigger replacement.
String

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

description String
A description for the server.
hostname String
The hostname of the server.
installConfigAfterward Boolean
If True, this boolean allows to create a server without the install config if you want to provide it later.
name String
The name of the server.
options List<Property Map>

The options to enable on the server.

The options block supports:

os String

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

partitioning String
The partitioning schema in JSON format
password String
Password used for the installation. May be required depending on used os.
privateNetworks List<Property Map>
The private networks to attach to the server. For more information, see the documentation
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the server is associated with.
reinstallOnConfigChanges Boolean

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

servicePassword String
Password used for the service to install. May be required depending on used os.
serviceUser String
User used for the service to install.
sshKeyIds List<String>
List of SSH keys allowed to connect to the server.
tags List<String>
The tags associated with the server.
user String
User used for the installation.
zone Changes to this property will trigger replacement. String
zone) The zone in which the server should be created.

Outputs

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

Domain string
The domain of the server.
Id string
The provider-assigned unique ID for this managed resource.
Ips List<Pulumiverse.Scaleway.Outputs.BaremetalServerIp>
(List of) The IPs of the server.
Ipv4s List<Pulumiverse.Scaleway.Outputs.BaremetalServerIpv4>
(List of) The IPv4 addresses of the server.
Ipv6s List<Pulumiverse.Scaleway.Outputs.BaremetalServerIpv6>
(List of) The IPv6 addresses of the server.
OfferId string
The ID of the offer.
OfferName string
The name of the offer.
OrganizationId string
The organization ID the server is associated with.
OsName string
The name of the os.
Domain string
The domain of the server.
Id string
The provider-assigned unique ID for this managed resource.
Ips []BaremetalServerIp
(List of) The IPs of the server.
Ipv4s []BaremetalServerIpv4
(List of) The IPv4 addresses of the server.
Ipv6s []BaremetalServerIpv6
(List of) The IPv6 addresses of the server.
OfferId string
The ID of the offer.
OfferName string
The name of the offer.
OrganizationId string
The organization ID the server is associated with.
OsName string
The name of the os.
domain String
The domain of the server.
id String
The provider-assigned unique ID for this managed resource.
ips List<BaremetalServerIp>
(List of) The IPs of the server.
ipv4s List<BaremetalServerIpv4>
(List of) The IPv4 addresses of the server.
ipv6s List<BaremetalServerIpv6>
(List of) The IPv6 addresses of the server.
offerId String
The ID of the offer.
offerName String
The name of the offer.
organizationId String
The organization ID the server is associated with.
osName String
The name of the os.
domain string
The domain of the server.
id string
The provider-assigned unique ID for this managed resource.
ips BaremetalServerIp[]
(List of) The IPs of the server.
ipv4s BaremetalServerIpv4[]
(List of) The IPv4 addresses of the server.
ipv6s BaremetalServerIpv6[]
(List of) The IPv6 addresses of the server.
offerId string
The ID of the offer.
offerName string
The name of the offer.
organizationId string
The organization ID the server is associated with.
osName string
The name of the os.
domain str
The domain of the server.
id str
The provider-assigned unique ID for this managed resource.
ips Sequence[BaremetalServerIp]
(List of) The IPs of the server.
ipv4s Sequence[BaremetalServerIpv4]
(List of) The IPv4 addresses of the server.
ipv6s Sequence[BaremetalServerIpv6]
(List of) The IPv6 addresses of the server.
offer_id str
The ID of the offer.
offer_name str
The name of the offer.
organization_id str
The organization ID the server is associated with.
os_name str
The name of the os.
domain String
The domain of the server.
id String
The provider-assigned unique ID for this managed resource.
ips List<Property Map>
(List of) The IPs of the server.
ipv4s List<Property Map>
(List of) The IPv4 addresses of the server.
ipv6s List<Property Map>
(List of) The IPv6 addresses of the server.
offerId String
The ID of the offer.
offerName String
The name of the offer.
organizationId String
The organization ID the server is associated with.
osName String
The name of the os.

Look up Existing BaremetalServer Resource

Get an existing BaremetalServer 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?: BaremetalServerState, opts?: CustomResourceOptions): BaremetalServer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        domain: Optional[str] = None,
        hostname: Optional[str] = None,
        install_config_afterward: Optional[bool] = None,
        ips: Optional[Sequence[BaremetalServerIpArgs]] = None,
        ipv4s: Optional[Sequence[BaremetalServerIpv4Args]] = None,
        ipv6s: Optional[Sequence[BaremetalServerIpv6Args]] = None,
        name: Optional[str] = None,
        offer: Optional[str] = None,
        offer_id: Optional[str] = None,
        offer_name: Optional[str] = None,
        options: Optional[Sequence[BaremetalServerOptionArgs]] = None,
        organization_id: Optional[str] = None,
        os: Optional[str] = None,
        os_name: Optional[str] = None,
        partitioning: Optional[str] = None,
        password: Optional[str] = None,
        private_networks: Optional[Sequence[BaremetalServerPrivateNetworkArgs]] = None,
        project_id: Optional[str] = None,
        reinstall_on_config_changes: Optional[bool] = None,
        service_password: Optional[str] = None,
        service_user: Optional[str] = None,
        ssh_key_ids: Optional[Sequence[str]] = None,
        tags: Optional[Sequence[str]] = None,
        user: Optional[str] = None,
        zone: Optional[str] = None) -> BaremetalServer
func GetBaremetalServer(ctx *Context, name string, id IDInput, state *BaremetalServerState, opts ...ResourceOption) (*BaremetalServer, error)
public static BaremetalServer Get(string name, Input<string> id, BaremetalServerState? state, CustomResourceOptions? opts = null)
public static BaremetalServer get(String name, Output<String> id, BaremetalServerState state, CustomResourceOptions options)
resources:  _:    type: scaleway:BaremetalServer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
A description for the server.
Domain string
The domain of the server.
Hostname string
The hostname of the server.
InstallConfigAfterward bool
If True, this boolean allows to create a server without the install config if you want to provide it later.
Ips List<Pulumiverse.Scaleway.Inputs.BaremetalServerIp>
(List of) The IPs of the server.
Ipv4s List<Pulumiverse.Scaleway.Inputs.BaremetalServerIpv4>
(List of) The IPv4 addresses of the server.
Ipv6s List<Pulumiverse.Scaleway.Inputs.BaremetalServerIpv6>
(List of) The IPv6 addresses of the server.
Name string
The name of the server.
Offer Changes to this property will trigger replacement. string

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

OfferId string
The ID of the offer.
OfferName string
The name of the offer.
Options List<Pulumiverse.Scaleway.Inputs.BaremetalServerOption>

The options to enable on the server.

The options block supports:

OrganizationId string
The organization ID the server is associated with.
Os string

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

OsName string
The name of the os.
Partitioning string
The partitioning schema in JSON format
Password string
Password used for the installation. May be required depending on used os.
PrivateNetworks List<Pulumiverse.Scaleway.Inputs.BaremetalServerPrivateNetwork>
The private networks to attach to the server. For more information, see the documentation
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the server is associated with.
ReinstallOnConfigChanges bool

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

ServicePassword string
Password used for the service to install. May be required depending on used os.
ServiceUser string
User used for the service to install.
SshKeyIds List<string>
List of SSH keys allowed to connect to the server.
Tags List<string>
The tags associated with the server.
User string
User used for the installation.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the server should be created.
Description string
A description for the server.
Domain string
The domain of the server.
Hostname string
The hostname of the server.
InstallConfigAfterward bool
If True, this boolean allows to create a server without the install config if you want to provide it later.
Ips []BaremetalServerIpArgs
(List of) The IPs of the server.
Ipv4s []BaremetalServerIpv4Args
(List of) The IPv4 addresses of the server.
Ipv6s []BaremetalServerIpv6Args
(List of) The IPv6 addresses of the server.
Name string
The name of the server.
Offer Changes to this property will trigger replacement. string

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

OfferId string
The ID of the offer.
OfferName string
The name of the offer.
Options []BaremetalServerOptionArgs

The options to enable on the server.

The options block supports:

OrganizationId string
The organization ID the server is associated with.
Os string

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

OsName string
The name of the os.
Partitioning string
The partitioning schema in JSON format
Password string
Password used for the installation. May be required depending on used os.
PrivateNetworks []BaremetalServerPrivateNetworkArgs
The private networks to attach to the server. For more information, see the documentation
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the server is associated with.
ReinstallOnConfigChanges bool

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

ServicePassword string
Password used for the service to install. May be required depending on used os.
ServiceUser string
User used for the service to install.
SshKeyIds []string
List of SSH keys allowed to connect to the server.
Tags []string
The tags associated with the server.
User string
User used for the installation.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the server should be created.
description String
A description for the server.
domain String
The domain of the server.
hostname String
The hostname of the server.
installConfigAfterward Boolean
If True, this boolean allows to create a server without the install config if you want to provide it later.
ips List<BaremetalServerIp>
(List of) The IPs of the server.
ipv4s List<BaremetalServerIpv4>
(List of) The IPv4 addresses of the server.
ipv6s List<BaremetalServerIpv6>
(List of) The IPv6 addresses of the server.
name String
The name of the server.
offer Changes to this property will trigger replacement. String

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

offerId String
The ID of the offer.
offerName String
The name of the offer.
options List<BaremetalServerOption>

The options to enable on the server.

The options block supports:

organizationId String
The organization ID the server is associated with.
os String

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

osName String
The name of the os.
partitioning String
The partitioning schema in JSON format
password String
Password used for the installation. May be required depending on used os.
privateNetworks List<BaremetalServerPrivateNetwork>
The private networks to attach to the server. For more information, see the documentation
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the server is associated with.
reinstallOnConfigChanges Boolean

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

servicePassword String
Password used for the service to install. May be required depending on used os.
serviceUser String
User used for the service to install.
sshKeyIds List<String>
List of SSH keys allowed to connect to the server.
tags List<String>
The tags associated with the server.
user String
User used for the installation.
zone Changes to this property will trigger replacement. String
zone) The zone in which the server should be created.
description string
A description for the server.
domain string
The domain of the server.
hostname string
The hostname of the server.
installConfigAfterward boolean
If True, this boolean allows to create a server without the install config if you want to provide it later.
ips BaremetalServerIp[]
(List of) The IPs of the server.
ipv4s BaremetalServerIpv4[]
(List of) The IPv4 addresses of the server.
ipv6s BaremetalServerIpv6[]
(List of) The IPv6 addresses of the server.
name string
The name of the server.
offer Changes to this property will trigger replacement. string

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

offerId string
The ID of the offer.
offerName string
The name of the offer.
options BaremetalServerOption[]

The options to enable on the server.

The options block supports:

organizationId string
The organization ID the server is associated with.
os string

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

osName string
The name of the os.
partitioning string
The partitioning schema in JSON format
password string
Password used for the installation. May be required depending on used os.
privateNetworks BaremetalServerPrivateNetwork[]
The private networks to attach to the server. For more information, see the documentation
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project the server is associated with.
reinstallOnConfigChanges boolean

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

servicePassword string
Password used for the service to install. May be required depending on used os.
serviceUser string
User used for the service to install.
sshKeyIds string[]
List of SSH keys allowed to connect to the server.
tags string[]
The tags associated with the server.
user string
User used for the installation.
zone Changes to this property will trigger replacement. string
zone) The zone in which the server should be created.
description str
A description for the server.
domain str
The domain of the server.
hostname str
The hostname of the server.
install_config_afterward bool
If True, this boolean allows to create a server without the install config if you want to provide it later.
ips Sequence[BaremetalServerIpArgs]
(List of) The IPs of the server.
ipv4s Sequence[BaremetalServerIpv4Args]
(List of) The IPv4 addresses of the server.
ipv6s Sequence[BaremetalServerIpv6Args]
(List of) The IPv6 addresses of the server.
name str
The name of the server.
offer Changes to this property will trigger replacement. str

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

offer_id str
The ID of the offer.
offer_name str
The name of the offer.
options Sequence[BaremetalServerOptionArgs]

The options to enable on the server.

The options block supports:

organization_id str
The organization ID the server is associated with.
os str

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

os_name str
The name of the os.
partitioning str
The partitioning schema in JSON format
password str
Password used for the installation. May be required depending on used os.
private_networks Sequence[BaremetalServerPrivateNetworkArgs]
The private networks to attach to the server. For more information, see the documentation
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project the server is associated with.
reinstall_on_config_changes bool

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

service_password str
Password used for the service to install. May be required depending on used os.
service_user str
User used for the service to install.
ssh_key_ids Sequence[str]
List of SSH keys allowed to connect to the server.
tags Sequence[str]
The tags associated with the server.
user str
User used for the installation.
zone Changes to this property will trigger replacement. str
zone) The zone in which the server should be created.
description String
A description for the server.
domain String
The domain of the server.
hostname String
The hostname of the server.
installConfigAfterward Boolean
If True, this boolean allows to create a server without the install config if you want to provide it later.
ips List<Property Map>
(List of) The IPs of the server.
ipv4s List<Property Map>
(List of) The IPv4 addresses of the server.
ipv6s List<Property Map>
(List of) The IPv6 addresses of the server.
name String
The name of the server.
offer Changes to this property will trigger replacement. String

The offer UUID of the baremetal server. Use this endpoint to find the right offer.

Important: Updates to offer will recreate the server.

offerId String
The ID of the offer.
offerName String
The name of the offer.
options List<Property Map>

The options to enable on the server.

The options block supports:

organizationId String
The organization ID the server is associated with.
os String

The UUID of the os to install on the server. Use this endpoint to find the right OS ID.

Important: Updates to os will reinstall the server.

osName String
The name of the os.
partitioning String
The partitioning schema in JSON format
password String
Password used for the installation. May be required depending on used os.
privateNetworks List<Property Map>
The private networks to attach to the server. For more information, see the documentation
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the server is associated with.
reinstallOnConfigChanges Boolean

If True, this boolean allows to reinstall the server on install config changes.

Important: Updates to ssh_key_ids, user, password, service_user or service_password will not take effect on the server, it requires to reinstall it. To do so please set 'reinstall_on_config_changes' argument to true.

servicePassword String
Password used for the service to install. May be required depending on used os.
serviceUser String
User used for the service to install.
sshKeyIds List<String>
List of SSH keys allowed to connect to the server.
tags List<String>
The tags associated with the server.
user String
User used for the installation.
zone Changes to this property will trigger replacement. String
zone) The zone in which the server should be created.

Supporting Types

BaremetalServerIp
, BaremetalServerIpArgs

Address string
The address of the IPv6.
Id string
The ID of the IPv6.
Reverse string
The reverse of the IPv6.
Version string
The type of the IPv6.
Address string
The address of the IPv6.
Id string
The ID of the IPv6.
Reverse string
The reverse of the IPv6.
Version string
The type of the IPv6.
address String
The address of the IPv6.
id String
The ID of the IPv6.
reverse String
The reverse of the IPv6.
version String
The type of the IPv6.
address string
The address of the IPv6.
id string
The ID of the IPv6.
reverse string
The reverse of the IPv6.
version string
The type of the IPv6.
address str
The address of the IPv6.
id str
The ID of the IPv6.
reverse str
The reverse of the IPv6.
version str
The type of the IPv6.
address String
The address of the IPv6.
id String
The ID of the IPv6.
reverse String
The reverse of the IPv6.
version String
The type of the IPv6.

BaremetalServerIpv4
, BaremetalServerIpv4Args

Address string
The address of the IPv6.
Id string
The ID of the IPv6.
Reverse string
The reverse of the IPv6.
Version string
The type of the IPv6.
Address string
The address of the IPv6.
Id string
The ID of the IPv6.
Reverse string
The reverse of the IPv6.
Version string
The type of the IPv6.
address String
The address of the IPv6.
id String
The ID of the IPv6.
reverse String
The reverse of the IPv6.
version String
The type of the IPv6.
address string
The address of the IPv6.
id string
The ID of the IPv6.
reverse string
The reverse of the IPv6.
version string
The type of the IPv6.
address str
The address of the IPv6.
id str
The ID of the IPv6.
reverse str
The reverse of the IPv6.
version str
The type of the IPv6.
address String
The address of the IPv6.
id String
The ID of the IPv6.
reverse String
The reverse of the IPv6.
version String
The type of the IPv6.

BaremetalServerIpv6
, BaremetalServerIpv6Args

Address string
The address of the IPv6.
Id string
The ID of the IPv6.
Reverse string
The reverse of the IPv6.
Version string
The type of the IPv6.
Address string
The address of the IPv6.
Id string
The ID of the IPv6.
Reverse string
The reverse of the IPv6.
Version string
The type of the IPv6.
address String
The address of the IPv6.
id String
The ID of the IPv6.
reverse String
The reverse of the IPv6.
version String
The type of the IPv6.
address string
The address of the IPv6.
id string
The ID of the IPv6.
reverse string
The reverse of the IPv6.
version string
The type of the IPv6.
address str
The address of the IPv6.
id str
The ID of the IPv6.
reverse str
The reverse of the IPv6.
version str
The type of the IPv6.
address String
The address of the IPv6.
id String
The ID of the IPv6.
reverse String
The reverse of the IPv6.
version String
The type of the IPv6.

BaremetalServerOption
, BaremetalServerOptionArgs

Id This property is required. string
The id of the option to enable. Use this endpoint to find the available options IDs.
ExpiresAt string
The auto expiration date for compatible options
Name string
The name of the server.
Id This property is required. string
The id of the option to enable. Use this endpoint to find the available options IDs.
ExpiresAt string
The auto expiration date for compatible options
Name string
The name of the server.
id This property is required. String
The id of the option to enable. Use this endpoint to find the available options IDs.
expiresAt String
The auto expiration date for compatible options
name String
The name of the server.
id This property is required. string
The id of the option to enable. Use this endpoint to find the available options IDs.
expiresAt string
The auto expiration date for compatible options
name string
The name of the server.
id This property is required. str
The id of the option to enable. Use this endpoint to find the available options IDs.
expires_at str
The auto expiration date for compatible options
name str
The name of the server.
id This property is required. String
The id of the option to enable. Use this endpoint to find the available options IDs.
expiresAt String
The auto expiration date for compatible options
name String
The name of the server.

BaremetalServerPrivateNetwork
, BaremetalServerPrivateNetworkArgs

Id This property is required. string
The id of the private network to attach.
CreatedAt string
The date and time of the creation of the private network.
IpamIpIds List<string>
List of IPAM IP IDs to assign to the server in the requested private network.
Status string
The private network status.
UpdatedAt string
The date and time of the last update of the private network.
Vlan int
The VLAN ID associated to the private network.
Id This property is required. string
The id of the private network to attach.
CreatedAt string
The date and time of the creation of the private network.
IpamIpIds []string
List of IPAM IP IDs to assign to the server in the requested private network.
Status string
The private network status.
UpdatedAt string
The date and time of the last update of the private network.
Vlan int
The VLAN ID associated to the private network.
id This property is required. String
The id of the private network to attach.
createdAt String
The date and time of the creation of the private network.
ipamIpIds List<String>
List of IPAM IP IDs to assign to the server in the requested private network.
status String
The private network status.
updatedAt String
The date and time of the last update of the private network.
vlan Integer
The VLAN ID associated to the private network.
id This property is required. string
The id of the private network to attach.
createdAt string
The date and time of the creation of the private network.
ipamIpIds string[]
List of IPAM IP IDs to assign to the server in the requested private network.
status string
The private network status.
updatedAt string
The date and time of the last update of the private network.
vlan number
The VLAN ID associated to the private network.
id This property is required. str
The id of the private network to attach.
created_at str
The date and time of the creation of the private network.
ipam_ip_ids Sequence[str]
List of IPAM IP IDs to assign to the server in the requested private network.
status str
The private network status.
updated_at str
The date and time of the last update of the private network.
vlan int
The VLAN ID associated to the private network.
id This property is required. String
The id of the private network to attach.
createdAt String
The date and time of the creation of the private network.
ipamIpIds List<String>
List of IPAM IP IDs to assign to the server in the requested private network.
status String
The private network status.
updatedAt String
The date and time of the last update of the private network.
vlan Number
The VLAN ID associated to the private network.

Import

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

bash

$ pulumi import scaleway:index/baremetalServer:BaremetalServer web fr-par-2/11111111-1111-1111-1111-111111111111
Copy

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.