published on Monday, Jun 15, 2026 by OVHcloud
published on Monday, Jun 15, 2026 by OVHcloud
Creates a block storage volume snapshot in a public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const snapshot = new ovh.CloudStorageBlockVolumeSnapshot("snapshot", {
serviceName: "xxxxxxxxx",
name: "my-snapshot",
description: "Snapshot before upgrade",
region: "GRA9",
volumeId: volume.id,
});
import pulumi
import pulumi_ovh as ovh
snapshot = ovh.CloudStorageBlockVolumeSnapshot("snapshot",
service_name="xxxxxxxxx",
name="my-snapshot",
description="Snapshot before upgrade",
region="GRA9",
volume_id=volume["id"])
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ovh.NewCloudStorageBlockVolumeSnapshot(ctx, "snapshot", &ovh.CloudStorageBlockVolumeSnapshotArgs{
ServiceName: pulumi.String("xxxxxxxxx"),
Name: pulumi.String("my-snapshot"),
Description: pulumi.String("Snapshot before upgrade"),
Region: pulumi.String("GRA9"),
VolumeId: pulumi.Any(volume.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 snapshot = new Ovh.CloudStorageBlockVolumeSnapshot("snapshot", new()
{
ServiceName = "xxxxxxxxx",
Name = "my-snapshot",
Description = "Snapshot before upgrade",
Region = "GRA9",
VolumeId = volume.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.ovhcloud.pulumi.ovh.CloudStorageBlockVolumeSnapshot;
import com.ovhcloud.pulumi.ovh.CloudStorageBlockVolumeSnapshotArgs;
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 snapshot = new CloudStorageBlockVolumeSnapshot("snapshot", CloudStorageBlockVolumeSnapshotArgs.builder()
.serviceName("xxxxxxxxx")
.name("my-snapshot")
.description("Snapshot before upgrade")
.region("GRA9")
.volumeId(volume.id())
.build());
}
}
resources:
snapshot:
type: ovh:CloudStorageBlockVolumeSnapshot
properties:
serviceName: xxxxxxxxx
name: my-snapshot
description: Snapshot before upgrade
region: GRA9
volumeId: ${volume.id}
Example coming soon!
Restore a volume from a snapshot
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
restored:
type: ovh:CloudStorageBlockVolume
properties:
serviceName: xxxxxxxxx
name: restored-volume
size: 10
region: GRA9
volumeType: CLASSIC
createFrom:
snapshot_id: ${snapshot.id}
Example coming soon!
Create CloudStorageBlockVolumeSnapshot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CloudStorageBlockVolumeSnapshot(name: string, args: CloudStorageBlockVolumeSnapshotArgs, opts?: CustomResourceOptions);@overload
def CloudStorageBlockVolumeSnapshot(resource_name: str,
args: CloudStorageBlockVolumeSnapshotArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CloudStorageBlockVolumeSnapshot(resource_name: str,
opts: Optional[ResourceOptions] = None,
region: Optional[str] = None,
service_name: Optional[str] = None,
volume_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None)func NewCloudStorageBlockVolumeSnapshot(ctx *Context, name string, args CloudStorageBlockVolumeSnapshotArgs, opts ...ResourceOption) (*CloudStorageBlockVolumeSnapshot, error)public CloudStorageBlockVolumeSnapshot(string name, CloudStorageBlockVolumeSnapshotArgs args, CustomResourceOptions? opts = null)
public CloudStorageBlockVolumeSnapshot(String name, CloudStorageBlockVolumeSnapshotArgs args)
public CloudStorageBlockVolumeSnapshot(String name, CloudStorageBlockVolumeSnapshotArgs args, CustomResourceOptions options)
type: ovh:CloudStorageBlockVolumeSnapshot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "ovh_cloudstorageblockvolumesnapshot" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args CloudStorageBlockVolumeSnapshotArgs
- 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 CloudStorageBlockVolumeSnapshotArgs
- 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 CloudStorageBlockVolumeSnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudStorageBlockVolumeSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CloudStorageBlockVolumeSnapshotArgs
- 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 cloudStorageBlockVolumeSnapshotResource = new Ovh.CloudStorageBlockVolumeSnapshot("cloudStorageBlockVolumeSnapshotResource", new()
{
Region = "string",
ServiceName = "string",
VolumeId = "string",
Description = "string",
Name = "string",
});
example, err := ovh.NewCloudStorageBlockVolumeSnapshot(ctx, "cloudStorageBlockVolumeSnapshotResource", &ovh.CloudStorageBlockVolumeSnapshotArgs{
Region: pulumi.String("string"),
ServiceName: pulumi.String("string"),
VolumeId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "ovh_cloudstorageblockvolumesnapshot" "cloudStorageBlockVolumeSnapshotResource" {
region = "string"
service_name = "string"
volume_id = "string"
description = "string"
name = "string"
}
var cloudStorageBlockVolumeSnapshotResource = new CloudStorageBlockVolumeSnapshot("cloudStorageBlockVolumeSnapshotResource", CloudStorageBlockVolumeSnapshotArgs.builder()
.region("string")
.serviceName("string")
.volumeId("string")
.description("string")
.name("string")
.build());
cloud_storage_block_volume_snapshot_resource = ovh.CloudStorageBlockVolumeSnapshot("cloudStorageBlockVolumeSnapshotResource",
region="string",
service_name="string",
volume_id="string",
description="string",
name="string")
const cloudStorageBlockVolumeSnapshotResource = new ovh.CloudStorageBlockVolumeSnapshot("cloudStorageBlockVolumeSnapshotResource", {
region: "string",
serviceName: "string",
volumeId: "string",
description: "string",
name: "string",
});
type: ovh:CloudStorageBlockVolumeSnapshot
properties:
description: string
name: string
region: string
serviceName: string
volumeId: string
CloudStorageBlockVolumeSnapshot 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 CloudStorageBlockVolumeSnapshot resource accepts the following input properties:
- Region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- Service
Name string - The id of the public cloud project. Changing this value recreates the resource.
- Volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- Description string
- A description for the snapshot.
- Name string
- The name of the snapshot.
- Region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- Service
Name string - The id of the public cloud project. Changing this value recreates the resource.
- Volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- Description string
- A description for the snapshot.
- Name string
- The name of the snapshot.
- region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- service_
name string - The id of the public cloud project. Changing this value recreates the resource.
- volume_
id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- description string
- A description for the snapshot.
- name string
- The name of the snapshot.
- region String
- The region where the snapshot will be created. Changing this value recreates the resource.
- service
Name String - The id of the public cloud project. Changing this value recreates the resource.
- volume
Id String - The ID of the volume to snapshot. Changing this value recreates the resource.
- description String
- A description for the snapshot.
- name String
- The name of the snapshot.
- region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- service
Name string - The id of the public cloud project. Changing this value recreates the resource.
- volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- description string
- A description for the snapshot.
- name string
- The name of the snapshot.
- region str
- The region where the snapshot will be created. Changing this value recreates the resource.
- service_
name str - The id of the public cloud project. Changing this value recreates the resource.
- volume_
id str - The ID of the volume to snapshot. Changing this value recreates the resource.
- description str
- A description for the snapshot.
- name str
- The name of the snapshot.
- region String
- The region where the snapshot will be created. Changing this value recreates the resource.
- service
Name String - The id of the public cloud project. Changing this value recreates the resource.
- volume
Id String - The ID of the volume to snapshot. Changing this value recreates the resource.
- description String
- A description for the snapshot.
- name String
- The name of the snapshot.
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudStorageBlockVolumeSnapshot resource produces the following output properties:
- Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the snapshot.
- Current
State CloudStorage Block Volume Snapshot Current State - Current state of the snapshot:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Status string - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Updated
At string - Last update date of the snapshot.
- Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the snapshot.
- Current
State CloudStorage Block Volume Snapshot Current State - Current state of the snapshot:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Status string - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Updated
At string - Last update date of the snapshot.
- checksum string
- Computed hash representing the current target specification value.
- created_
at string - Creation date of the snapshot.
- current_
state object - Current state of the snapshot:
- id string
- The provider-assigned unique ID for this managed resource.
- resource_
status string - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated_
at string - Last update date of the snapshot.
- checksum String
- Computed hash representing the current target specification value.
- created
At String - Creation date of the snapshot.
- current
State CloudStorage Block Volume Snapshot Current State - Current state of the snapshot:
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Status String - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated
At String - Last update date of the snapshot.
- checksum string
- Computed hash representing the current target specification value.
- created
At string - Creation date of the snapshot.
- current
State CloudStorage Block Volume Snapshot Current State - Current state of the snapshot:
- id string
- The provider-assigned unique ID for this managed resource.
- resource
Status string - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated
At string - Last update date of the snapshot.
- checksum str
- Computed hash representing the current target specification value.
- created_
at str - Creation date of the snapshot.
- current_
state CloudStorage Block Volume Snapshot Current State - Current state of the snapshot:
- id str
- The provider-assigned unique ID for this managed resource.
- resource_
status str - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated_
at str - Last update date of the snapshot.
- checksum String
- Computed hash representing the current target specification value.
- created
At String - Creation date of the snapshot.
- current
State Property Map - Current state of the snapshot:
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Status String - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - updated
At String - Last update date of the snapshot.
Look up Existing CloudStorageBlockVolumeSnapshot Resource
Get an existing CloudStorageBlockVolumeSnapshot 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?: CloudStorageBlockVolumeSnapshotState, opts?: CustomResourceOptions): CloudStorageBlockVolumeSnapshot@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
checksum: Optional[str] = None,
created_at: Optional[str] = None,
current_state: Optional[CloudStorageBlockVolumeSnapshotCurrentStateArgs] = None,
description: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
resource_status: Optional[str] = None,
service_name: Optional[str] = None,
updated_at: Optional[str] = None,
volume_id: Optional[str] = None) -> CloudStorageBlockVolumeSnapshotfunc GetCloudStorageBlockVolumeSnapshot(ctx *Context, name string, id IDInput, state *CloudStorageBlockVolumeSnapshotState, opts ...ResourceOption) (*CloudStorageBlockVolumeSnapshot, error)public static CloudStorageBlockVolumeSnapshot Get(string name, Input<string> id, CloudStorageBlockVolumeSnapshotState? state, CustomResourceOptions? opts = null)public static CloudStorageBlockVolumeSnapshot get(String name, Output<String> id, CloudStorageBlockVolumeSnapshotState state, CustomResourceOptions options)resources: _: type: ovh:CloudStorageBlockVolumeSnapshot get: id: ${id}import {
to = ovh_cloudstorageblockvolumesnapshot.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.
- Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the snapshot.
- Current
State CloudStorage Block Volume Snapshot Current State - Current state of the snapshot:
- Description string
- A description for the snapshot.
- Name string
- The name of the snapshot.
- Region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- Resource
Status string - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Service
Name string - The id of the public cloud project. Changing this value recreates the resource.
- Updated
At string - Last update date of the snapshot.
- Volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- Checksum string
- Computed hash representing the current target specification value.
- Created
At string - Creation date of the snapshot.
- Current
State CloudStorage Block Volume Snapshot Current State Args - Current state of the snapshot:
- Description string
- A description for the snapshot.
- Name string
- The name of the snapshot.
- Region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- Resource
Status string - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Service
Name string - The id of the public cloud project. Changing this value recreates the resource.
- Updated
At string - Last update date of the snapshot.
- Volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- checksum string
- Computed hash representing the current target specification value.
- created_
at string - Creation date of the snapshot.
- current_
state object - Current state of the snapshot:
- description string
- A description for the snapshot.
- name string
- The name of the snapshot.
- region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- resource_
status string - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service_
name string - The id of the public cloud project. Changing this value recreates the resource.
- updated_
at string - Last update date of the snapshot.
- volume_
id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- checksum String
- Computed hash representing the current target specification value.
- created
At String - Creation date of the snapshot.
- current
State CloudStorage Block Volume Snapshot Current State - Current state of the snapshot:
- description String
- A description for the snapshot.
- name String
- The name of the snapshot.
- region String
- The region where the snapshot will be created. Changing this value recreates the resource.
- resource
Status String - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service
Name String - The id of the public cloud project. Changing this value recreates the resource.
- updated
At String - Last update date of the snapshot.
- volume
Id String - The ID of the volume to snapshot. Changing this value recreates the resource.
- checksum string
- Computed hash representing the current target specification value.
- created
At string - Creation date of the snapshot.
- current
State CloudStorage Block Volume Snapshot Current State - Current state of the snapshot:
- description string
- A description for the snapshot.
- name string
- The name of the snapshot.
- region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- resource
Status string - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service
Name string - The id of the public cloud project. Changing this value recreates the resource.
- updated
At string - Last update date of the snapshot.
- volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- checksum str
- Computed hash representing the current target specification value.
- created_
at str - Creation date of the snapshot.
- current_
state CloudStorage Block Volume Snapshot Current State Args - Current state of the snapshot:
- description str
- A description for the snapshot.
- name str
- The name of the snapshot.
- region str
- The region where the snapshot will be created. Changing this value recreates the resource.
- resource_
status str - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service_
name str - The id of the public cloud project. Changing this value recreates the resource.
- updated_
at str - Last update date of the snapshot.
- volume_
id str - The ID of the volume to snapshot. Changing this value recreates the resource.
- checksum String
- Computed hash representing the current target specification value.
- created
At String - Creation date of the snapshot.
- current
State Property Map - Current state of the snapshot:
- description String
- A description for the snapshot.
- name String
- The name of the snapshot.
- region String
- The region where the snapshot will be created. Changing this value recreates the resource.
- resource
Status String - Snapshot readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service
Name String - The id of the public cloud project. Changing this value recreates the resource.
- updated
At String - Last update date of the snapshot.
- volume
Id String - The ID of the volume to snapshot. Changing this value recreates the resource.
Supporting Types
CloudStorageBlockVolumeSnapshotCurrentState, CloudStorageBlockVolumeSnapshotCurrentStateArgs
- Description string
- A description for the snapshot.
- Location
Cloud
Storage Block Volume Snapshot Current State Location - Current location:
- Name string
- The name of the snapshot.
- Size int
- Size of the snapshot in GB.
- Volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- Description string
- A description for the snapshot.
- Location
Cloud
Storage Block Volume Snapshot Current State Location - Current location:
- Name string
- The name of the snapshot.
- Size int
- Size of the snapshot in GB.
- Volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- description String
- A description for the snapshot.
- location
Cloud
Storage Block Volume Snapshot Current State Location - Current location:
- name String
- The name of the snapshot.
- size Integer
- Size of the snapshot in GB.
- volume
Id String - The ID of the volume to snapshot. Changing this value recreates the resource.
- description string
- A description for the snapshot.
- location
Cloud
Storage Block Volume Snapshot Current State Location - Current location:
- name string
- The name of the snapshot.
- size number
- Size of the snapshot in GB.
- volume
Id string - The ID of the volume to snapshot. Changing this value recreates the resource.
- description str
- A description for the snapshot.
- location
Cloud
Storage Block Volume Snapshot Current State Location - Current location:
- name str
- The name of the snapshot.
- size int
- Size of the snapshot in GB.
- volume_
id str - The ID of the volume to snapshot. Changing this value recreates the resource.
- description String
- A description for the snapshot.
- location Property Map
- Current location:
- name String
- The name of the snapshot.
- size Number
- Size of the snapshot in GB.
- volume
Id String - The ID of the volume to snapshot. Changing this value recreates the resource.
CloudStorageBlockVolumeSnapshotCurrentStateLocation, CloudStorageBlockVolumeSnapshotCurrentStateLocationArgs
- Region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- Region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- region String
- The region where the snapshot will be created. Changing this value recreates the resource.
- region string
- The region where the snapshot will be created. Changing this value recreates the resource.
- region str
- The region where the snapshot will be created. Changing this value recreates the resource.
- region String
- The region where the snapshot will be created. Changing this value recreates the resource.
Import
A block storage volume snapshot can be imported using the service_name and id separated by a /:
bash
$ pulumi import ovh:index/cloudStorageBlockVolumeSnapshot:CloudStorageBlockVolumeSnapshot snapshot service_name/snapshot_id
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
ovhTerraform Provider.
published on Monday, Jun 15, 2026 by OVHcloud