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

Failed to get available operating systems: VPS with name 'x' not found #74

Closed
Anthirian opened this issue Dec 18, 2023 · 5 comments · May be fixed by #75
Closed

Failed to get available operating systems: VPS with name 'x' not found #74

Anthirian opened this issue Dec 18, 2023 · 5 comments · May be fixed by #75

Comments

@Anthirian
Copy link

Since today I'm seeing errors creating a transip_vps resource using this provider. The error message is below.

module.frontend.transip_vps.frontends["description"]: Creating...
╷
│ Error: Failed to get available operating systems: VPS with name 'x' not found
│
│   with module.frontend.transip_vps.frontends["description"],
│   on frontend/frontends.tf line 1, in resource "transip_vps" "frontends":
│    1: resource "transip_vps" "frontends" {
│

The frontends.tf file looks like this:

resource "transip_vps" "frontends" {
  for_each         = var.frontend_suffixes
  description      = "${var.codename}-${each.key}"
  install_text     = file("${path.module}/user-data.yml")
  install_flavour  = "cloudinit"
  product_name     = "vps-bladevps-x4"
  operating_system = "ubuntu-20.04"
}

I suspect TransIP has modified their API slightly and this particular code seems to be erroring now.

// query with fake vps name "x"
availableOss, err := repository.GetOperatingSystems("x")
if err != nil {
return fmt.Errorf("Failed to get available operating systems: %s", err)
}

@StanvanHoorn
Copy link

We also are experiencing this issue. Tried both version 0.1.20 and 0.1.19 of the provider, so I also suspect a change in the Transip API to be the cause.

@aequitas
Copy link
Owner

aequitas commented Dec 18, 2023

I'm currently pushing a build that removes the OS check before creating a VPS, this is a stopgap measure until the proper solution made by @JoooostB can be merged: #75

The release can be found here: https://github.com/aequitas/terraform-provider-transip/releases/tag/v0.1.21

@fvanmaldegem
Copy link

fvanmaldegem commented Dec 18, 2023

The problem where the vpsName in the GET call to /v6/vps/{vpsName}/operating-systems must be an existing VPS has now been resolved in the TransIP API.

@aequitas
Copy link
Owner

@fvanmaldegem great, I'll revert the hotfix. Do I understand correctly that querying with a non-existing VPS name is a supported method, or will that change in the future?

@fvanmaldegem
Copy link

@aequitas We will keep this for backward compatibility and do not suspect to make any changes to this functionality in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants