elct9620 / terraform-provider-lambdalabs

The Lambdalabs provider for Terraform
Apache License 2.0
9 stars 0 forks source link

Ability to add timeout blocks #10

Closed madelaney closed 3 months ago

madelaney commented 3 months ago

I was trying to use your module to do a simple apply (see below) but I got a timeout operation while waiting for the machine to becoming available.

Normally, I would just update the timeout (https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts) but this module doesn't seem to support that block.

resource "lambdalabs_instance" "stable_diffusion" {
  name               = "stable_diffusion"
  region_name        = "us-west-1"
  instance_type_name = "gpu_1x_a10"
  ssh_key_names = [
    lambdalabs_ssh_key.primary.name
  ]

  connection {
    type        = "ssh"
    user        = "ubuntu"
    private_key = file(local.ssh_private_key)
    host        = self.ip
  }

  provisioner "remote-exec" {
    inline = [
      "env | sort"
    ]
  }
}
elct9620 commented 3 months ago

After I check the terraform SDK. I didn't implement the timeout support. I will check for how to support it.

elct9620 commented 3 months ago

Timeout supported after v0.3.0 (https://registry.terraform.io/providers/elct9620/lambdalabs/0.3.0)

Tested with

timeouts {
  create = "30m"
}