* chore(examples): Add import examples for all resources Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> * Add guide: How to import resources Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> --------- Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
2.3 KiB
2.3 KiB
| page_title | subcategory | description |
|---|---|---|
| stackit_volume Resource - stackit | Volume resource schema. Must have a region specified in the provider configuration. |
stackit_volume (Resource)
Volume resource schema. Must have a region specified in the provider configuration.
Example Usage
resource "stackit_volume" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "my_volume"
availability_zone = "eu01-1"
size = 64
labels = {
"key" = "value"
}
}
# Only use the import statement, if you want to import an existing volume
import {
to = stackit_volume.import-example
id = "${var.project_id},${var.volume_id}"
}
Schema
Required
availability_zone(String) The availability zone of the volume.project_id(String) STACKIT project ID to which the volume is associated.
Optional
description(String) The description of the volume.labels(Map of String) Labels are key-value string pairs which can be attached to a resource containername(String) The name of the volume.performance_class(String) The performance class of the volume. Possible values are documented in Service plans BlockStoragesize(Number) The size of the volume in GB. It can only be updated to a larger value than the current size. Eithersizeorsourcemust be providedsource(Attributes) The source of the volume. It can be either a volume, an image, a snapshot or a backup. Eithersizeorsourcemust be provided (see below for nested schema)
Read-Only
id(String) Terraform's internal resource ID. It is structured as "project_id,volume_id".server_id(String) The server ID of the server to which the volume is attached to.volume_id(String) The volume ID.
Nested Schema for source
Required:
id(String) The ID of the source, e.g. image IDtype(String) The type of the source. Supported values are:volume,image,snapshot,backup.