larstobi / terraform-provider-multipass

Terraform provider for the Canonical Multipass virtual machine manager
MIT License
60 stars 13 forks source link

Feature Request: Operation Timeouts #23

Open pythoninthegrass opened 11 months ago

pythoninthegrass commented 11 months ago

When setting up multipass VMs, if my cloud-config is too ambitious (e.g., installs a number of packages) Terraform times out while each VM is running. They still get created, but I don't get the outputs and suspect the state might be off.

Any chance custom operation timeouts can be added? Something like this:

resource "multipass_instance" "multipass_vm" {
  count  = var.instance_count
  cloudinit_file  = var.user_data
  name   = "${var.name_prefix}-${var.name}-${count.index + 1}"
  cpus   = var.cpus
  memory = var.memory
  disk   = var.disks
  image  = var.image_name

  timeouts {
    create = "10m"
    delete = "5m"
  }
}

Appreciate your work! This is a game changer for my dev environment 🔥

larstobi commented 11 months ago

Thanks for your suggestion! Will see what I can do.

What platform are you on? MacOS? If so, do you perhaps think that your problem with hangs could actually be this: https://github.com/canonical/multipass/issues/2387

pythoninthegrass commented 11 months ago

On macOS 12.5 (maybe .6? AFK).

Unrelated. Followed the same thread. It's my understanding the provider has to support timeout overrides in the go code itself.

Can take a look at the source and try to add it myself to verify.


From: Lars Tobias Skjong-Børsting @.> Sent: Tuesday, December 12, 2023 6:37:56 AM To: larstobi/terraform-provider-multipass @.> Cc: pythoninthegrass @.>; Author @.> Subject: Re: [larstobi/terraform-provider-multipass] Feature Request: Operation Timeouts (Issue #23)

Thanks for your suggestion! Will see what I can do.

What platform are you on? MacOS? If so, do you perhaps think that your problem with hangs could actually be this: canonical/multipass#2387https://github.com/canonical/multipass/issues/2387

— Reply to this email directly, view it on GitHubhttps://github.com/larstobi/terraform-provider-multipass/issues/23#issuecomment-1851956416, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA7ILP4YIFOXN5TIPBN5B2DYJBF2JAVCNFSM6AAAAABAN42S32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRHE2TMNBRGY. You are receiving this because you authored the thread.Message ID: @.***>