| page_title | subcategory | description |
|---|---|---|
stackit_volume Resource - stackit |
Volume resource schema. Must have a region specified in the provider configuration.
-> Note: Write-Only argument key_payload_base64_wo is available to use in place of key_payload_base64. Write-Only arguments are supported in HashiCorp Terraform 1.11.0 and later. Learn more https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments. |
Volume resource schema. Must have a region specified in the provider configuration.
-> Note: Write-Only argument key_payload_base64_wo is available to use in place of key_payload_base64. Write-Only arguments are supported in HashiCorp Terraform 1.11.0 and later. Learn more.
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.region},${var.volume_id}"
}availability_zone(String) The availability zone of the volume.project_id(String) STACKIT project ID to which the volume is associated.
description(String) The description of the volume.encryption_parameters(Attributes) Parameter to connect to a key-encryption-key within the STACKIT-KMS to create encrypted volumes. These parameters never leave the backend again. So these parameters are not present on imports or in the datasource. They live only in your Terraform state after creation of the resource. (see below for nested schema)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 BlockStorageregion(String) The resource region. If not defined, the provider region is used.size(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)
encrypted(Boolean) Indicates if the volume is encrypted.id(String) Terraform's internal resource ID. It is structured as "project_id,region,volume_id".server_id(String) The server ID of the server to which the volume is attached to.volume_id(String) The volume ID.
Required:
kek_key_id(String) UUID of the key within the STACKIT-KMS to use for the encryption.kek_key_version(Number) Version of the key within the STACKIT-KMS to use for the encryption.kek_keyring_id(String) UUID of the keyring where the key is located within the STACKTI-KMS.service_account(String) Service-Account linked to the Key within the STACKIT-KMS.
Optional:
key_payload_base64(String, Sensitive) Optional predefined secret, which will be encrypted against the key-encryption-key within the STACKIT-KMS. If not defined, a random secret will be generated by the API and encrypted against the STACKIT-KMS. If a key-payload is provided here, it must be base64 encoded.key_payload_base64_wo(String, Sensitive, Write-only) Optional predefined secret, which will be encrypted against the key-encryption-key within the STACKIT-KMS. If not defined, a random secret will be generated by the API and encrypted against the STACKIT-KMS. If a key-payload is provided here, it must be base64 encoded.key_payload_base64_wo_version(Number) Used together withkey_payload_base64_woto trigger an re-create. Increment this value when an update tokey_payload_base64_wois required.
Required:
id(String) The ID of the source, e.g. image IDtype(String) The type of the source. Possible values are:volume,image,snapshot,backup.