terraform-provider-stackitp.../docs/resources/server_volume_attach.md
Alexander Dahmen 721e10a02f
chore(examples): Add import examples for all resources (#939)
* 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>
2025-08-08 14:03:27 +02:00

40 lines
1.3 KiB
Markdown

---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_server_volume_attach Resource - stackit"
subcategory: ""
description: |-
Volume attachment resource schema. Attaches a volume to a server. Must have a region specified in the provider configuration.
---
# stackit_server_volume_attach (Resource)
Volume attachment resource schema. Attaches a volume to a server. Must have a `region` specified in the provider configuration.
## Example Usage
```terraform
resource "stackit_server_volume_attach" "attached_volume" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
server_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
volume_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
# Only use the import statement, if you want to import an existing server volume attachment
import {
to = stackit_server_volume_attach.import-example
id = "${var.project_id},${var.server_id},${var.volume_id}"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `project_id` (String) STACKIT project ID to which the volume attachment is associated.
- `server_id` (String) The server ID.
- `volume_id` (String) The volume ID.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`server_id`,`volume_id`".