1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. CloudProject
  6. Volume
Viewing docs for OVHCloud v2.15.0
published on Monday, Jun 29, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.15.0
published on Monday, Jun 29, 2026 by OVHcloud

    NOTE Prefer using the new ovh.CloudStorageBlockVolume resource instead.

    Create volume in a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const volume = new ovh.cloudproject.Volume("volume", {
        regionName: "xxx",
        serviceName: "yyyyy",
        description: "Terraform volume",
        name: "terrformName",
        size: 15,
        type: "classic",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    volume = ovh.cloudproject.Volume("volume",
        region_name="xxx",
        service_name="yyyyy",
        description="Terraform volume",
        name="terrformName",
        size=15,
        type="classic")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudproject.NewVolume(ctx, "volume", &cloudproject.VolumeArgs{
    			RegionName:  pulumi.String("xxx"),
    			ServiceName: pulumi.String("yyyyy"),
    			Description: pulumi.String("Terraform volume"),
    			Name:        pulumi.String("terrformName"),
    			Size:        pulumi.Float64(15),
    			Type:        pulumi.String("classic"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var volume = new Ovh.CloudProject.Volume("volume", new()
        {
            RegionName = "xxx",
            ServiceName = "yyyyy",
            Description = "Terraform volume",
            Name = "terrformName",
            Size = 15,
            Type = "classic",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.CloudProject.Volume;
    import com.ovhcloud.pulumi.ovh.CloudProject.VolumeArgs;
    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 volume = new Volume("volume", VolumeArgs.builder()
                .regionName("xxx")
                .serviceName("yyyyy")
                .description("Terraform volume")
                .name("terrformName")
                .size(15.0)
                .type("classic")
                .build());
    
        }
    }
    
    resources:
      volume:
        type: ovh:CloudProject:Volume
        properties:
          regionName: xxx
          serviceName: yyyyy
          description: Terraform volume
          name: terrformName
          size: 15
          type: classic
    
    Example coming soon!
    

    Encrypted volume with a customer managed key (CMK)

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const encryptedVolume = new ovh.cloudproject.Volume("encrypted_volume", {
        regionName: "xxx",
        serviceName: "yyyyy",
        description: "Terraform encrypted volume",
        name: "encryptedVolume",
        size: 15,
        type: "classic",
        encryption: {
            encrypted: true,
            kms: {
                domainId: "<okms domain id>",
                serviceKeyId: "<okms service key id>",
            },
        },
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    encrypted_volume = ovh.cloudproject.Volume("encrypted_volume",
        region_name="xxx",
        service_name="yyyyy",
        description="Terraform encrypted volume",
        name="encryptedVolume",
        size=15,
        type="classic",
        encryption={
            "encrypted": True,
            "kms": {
                "domain_id": "<okms domain id>",
                "service_key_id": "<okms service key id>",
            },
        })
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudproject.NewVolume(ctx, "encrypted_volume", &cloudproject.VolumeArgs{
    			RegionName:  pulumi.String("xxx"),
    			ServiceName: pulumi.String("yyyyy"),
    			Description: pulumi.String("Terraform encrypted volume"),
    			Name:        pulumi.String("encryptedVolume"),
    			Size:        pulumi.Float64(15),
    			Type:        pulumi.String("classic"),
    			Encryption: &cloudproject.VolumeEncryptionArgs{
    				Encrypted: pulumi.Bool(true),
    				Kms: &cloudproject.VolumeEncryptionKmsArgs{
    					DomainId:     pulumi.String("<okms domain id>"),
    					ServiceKeyId: pulumi.String("<okms service key id>"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var encryptedVolume = new Ovh.CloudProject.Volume("encrypted_volume", new()
        {
            RegionName = "xxx",
            ServiceName = "yyyyy",
            Description = "Terraform encrypted volume",
            Name = "encryptedVolume",
            Size = 15,
            Type = "classic",
            Encryption = new Ovh.CloudProject.Inputs.VolumeEncryptionArgs
            {
                Encrypted = true,
                Kms = new Ovh.CloudProject.Inputs.VolumeEncryptionKmsArgs
                {
                    DomainId = "<okms domain id>",
                    ServiceKeyId = "<okms service key id>",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.CloudProject.Volume;
    import com.ovhcloud.pulumi.ovh.CloudProject.VolumeArgs;
    import com.pulumi.ovh.CloudProject.inputs.VolumeEncryptionArgs;
    import com.pulumi.ovh.CloudProject.inputs.VolumeEncryptionKmsArgs;
    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 encryptedVolume = new Volume("encryptedVolume", VolumeArgs.builder()
                .regionName("xxx")
                .serviceName("yyyyy")
                .description("Terraform encrypted volume")
                .name("encryptedVolume")
                .size(15.0)
                .type("classic")
                .encryption(VolumeEncryptionArgs.builder()
                    .encrypted(true)
                    .kms(VolumeEncryptionKmsArgs.builder()
                        .domainId("<okms domain id>")
                        .serviceKeyId("<okms service key id>")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      encryptedVolume:
        type: ovh:CloudProject:Volume
        name: encrypted_volume
        properties:
          regionName: xxx
          serviceName: yyyyy
          description: Terraform encrypted volume
          name: encryptedVolume
          size: 15
          type: classic
          encryption:
            encrypted: true
            kms:
              domainId: <okms domain id>
              serviceKeyId: <okms service key id>
    
    Example coming soon!
    

    Omit the kms block to encrypt the volume with OVH managed keys (OMK):

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const encryptedVolume = new ovh.cloudproject.Volume("encrypted_volume", {
        regionName: "xxx",
        serviceName: "yyyyy",
        name: "encryptedVolume",
        size: 15,
        type: "classic",
        encryption: {
            encrypted: true,
        },
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    encrypted_volume = ovh.cloudproject.Volume("encrypted_volume",
        region_name="xxx",
        service_name="yyyyy",
        name="encryptedVolume",
        size=15,
        type="classic",
        encryption={
            "encrypted": True,
        })
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudproject.NewVolume(ctx, "encrypted_volume", &cloudproject.VolumeArgs{
    			RegionName:  pulumi.String("xxx"),
    			ServiceName: pulumi.String("yyyyy"),
    			Name:        pulumi.String("encryptedVolume"),
    			Size:        pulumi.Float64(15),
    			Type:        pulumi.String("classic"),
    			Encryption: &cloudproject.VolumeEncryptionArgs{
    				Encrypted: pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var encryptedVolume = new Ovh.CloudProject.Volume("encrypted_volume", new()
        {
            RegionName = "xxx",
            ServiceName = "yyyyy",
            Name = "encryptedVolume",
            Size = 15,
            Type = "classic",
            Encryption = new Ovh.CloudProject.Inputs.VolumeEncryptionArgs
            {
                Encrypted = true,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.CloudProject.Volume;
    import com.ovhcloud.pulumi.ovh.CloudProject.VolumeArgs;
    import com.pulumi.ovh.CloudProject.inputs.VolumeEncryptionArgs;
    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 encryptedVolume = new Volume("encryptedVolume", VolumeArgs.builder()
                .regionName("xxx")
                .serviceName("yyyyy")
                .name("encryptedVolume")
                .size(15.0)
                .type("classic")
                .encryption(VolumeEncryptionArgs.builder()
                    .encrypted(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      encryptedVolume:
        type: ovh:CloudProject:Volume
        name: encrypted_volume
        properties:
          regionName: xxx
          serviceName: yyyyy
          name: encryptedVolume
          size: 15
          type: classic
          encryption:
            encrypted: true
    
    Example coming soon!
    

    Create Volume Resource

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

    Constructor syntax

    new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
    @overload
    def Volume(resource_name: str,
               args: VolumeArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Volume(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               region_name: Optional[str] = None,
               availability_zone: Optional[str] = None,
               description: Optional[str] = None,
               encryption: Optional[VolumeEncryptionArgs] = None,
               image_id: Optional[str] = None,
               instance_id: Optional[str] = None,
               name: Optional[str] = None,
               service_name: Optional[str] = None,
               size: Optional[float] = None,
               snapshot_id: Optional[str] = None,
               type: Optional[str] = None,
               volume_id: Optional[str] = None)
    func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
    public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
    public Volume(String name, VolumeArgs args)
    public Volume(String name, VolumeArgs args, CustomResourceOptions options)
    
    type: ovh:CloudProject:Volume
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ovh_cloudproject_volume" "name" {
        # resource properties
    }

    Parameters

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

    Constructor example

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

    var volumeResource = new Ovh.CloudProject.Volume("volumeResource", new()
    {
        RegionName = "string",
        AvailabilityZone = "string",
        Description = "string",
        Encryption = new Ovh.CloudProject.Inputs.VolumeEncryptionArgs
        {
            Encrypted = false,
            Kms = new Ovh.CloudProject.Inputs.VolumeEncryptionKmsArgs
            {
                DomainId = "string",
                ServiceKeyId = "string",
            },
        },
        ImageId = "string",
        InstanceId = "string",
        Name = "string",
        ServiceName = "string",
        Size = 0,
        SnapshotId = "string",
        Type = "string",
        VolumeId = "string",
    });
    
    example, err := cloudproject.NewVolume(ctx, "volumeResource", &cloudproject.VolumeArgs{
    	RegionName:       pulumi.String("string"),
    	AvailabilityZone: pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	Encryption: &cloudproject.VolumeEncryptionArgs{
    		Encrypted: pulumi.Bool(false),
    		Kms: &cloudproject.VolumeEncryptionKmsArgs{
    			DomainId:     pulumi.String("string"),
    			ServiceKeyId: pulumi.String("string"),
    		},
    	},
    	ImageId:     pulumi.String("string"),
    	InstanceId:  pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Size:        pulumi.Float64(0),
    	SnapshotId:  pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	VolumeId:    pulumi.String("string"),
    })
    
    resource "ovh_cloudproject_volume" "volumeResource" {
      region_name       = "string"
      availability_zone = "string"
      description       = "string"
      encryption = {
        encrypted = false
        kms = {
          domain_id      = "string"
          service_key_id = "string"
        }
      }
      image_id     = "string"
      instance_id  = "string"
      name         = "string"
      service_name = "string"
      size         = 0
      snapshot_id  = "string"
      type         = "string"
      volume_id    = "string"
    }
    
    var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
        .regionName("string")
        .availabilityZone("string")
        .description("string")
        .encryption(VolumeEncryptionArgs.builder()
            .encrypted(false)
            .kms(VolumeEncryptionKmsArgs.builder()
                .domainId("string")
                .serviceKeyId("string")
                .build())
            .build())
        .imageId("string")
        .instanceId("string")
        .name("string")
        .serviceName("string")
        .size(0.0)
        .snapshotId("string")
        .type("string")
        .volumeId("string")
        .build());
    
    volume_resource = ovh.cloudproject.Volume("volumeResource",
        region_name="string",
        availability_zone="string",
        description="string",
        encryption={
            "encrypted": False,
            "kms": {
                "domain_id": "string",
                "service_key_id": "string",
            },
        },
        image_id="string",
        instance_id="string",
        name="string",
        service_name="string",
        size=float(0),
        snapshot_id="string",
        type="string",
        volume_id="string")
    
    const volumeResource = new ovh.cloudproject.Volume("volumeResource", {
        regionName: "string",
        availabilityZone: "string",
        description: "string",
        encryption: {
            encrypted: false,
            kms: {
                domainId: "string",
                serviceKeyId: "string",
            },
        },
        imageId: "string",
        instanceId: "string",
        name: "string",
        serviceName: "string",
        size: 0,
        snapshotId: "string",
        type: "string",
        volumeId: "string",
    });
    
    type: ovh:CloudProject:Volume
    properties:
        availabilityZone: string
        description: string
        encryption:
            encrypted: false
            kms:
                domainId: string
                serviceKeyId: string
        imageId: string
        instanceId: string
        name: string
        regionName: string
        serviceName: string
        size: 0
        snapshotId: string
        type: string
        volumeId: string
    

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

    RegionName string
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    AvailabilityZone string
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    Description string
    A description of the volume
    Encryption VolumeEncryption
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    ImageId string
    Image ID
    InstanceId string
    Instance ID
    Name string
    Name of the volume
    ServiceName string
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    Size double
    Size (GB) of the volume
    SnapshotId string
    Snapshot ID
    Type string
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    VolumeId string
    Volume ID
    RegionName string
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    AvailabilityZone string
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    Description string
    A description of the volume
    Encryption VolumeEncryptionArgs
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    ImageId string
    Image ID
    InstanceId string
    Instance ID
    Name string
    Name of the volume
    ServiceName string
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    Size float64
    Size (GB) of the volume
    SnapshotId string
    Snapshot ID
    Type string
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    VolumeId string
    Volume ID
    region_name string
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    availability_zone string
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    description string
    A description of the volume
    encryption object
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    image_id string
    Image ID
    instance_id string
    Instance ID
    name string
    Name of the volume
    service_name string
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size number
    Size (GB) of the volume
    snapshot_id string
    Snapshot ID
    type string
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volume_id string
    Volume ID
    regionName String
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    availabilityZone String
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    description String
    A description of the volume
    encryption VolumeEncryption
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    imageId String
    Image ID
    instanceId String
    Instance ID
    name String
    Name of the volume
    serviceName String
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size Double
    Size (GB) of the volume
    snapshotId String
    Snapshot ID
    type String
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volumeId String
    Volume ID
    regionName string
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    availabilityZone string
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    description string
    A description of the volume
    encryption VolumeEncryption
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    imageId string
    Image ID
    instanceId string
    Instance ID
    name string
    Name of the volume
    serviceName string
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size number
    Size (GB) of the volume
    snapshotId string
    Snapshot ID
    type string
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volumeId string
    Volume ID
    region_name str
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    availability_zone str
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    description str
    A description of the volume
    encryption VolumeEncryptionArgs
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    image_id str
    Image ID
    instance_id str
    Instance ID
    name str
    Name of the volume
    service_name str
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size float
    Size (GB) of the volume
    snapshot_id str
    Snapshot ID
    type str
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volume_id str
    Volume ID
    regionName String
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    availabilityZone String
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    description String
    A description of the volume
    encryption Property Map
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    imageId String
    Image ID
    instanceId String
    Instance ID
    name String
    Name of the volume
    serviceName String
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size Number
    Size (GB) of the volume
    snapshotId String
    Snapshot ID
    type String
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volumeId String
    Volume ID

    Outputs

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

    Action string
    The action of the operation
    CompletedAt string
    The completed date of the operation
    CreatedAt string
    The creation date of the operation
    Id string
    The provider-assigned unique ID for this managed resource.
    Progress double
    Volume status
    Regions List<string>
    List of regions
    ResourceId string
    Id of the resource
    StartedAt string
    Datetime of the operation creation
    Status string
    Volume status
    SubOperations List<VolumeSubOperation>
    Sub-operations of the operation
    Action string
    The action of the operation
    CompletedAt string
    The completed date of the operation
    CreatedAt string
    The creation date of the operation
    Id string
    The provider-assigned unique ID for this managed resource.
    Progress float64
    Volume status
    Regions []string
    List of regions
    ResourceId string
    Id of the resource
    StartedAt string
    Datetime of the operation creation
    Status string
    Volume status
    SubOperations []VolumeSubOperation
    Sub-operations of the operation
    action string
    The action of the operation
    completed_at string
    The completed date of the operation
    created_at string
    The creation date of the operation
    id string
    The provider-assigned unique ID for this managed resource.
    progress number
    Volume status
    regions list(string)
    List of regions
    resource_id string
    Id of the resource
    started_at string
    Datetime of the operation creation
    status string
    Volume status
    sub_operations list(object)
    Sub-operations of the operation
    action String
    The action of the operation
    completedAt String
    The completed date of the operation
    createdAt String
    The creation date of the operation
    id String
    The provider-assigned unique ID for this managed resource.
    progress Double
    Volume status
    regions List<String>
    List of regions
    resourceId String
    Id of the resource
    startedAt String
    Datetime of the operation creation
    status String
    Volume status
    subOperations List<VolumeSubOperation>
    Sub-operations of the operation
    action string
    The action of the operation
    completedAt string
    The completed date of the operation
    createdAt string
    The creation date of the operation
    id string
    The provider-assigned unique ID for this managed resource.
    progress number
    Volume status
    regions string[]
    List of regions
    resourceId string
    Id of the resource
    startedAt string
    Datetime of the operation creation
    status string
    Volume status
    subOperations VolumeSubOperation[]
    Sub-operations of the operation
    action str
    The action of the operation
    completed_at str
    The completed date of the operation
    created_at str
    The creation date of the operation
    id str
    The provider-assigned unique ID for this managed resource.
    progress float
    Volume status
    regions Sequence[str]
    List of regions
    resource_id str
    Id of the resource
    started_at str
    Datetime of the operation creation
    status str
    Volume status
    sub_operations Sequence[VolumeSubOperation]
    Sub-operations of the operation
    action String
    The action of the operation
    completedAt String
    The completed date of the operation
    createdAt String
    The creation date of the operation
    id String
    The provider-assigned unique ID for this managed resource.
    progress Number
    Volume status
    regions List<String>
    List of regions
    resourceId String
    Id of the resource
    startedAt String
    Datetime of the operation creation
    status String
    Volume status
    subOperations List<Property Map>
    Sub-operations of the operation

    Look up Existing Volume Resource

    Get an existing Volume 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?: VolumeState, opts?: CustomResourceOptions): Volume
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            availability_zone: Optional[str] = None,
            completed_at: Optional[str] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            encryption: Optional[VolumeEncryptionArgs] = None,
            image_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            name: Optional[str] = None,
            progress: Optional[float] = None,
            region_name: Optional[str] = None,
            regions: Optional[Sequence[str]] = None,
            resource_id: Optional[str] = None,
            service_name: Optional[str] = None,
            size: Optional[float] = None,
            snapshot_id: Optional[str] = None,
            started_at: Optional[str] = None,
            status: Optional[str] = None,
            sub_operations: Optional[Sequence[VolumeSubOperationArgs]] = None,
            type: Optional[str] = None,
            volume_id: Optional[str] = None) -> Volume
    func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
    public static Volume Get(string name, Input<string> id, VolumeState? state, CustomResourceOptions? opts = null)
    public static Volume get(String name, Output<String> id, VolumeState state, CustomResourceOptions options)
    resources:  _:    type: ovh:CloudProject:Volume    get:      id: ${id}
    import {
      to = ovh_cloudproject_volume.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Action string
    The action of the operation
    AvailabilityZone string
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    CompletedAt string
    The completed date of the operation
    CreatedAt string
    The creation date of the operation
    Description string
    A description of the volume
    Encryption VolumeEncryption
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    ImageId string
    Image ID
    InstanceId string
    Instance ID
    Name string
    Name of the volume
    Progress double
    Volume status
    RegionName string
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    Regions List<string>
    List of regions
    ResourceId string
    Id of the resource
    ServiceName string
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    Size double
    Size (GB) of the volume
    SnapshotId string
    Snapshot ID
    StartedAt string
    Datetime of the operation creation
    Status string
    Volume status
    SubOperations List<VolumeSubOperation>
    Sub-operations of the operation
    Type string
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    VolumeId string
    Volume ID
    Action string
    The action of the operation
    AvailabilityZone string
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    CompletedAt string
    The completed date of the operation
    CreatedAt string
    The creation date of the operation
    Description string
    A description of the volume
    Encryption VolumeEncryptionArgs
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    ImageId string
    Image ID
    InstanceId string
    Instance ID
    Name string
    Name of the volume
    Progress float64
    Volume status
    RegionName string
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    Regions []string
    List of regions
    ResourceId string
    Id of the resource
    ServiceName string
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    Size float64
    Size (GB) of the volume
    SnapshotId string
    Snapshot ID
    StartedAt string
    Datetime of the operation creation
    Status string
    Volume status
    SubOperations []VolumeSubOperationArgs
    Sub-operations of the operation
    Type string
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    VolumeId string
    Volume ID
    action string
    The action of the operation
    availability_zone string
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    completed_at string
    The completed date of the operation
    created_at string
    The creation date of the operation
    description string
    A description of the volume
    encryption object
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    image_id string
    Image ID
    instance_id string
    Instance ID
    name string
    Name of the volume
    progress number
    Volume status
    region_name string
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    regions list(string)
    List of regions
    resource_id string
    Id of the resource
    service_name string
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size number
    Size (GB) of the volume
    snapshot_id string
    Snapshot ID
    started_at string
    Datetime of the operation creation
    status string
    Volume status
    sub_operations list(object)
    Sub-operations of the operation
    type string
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volume_id string
    Volume ID
    action String
    The action of the operation
    availabilityZone String
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    completedAt String
    The completed date of the operation
    createdAt String
    The creation date of the operation
    description String
    A description of the volume
    encryption VolumeEncryption
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    imageId String
    Image ID
    instanceId String
    Instance ID
    name String
    Name of the volume
    progress Double
    Volume status
    regionName String
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    regions List<String>
    List of regions
    resourceId String
    Id of the resource
    serviceName String
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size Double
    Size (GB) of the volume
    snapshotId String
    Snapshot ID
    startedAt String
    Datetime of the operation creation
    status String
    Volume status
    subOperations List<VolumeSubOperation>
    Sub-operations of the operation
    type String
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volumeId String
    Volume ID
    action string
    The action of the operation
    availabilityZone string
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    completedAt string
    The completed date of the operation
    createdAt string
    The creation date of the operation
    description string
    A description of the volume
    encryption VolumeEncryption
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    imageId string
    Image ID
    instanceId string
    Instance ID
    name string
    Name of the volume
    progress number
    Volume status
    regionName string
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    regions string[]
    List of regions
    resourceId string
    Id of the resource
    serviceName string
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size number
    Size (GB) of the volume
    snapshotId string
    Snapshot ID
    startedAt string
    Datetime of the operation creation
    status string
    Volume status
    subOperations VolumeSubOperation[]
    Sub-operations of the operation
    type string
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volumeId string
    Volume ID
    action str
    The action of the operation
    availability_zone str
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    completed_at str
    The completed date of the operation
    created_at str
    The creation date of the operation
    description str
    A description of the volume
    encryption VolumeEncryptionArgs
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    image_id str
    Image ID
    instance_id str
    Instance ID
    name str
    Name of the volume
    progress float
    Volume status
    region_name str
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    regions Sequence[str]
    List of regions
    resource_id str
    Id of the resource
    service_name str
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size float
    Size (GB) of the volume
    snapshot_id str
    Snapshot ID
    started_at str
    Datetime of the operation creation
    status str
    Volume status
    sub_operations Sequence[VolumeSubOperationArgs]
    Sub-operations of the operation
    type str
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volume_id str
    Volume ID
    action String
    The action of the operation
    availabilityZone String
    Optional. Availability zone in which the volume is created. Required when region_name is a 3AZ region. Changing this value recreates the resource.
    completedAt String
    The completed date of the operation
    createdAt String
    The creation date of the operation
    description String
    A description of the volume
    encryption Property Map
    Optional. Volume encryption configuration. Customer managed keys (CMK) are only available in supported regions (3AZ). Changing this value recreates the resource.
    imageId String
    Image ID
    instanceId String
    Instance ID
    name String
    Name of the volume
    progress Number
    Volume status
    regionName String
    Required. A valid OVHcloud public cloud region name in which the volume will be available. Ex.: "GRA11". Changing this value recreates the resource.
    regions List<String>
    List of regions
    resourceId String
    Id of the resource
    serviceName String
    Optional. The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    size Number
    Size (GB) of the volume
    snapshotId String
    Snapshot ID
    startedAt String
    Datetime of the operation creation
    status String
    Volume status
    subOperations List<Property Map>
    Sub-operations of the operation
    type String
    Type of the volume Changing this value recreates the resource. Available types are: classic, classic-luks, classic-multiattach, high-speed, high-speed-luks, high-speed-gen2, high-speed-gen2-luks
    volumeId String
    Volume ID

    Supporting Types

    VolumeEncryption, VolumeEncryptionArgs

    Encrypted bool
    Whether the volume is encrypted. Setting this auto-derives a LUKS volume type.
    Kms VolumeEncryptionKms
    Optional. Customer managed key (CMK) reference. Omit to use OVH managed keys (OMK).
    Encrypted bool
    Whether the volume is encrypted. Setting this auto-derives a LUKS volume type.
    Kms VolumeEncryptionKms
    Optional. Customer managed key (CMK) reference. Omit to use OVH managed keys (OMK).
    encrypted bool
    Whether the volume is encrypted. Setting this auto-derives a LUKS volume type.
    kms object
    Optional. Customer managed key (CMK) reference. Omit to use OVH managed keys (OMK).
    encrypted Boolean
    Whether the volume is encrypted. Setting this auto-derives a LUKS volume type.
    kms VolumeEncryptionKms
    Optional. Customer managed key (CMK) reference. Omit to use OVH managed keys (OMK).
    encrypted boolean
    Whether the volume is encrypted. Setting this auto-derives a LUKS volume type.
    kms VolumeEncryptionKms
    Optional. Customer managed key (CMK) reference. Omit to use OVH managed keys (OMK).
    encrypted bool
    Whether the volume is encrypted. Setting this auto-derives a LUKS volume type.
    kms VolumeEncryptionKms
    Optional. Customer managed key (CMK) reference. Omit to use OVH managed keys (OMK).
    encrypted Boolean
    Whether the volume is encrypted. Setting this auto-derives a LUKS volume type.
    kms Property Map
    Optional. Customer managed key (CMK) reference. Omit to use OVH managed keys (OMK).

    VolumeEncryptionKms, VolumeEncryptionKmsArgs

    DomainId string
    OKMS domain ID holding the customer managed key.
    ServiceKeyId string
    OKMS service key ID used to encrypt the volume.
    DomainId string
    OKMS domain ID holding the customer managed key.
    ServiceKeyId string
    OKMS service key ID used to encrypt the volume.
    domain_id string
    OKMS domain ID holding the customer managed key.
    service_key_id string
    OKMS service key ID used to encrypt the volume.
    domainId String
    OKMS domain ID holding the customer managed key.
    serviceKeyId String
    OKMS service key ID used to encrypt the volume.
    domainId string
    OKMS domain ID holding the customer managed key.
    serviceKeyId string
    OKMS service key ID used to encrypt the volume.
    domain_id str
    OKMS domain ID holding the customer managed key.
    service_key_id str
    OKMS service key ID used to encrypt the volume.
    domainId String
    OKMS domain ID holding the customer managed key.
    serviceKeyId String
    OKMS service key ID used to encrypt the volume.

    VolumeSubOperation, VolumeSubOperationArgs

    ResourceId string
    Affected resource of the sub-operation
    ResourceType string
    The started date of the sub-operation
    ResourceId string
    Affected resource of the sub-operation
    ResourceType string
    The started date of the sub-operation
    resource_id string
    Affected resource of the sub-operation
    resource_type string
    The started date of the sub-operation
    resourceId String
    Affected resource of the sub-operation
    resourceType String
    The started date of the sub-operation
    resourceId string
    Affected resource of the sub-operation
    resourceType string
    The started date of the sub-operation
    resource_id str
    Affected resource of the sub-operation
    resource_type str
    The started date of the sub-operation
    resourceId String
    Affected resource of the sub-operation
    resourceType String
    The started date of the sub-operation

    Import

    The resource can be imported using the public cloud project ID, region and the volume ID, e.g.,

    terraform

    import {

    to = ovh_cloud_project_volume.volume

    id = “//

    }

    bash

    $ pulumi preview -generate-config-out=volume.tf

    $ pulumi up

    The file volume.tf will then contain the imported resource’s configuration, that can be copied next to the import block above. See https://developer.hashicorp.com/terraform/language/import/generating-configuration for more details.

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

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.15.0
    published on Monday, Jun 29, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial