terraform-provider-digitalocean
terraform-provider-digitalocean copied to clipboard
Add timeout configuration for digitalocean_droplet resource
Hi,
When you create a big droplet from a snapshot in Digitalocean, it usually spends more than 1 hour creating this droplet. When you do it with terraform, the provider throws a timeout error because default timeout is 1 hour in the provider.
Could be possible to add timeouts block configuration to digitalocean_droplet resources?
Regards, Daniel.
I have proposed #839 as a possible solution but am very open to feedback on choices made.
Hi,
I'm trying to create the resource with timeout configuration, but it is not doing anything, the default timeout (1h) is still present, i can't configure it to, for example, 2 hours.
I am writting this block inside digitalocean_droplet resource and it goes to 1h again:
timeouts { create = "1m" }
How can i configure it?
Regards, Daniel
The droplet configuration is:
resource "digitalocean_droplet" "postgres_master_droplet" {
...
timeouts {
create = "2h"
delete = "2h"
update = "2h"
}
}
And the error code after an hour:
digitalocean_droplet.postgres_master_droplet: Still creating... [57m51s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [58m1s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [58m11s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [58m21s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [58m31s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [58m41s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [58m51s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [59m1s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [59m11s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [59m21s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [59m31s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [59m41s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [59m51s elapsed]
digitalocean_droplet.postgres_master_droplet: Still creating... [1h0m1s elapsed]
Error: Droplet (xxx) create action (xxx) errorred: timeout while waiting for state to become 'completed' (last state: 'in-progress', timeout: 1h0m0s)
with digitalocean_droplet.postgres_master_droplet,
on postgres_master_droplet_main.tf line 9, in resource "digitalocean_droplet" "postgres_master_droplet":
9: resource "digitalocean_droplet" "postgres_master_droplet"
@dfradejas Looks like we're still missing a needed change here. This should do the trick https://github.com/digitalocean/terraform-provider-digitalocean/pull/867
Hi @andrewsomething, do you notice when it is going to be merged that PR?
Well it has been some time, but still - #828 and #867 are not pushed, and DO is playing games with a combination of the less popular distro and droplet type.
#867 was released as v2.22.3
https://github.com/digitalocean/terraform-provider-digitalocean/releases/tag/v2.22.3