Skip to content

[Bug]: Last labels not deleted from hcloud_primary_ip #1138

Open
@igorakkerman

Description

@igorakkerman

What happened?

When I remove the last label(s) from hcloud_primary_ip in the Terraform configuration, the label(s) is/are not removed from the actual resource. Terraform shows no errors. When I apply the configuration again, Terraform tries to delete the label(s) again. This only occurs when the resource would remain with no more labels.

What did you expect to happen?

The remaininig label(s) should have been deleted from the resource.

Please provide a minimal working example

Reproduction: Delete last two labels

Create a resource with two labels, a: b, x: y and apply the configuration:

resource "hcloud_primary_ip" "my_ip" {
  ...
  labels = {
    a = "b"
    x = "y"
  }
}

Remove both labels from the configuration and re-apply the configuration.

  • Verify in the UI that the labels have not been removed from the resource.
  • Verify that re-applying the same configuration shows both labels as to be deleted (again).

Reproduction: Delete remaining labels one by one

Apply the same original configuration as above.
Remove either only label a: b or only label x: y and re-apply the configuration.

  • Verify in the UI that the removed label has actually been correctly removed from the resource.
  • Verify that re-applying the same configuration shows no effect.

Remove the remaining label and re-apply the configuration.

  • Verify in the UI that the label has not been removed from the resource.
  • Verify that re-applying the same configuration shows the label as to be deleted (again).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions