civo / terraform-provider-civo

Terraform Civo provider
https://www.civo.com
Mozilla Public License 2.0
71 stars 56 forks source link

[BUG] Changing hostname in civo_instance replaces instead of updating #220

Closed fernando-villalba closed 3 months ago

fernando-villalba commented 3 months ago

Description

Issue

Changing the hostname and doing an apply replaces the entire instance instead of just updating the name.

You can use this code to test it

data "civo_disk_image" "debian" {
   filter {
        key = "name"
        values = ["debian-10"]
   }
}

resource "civo_instance" "foo" {
    hostname = "bleh" # create and then change this to something else
    tags = ["python", "nginx"]
    notes = "this is a note for the server"
    size = "g3.xsmall"
    disk_image = data.civo_disk_image.debian.diskimages[0].id
}

Acceptance Criteria

The CLI and the UI allow you to change the name already.

Screenshots

No response

Additional information

No response