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

Via source downloaded image (vhdx) will not be renamed #196

Open
juliansa00 opened this issue Mar 13, 2023 · 2 comments
Open

Via source downloaded image (vhdx) will not be renamed #196

juliansa00 opened this issue Mar 13, 2023 · 2 comments
Labels

Comments

@juliansa00
Copy link

Hi there,

the problem is that a vhdx downloaded via source of the hyperv_vhd resource will not be renamed after download. This leads to an error because the getVhd function cannot find the file that is specified with the path parameter.

Terraform Version

Terraform v1.3.7

Affected Resource(s)

  • hyperv_vhd

Terraform Configuration Files

resource "hyperv_vhd" "win_test_vhdx" {
  path    = "c:\\autovms\\test.vhdx"
  source = "http://.../testgoldenimage.vhdx"
}

resource "hyperv_machine_instance" "win_test" {
  name                  = "VM-TEST"
  static_memory         = true
  path                  = "c:\\vms"
  processor_count       = 1
  memory_startup_bytes  = 1073741824

  hard_disk_drives {
    controller_location = "0"
    controller_number   = "0"
    path                = hyperv_vhd.win_test_vhdx.path
  }
}

Debug Output

https://gist.github.com/julez4321/8ad7d1363aa18ad0ec3482b5071e12dd

Expected Behavior

Downloaded image (vhdx file) should get the name specified with the path parameter after download.

Actual Behavior

Image will be downloaded but rename is missing in the CreateOrUpdateVhd function.

@dataenligne
Copy link

Would be interested in getting this issue fixed, as well.

@taliesins taliesins added the bug label Jan 15, 2024
@jeremyjbutler
Copy link

I have this issue currently on latest 1.2.1 with latest terraform

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

No branches or pull requests

4 participants