-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When adding a label to a existing stackit_server resource, terraform plan wants to replace the whole resource.
Steps to reproduce
First add a stackit_server resource like
resource "stackit_server" "my_server" {
project_id = "my-project"
name = "myserver"
boot_volume = {
source_type = "volume"
source_id = "my-volume-id"
}
availability_zone = "my favorite az"
machine_type = "c1.2"
}After that run terraform plan and terraform apply so that the resource is created. Now add the labels map to the resource like this:
resource "stackit_server" "my_server" {
project_id = "my-project"
name = "myserver"
labels = {
mylabel = "foo"
}
boot_volume = {
source_type = "volume"
source_id = "my-volume-id"
}
availability_zone = "my favorite az"
machine_type = "c1.2"
}Run terraform plan again and observe the output. In my case Terraform wants to recreate the whole server.
Actual behavior
Terraform wants to replace the server.
Expected behavior
I'd expect that the labels are just added, without a resource replacement.
Environment
- OS: Debian sid
- OpenTofu version:
v1.10.6 - Version of the STACKIT Terraform provider:
v0.69.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working