1. Packages
  2. Scaleway
  3. API Docs
  4. elasticmetal
  5. getPartitionSchema
Scaleway v1.29.0 published on Tuesday, May 27, 2025 by pulumiverse

scaleway.elasticmetal.getPartitionSchema

Explore with Pulumi AI

scaleway logo
Scaleway v1.29.0 published on Tuesday, May 27, 2025 by pulumiverse

    The scaleway.elasticmetal.getPartitionSchema data source allows you to retrieve a ready-to-use partitioning schema for a BareMetal server. This schema can be used for custom installations with optional swap and extra partitions.

    This data source simplifies the process of generating valid partitioning configurations, especially useful when dealing with OS and offer compatibility requirements.

    Partitioning Details

    The partitioning schema generated by the scaleway.elasticmetal.getPartitionSchema data source includes a root (/) partition that is 20GB in size by default.

    If additional storage is required, you can enable the extra_partition option to mount extra space on a custom path (e.g., /data).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const _default = scaleway.elasticmetal.getPartitionSchema({
        offerId: "11111111-1111-1111-1111-111111111111",
        osId: "22222222-2222-2222-2222-222222222222",
        swap: true,
        extraPartition: true,
        ext4Mountpoint: "/data",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    default = scaleway.elasticmetal.get_partition_schema(offer_id="11111111-1111-1111-1111-111111111111",
        os_id="22222222-2222-2222-2222-222222222222",
        swap=True,
        extra_partition=True,
        ext4_mountpoint="/data")
    
    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 {
    		_, err := elasticmetal.GetPartitionSchema(ctx, &elasticmetal.GetPartitionSchemaArgs{
    			OfferId:        "11111111-1111-1111-1111-111111111111",
    			OsId:           "22222222-2222-2222-2222-222222222222",
    			Swap:           pulumi.BoolRef(true),
    			ExtraPartition: pulumi.BoolRef(true),
    			Ext4Mountpoint: pulumi.StringRef("/data"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Scaleway.Elasticmetal.GetPartitionSchema.Invoke(new()
        {
            OfferId = "11111111-1111-1111-1111-111111111111",
            OsId = "22222222-2222-2222-2222-222222222222",
            Swap = true,
            ExtraPartition = true,
            Ext4Mountpoint = "/data",
        });
    
    });
    
    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.GetPartitionSchemaArgs;
    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 default = ElasticmetalFunctions.getPartitionSchema(GetPartitionSchemaArgs.builder()
                .offerId("11111111-1111-1111-1111-111111111111")
                .osId("22222222-2222-2222-2222-222222222222")
                .swap(true)
                .extraPartition(true)
                .ext4Mountpoint("/data")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          function: scaleway:elasticmetal:getPartitionSchema
          arguments:
            offerId: 11111111-1111-1111-1111-111111111111
            osId: 22222222-2222-2222-2222-222222222222
            swap: true
            extraPartition: true
            ext4Mountpoint: /data
    

    Using getPartitionSchema

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPartitionSchema(args: GetPartitionSchemaArgs, opts?: InvokeOptions): Promise<GetPartitionSchemaResult>
    function getPartitionSchemaOutput(args: GetPartitionSchemaOutputArgs, opts?: InvokeOptions): Output<GetPartitionSchemaResult>
    def get_partition_schema(ext4_mountpoint: Optional[str] = None,
                             extra_partition: Optional[bool] = None,
                             offer_id: Optional[str] = None,
                             os_id: Optional[str] = None,
                             swap: Optional[bool] = None,
                             opts: Optional[InvokeOptions] = None) -> GetPartitionSchemaResult
    def get_partition_schema_output(ext4_mountpoint: Optional[pulumi.Input[str]] = None,
                             extra_partition: Optional[pulumi.Input[bool]] = None,
                             offer_id: Optional[pulumi.Input[str]] = None,
                             os_id: Optional[pulumi.Input[str]] = None,
                             swap: Optional[pulumi.Input[bool]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetPartitionSchemaResult]
    func GetPartitionSchema(ctx *Context, args *GetPartitionSchemaArgs, opts ...InvokeOption) (*GetPartitionSchemaResult, error)
    func GetPartitionSchemaOutput(ctx *Context, args *GetPartitionSchemaOutputArgs, opts ...InvokeOption) GetPartitionSchemaResultOutput

    > Note: This function is named GetPartitionSchema in the Go SDK.

    public static class GetPartitionSchema 
    {
        public static Task<GetPartitionSchemaResult> InvokeAsync(GetPartitionSchemaArgs args, InvokeOptions? opts = null)
        public static Output<GetPartitionSchemaResult> Invoke(GetPartitionSchemaInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPartitionSchemaResult> getPartitionSchema(GetPartitionSchemaArgs args, InvokeOptions options)
    public static Output<GetPartitionSchemaResult> getPartitionSchema(GetPartitionSchemaArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scaleway:elasticmetal/getPartitionSchema:getPartitionSchema
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OfferId string
    The UUID of the BareMetal offer.
    OsId string
    The UUID of the OS image.
    Ext4Mountpoint string
    The mount point for the extra partition. Must be an absolute path using alphanumeric characters and underscores.
    ExtraPartition bool
    Whether to add an extra ext4 data partition.
    Swap bool
    Whether to include a swap partition.
    OfferId string
    The UUID of the BareMetal offer.
    OsId string
    The UUID of the OS image.
    Ext4Mountpoint string
    The mount point for the extra partition. Must be an absolute path using alphanumeric characters and underscores.
    ExtraPartition bool
    Whether to add an extra ext4 data partition.
    Swap bool
    Whether to include a swap partition.
    offerId String
    The UUID of the BareMetal offer.
    osId String
    The UUID of the OS image.
    ext4Mountpoint String
    The mount point for the extra partition. Must be an absolute path using alphanumeric characters and underscores.
    extraPartition Boolean
    Whether to add an extra ext4 data partition.
    swap Boolean
    Whether to include a swap partition.
    offerId string
    The UUID of the BareMetal offer.
    osId string
    The UUID of the OS image.
    ext4Mountpoint string
    The mount point for the extra partition. Must be an absolute path using alphanumeric characters and underscores.
    extraPartition boolean
    Whether to add an extra ext4 data partition.
    swap boolean
    Whether to include a swap partition.
    offer_id str
    The UUID of the BareMetal offer.
    os_id str
    The UUID of the OS image.
    ext4_mountpoint str
    The mount point for the extra partition. Must be an absolute path using alphanumeric characters and underscores.
    extra_partition bool
    Whether to add an extra ext4 data partition.
    swap bool
    Whether to include a swap partition.
    offerId String
    The UUID of the BareMetal offer.
    osId String
    The UUID of the OS image.
    ext4Mountpoint String
    The mount point for the extra partition. Must be an absolute path using alphanumeric characters and underscores.
    extraPartition Boolean
    Whether to add an extra ext4 data partition.
    swap Boolean
    Whether to include a swap partition.

    getPartitionSchema Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    JsonPartition string
    — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
    OfferId string
    OsId string
    Ext4Mountpoint string
    ExtraPartition bool
    Swap bool
    Id string
    The provider-assigned unique ID for this managed resource.
    JsonPartition string
    — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
    OfferId string
    OsId string
    Ext4Mountpoint string
    ExtraPartition bool
    Swap bool
    id String
    The provider-assigned unique ID for this managed resource.
    jsonPartition String
    — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
    offerId String
    osId String
    ext4Mountpoint String
    extraPartition Boolean
    swap Boolean
    id string
    The provider-assigned unique ID for this managed resource.
    jsonPartition string
    — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
    offerId string
    osId string
    ext4Mountpoint string
    extraPartition boolean
    swap boolean
    id str
    The provider-assigned unique ID for this managed resource.
    json_partition str
    — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
    offer_id str
    os_id str
    ext4_mountpoint str
    extra_partition bool
    swap bool
    id String
    The provider-assigned unique ID for this managed resource.
    jsonPartition String
    — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
    offerId String
    osId String
    ext4Mountpoint String
    extraPartition Boolean
    swap Boolean

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.29.0 published on Tuesday, May 27, 2025 by pulumiverse