terraform-provider-stackitp.../docs/data-sources/volume.md
Ruben Hönle 53a3697850
feat(iaas): support for v2 API (#1070)
relates to STACKITTPR-313
2025-12-17 15:40:46 +01:00

52 lines
2 KiB
Markdown

---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_volume Data Source - stackit"
subcategory: ""
description: |-
Volume resource schema. Must have a region specified in the provider configuration.
---
# stackit_volume (Data Source)
Volume resource schema. Must have a `region` specified in the provider configuration.
## Example Usage
```terraform
data "stackit_volume" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
volume_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `project_id` (String) STACKIT project ID to which the volume is associated.
- `volume_id` (String) The volume ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `availability_zone` (String) The availability zone of the volume.
- `description` (String) The description of the volume.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`volume_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `name` (String) The name of the volume.
- `performance_class` (String) The performance class of the volume. Possible values are documented in [Service plans BlockStorage](https://docs.stackit.cloud/products/storage/block-storage/basics/service-plans/#currently-available-service-plans-performance-classes)
- `server_id` (String) The server ID of the server to which the volume is attached to.
- `size` (Number) The size of the volume in GB. It can only be updated to a larger value than the current size
- `source` (Attributes) The source of the volume. It can be either a volume, an image, a snapshot or a backup (see [below for nested schema](#nestedatt--source))
<a id="nestedatt--source"></a>
### Nested Schema for `source`
Read-Only:
- `id` (String) The ID of the source, e.g. image ID
- `type` (String) The type of the source. Possible values are: `volume`, `image`, `snapshot`, `backup`.