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

Parameter "timeout_upload" can force replacement of files #523

Closed
kam193 opened this issue Aug 26, 2023 · 3 comments · Fixed by #528
Closed

Parameter "timeout_upload" can force replacement of files #523

kam193 opened this issue Aug 26, 2023 · 3 comments · Fixed by #528
Labels
🐛 bug Something isn't working

Comments

@kam193
Copy link

kam193 commented Aug 26, 2023

Describe the bug
After upgrading from 0.28.0 to 0.29.0, terraform wants to force replace the container and iso images I've created earlier to add the timeout_upload value. As a consequence, the already created containers also had to be re-created.

To Reproduce
Steps to reproduce the behavior:

  1. Using provider with version 0.28.0, create a proxmox_virtual_environment_file with type vztmpl or iso
  2. Update to provider 0.29.0 or newer
  3. Run 'terraform plan'
  4. See that the resource has to be changed

Example resource:

resource "proxmox_virtual_environment_file" "debian_11_ct" {
  content_type   = "vztmpl"
  datastore_id   = var.pve_datastore
  node_name      = var.pve_node

  source_file {
    path = "http://download.proxmox.com/images/system/debian-11-standard_11.6-1_amd64.tar.zst"
  }
}

Expected behavior
The upload timeout should not require force-replacement.

Workaround
After upgrading to 0.29.0, set the timeout_upload = 0 for all existing images.

Screenshots
After upgrading to 0.29 (or any newer) without workaround, a fragment from terraform plan

  # proxmox_virtual_environment_file.debian_11_ct must be replaced
-/+ resource "proxmox_virtual_environment_file" "debian_11_ct" {
      ~ file_modification_date = "2022-12-20T08:32:53Z" -> (known after apply)
      ~ file_name              = "debian-11-standard_11.6-1_amd64.tar.zst" -> (known after apply)
      ~ file_size              = 123187438 -> (known after apply)
      ~ file_tag               = "63a17335-757b0ee" -> (known after apply)
      ~ id                     = "local:vztmpl/debian-11-standard_11.6-1_amd64.tar.zst" -> (known after apply)
      + timeout_upload         = 1800 # forces replacement
        # (3 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

In addition, all dependant containers have to be replaced.

Additional context
Add any other context about the problem here.

  • Provider version (ideally it should be the latest version): 0.29 or higher (tested on 0.30.1 as well).
  • Terraform version: v1.5.6
  • OS (where you run Terraform from): Linux Mint
  • Debug logs (TF_LOG=DEBUG terraform apply): not additional info there
@bpg
Copy link
Owner

bpg commented Aug 31, 2023

Hey @kam193! 👋🏼

Thanks for the detailed report! Indeed, missed this in my testing, should be fixed in #528

@bpg
Copy link
Owner

bpg commented Aug 31, 2023

@all-contributors please add @kam193 for bug

@bpg bpg closed this as completed in #528 Aug 31, 2023
@kam193
Copy link
Author

kam193 commented Aug 31, 2023

Thanks for the fix!

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
2 participants