Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Changing network on civo_instance resource should recreate instance #225

Closed
fernando-villalba opened this issue Jun 18, 2024 · 0 comments · Fixed by #226
Closed

[BUG] Changing network on civo_instance resource should recreate instance #225

fernando-villalba opened this issue Jun 18, 2024 · 0 comments · Fixed by #226
Labels
bug Something isn't working

Comments

@fernando-villalba
Copy link
Contributor

fernando-villalba commented Jun 18, 2024

Description

Currently, if you change the network id in an instance, nothing happens, it applies the change, and the next time it asks to apply the same change forever.

When you change the network on an instance, it should prompt to recreate that instance in a different network (ideally it would be nice if we could move the instance without deleting it, but this is the best we can do now)

Here is a code that can be used to reproduce the issue:

terraform {
  required_providers {
    civo = {
      source = "civo/civo"
      version = "1.0.44"

    }
  }
}

data "civo_network" "default" {
    label = "default"
    region = "LON1"
}

resource "civo_network" "test-issue" {
    label = "test-something"
}


resource "civo_instance" "foo" {
    hostname = "blaha"
    tags = ["python", "nginx"]
    notes = "He perepepppppepepe "
    size = "g3.xsmall"
    network_id = data.civo_network.default.id # start with this
    # network_id = civo_network.test-issue.id # Then change to this
    disk_image = "debian-10"
}

Screenshots

No response

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant