Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

[BUG] Creating a Server can't use snapshots by UUID #84

Open
jbuchhammer opened this issue Nov 12, 2020 · 0 comments
Open

[BUG] Creating a Server can't use snapshots by UUID #84

jbuchhammer opened this issue Nov 12, 2020 · 0 comments

Comments

@jbuchhammer
Copy link

Terraform Version

Terraform v0.13.3

  • provider registry.terraform.io/terraform-providers/profitbricks v1.5.7

Affected Resource(s)

profitbricks_server

Terraform Configuration Files

resource "profitbricks_server" "web" {
  name              = "Web Server"
  datacenter_id     = profitbricks_datacenter.acmeo_tenant.id
  cores             = var.web_cpus
  ram               = var.web_ram
  cpu_family        = "INTEL_XEON"
  availability_zone = "AUTO"

  volume {
    name           = "Web Server boot"
    size           = 8
    disk_type      = "HDD"
    availability_zone = "AUTO"
  }
  image_name     = <Snapshot-UUID> 
  nic {
    lan             = profitbricks_lan.tenant_lan.id
    dhcp            = true
  }
}

Expected Behavior

A snaphot's UUID can be provided for the property image_name to set up a server.

Actual Behavior

terraform apply exits with an error (line 419 ff):

return fmt.Errorf("Error fetching image %s: (%s) - %+v", image_name, err, rsp)

Steps to Reproduce

  1. terraform apply

Important Factoids

This is simply due to the fact that the code exits if an image is not found for the specified UUID. It does not continue to the next steps (check HTTP 404 and look for a snapshot).
Using a snapshot by name works instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant