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

"cloudconnexa_connector" resource doesn't have Update method defined #12

Closed
sahaqaa opened this issue Jul 3, 2024 · 4 comments
Closed
Assignees

Comments

@sahaqaa
Copy link
Contributor

sahaqaa commented Jul 3, 2024

Related to: OpenVPN/cloudconnexa-go-client#15

this would be required to update connectors without destroying them

Also was mentioned here: #11 (comment)

@sahaqaa
Copy link
Contributor Author

sahaqaa commented Jul 3, 2024

Code to reproduce this:

resource "cloudconnexa_network" "foo" {
  description     = "Testing"
  egress          = true
  internet_access = "LOCAL"
  name            = "foo"

  default_connector {
    name          = "foo"
    vpn_region_id = "eu-central-1"
  }

  default_route {
    subnet = "192.168.1.0/24"
    type   = "IP_V4"
  }
}

resource "cloudconnexa_connector" "this" {
  name              = "qwerty"
  description       = "1234"
  vpn_region_id     = "eu-central-1"
  network_item_type = "NETWORK"
  network_item_id   = cloudconnexa_network.foo.id
}

Then when we change:

resource "cloudconnexa_connector" "this" {
  name              = "qwerty"
  description       = "ThisIsOurChange"
  vpn_region_id     = "eu-central-1"
  network_item_type = "NETWORK"
  network_item_id   = cloudconnexa_network.foo.id
}

"terraform plan" wants to remove it:

Plan: 1 to add, 0 to change, 1 to destroy.

@sahaqaa
Copy link
Contributor Author

sahaqaa commented Jul 3, 2024

Also it effects "cloudconnexa_network" in a way that when we add for already existing "default_connector" description field:

  default_connector {
    description      = "ThisIsOurChange"
    name               = "foo"
    vpn_region_id = "eu-central-1"
  }

Terraform applies change, state is updated, but in UI "description" filed is not changed. This is because func resourceNetworkUpdate calls "c.Connectors.Create".

@sahaqaa
Copy link
Contributor Author

sahaqaa commented Jul 4, 2024

Related report: OpenVPN/cloudconnexa-go-client#14 (comment)

@sahaqaa
Copy link
Contributor Author

sahaqaa commented Jul 26, 2024

This was completed via #19

@sahaqaa sahaqaa closed this as completed Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants