OpenNebula / terraform-provider-opennebula

Terraform provider for OpenNebula
https://www.terraform.io/docs/providers/opennebula/
Mozilla Public License 2.0
61 stars 54 forks source link

`opennebula_service`: Add "timeouts" block #467

Closed sk4zuzu closed 11 months ago

sk4zuzu commented 1 year ago

Description

  1. It seems that timeout for opennebula_service resource is hardcoded to 3 minutes -> https://github.com/OpenNebula/terraform-provider-opennebula/blob/v1.2.2/opennebula/resource_opennebula_service.go#L712, which for something like OneKE appliance is too small and it always fails because of that.
  2. Resources like opennebula_image already support "timeouts" block -> https://github.com/OpenNebula/terraform-provider-opennebula/blob/v1.2.2/opennebula/resource_opennebula_image.go#L35-L38.
  3. It would be great to have same feature for opennebula_service. :+1: :slightly_smiling_face:

New or affected resources and data sources

Potential terraform configuration

resource "opennebula_service" "example" {
  name           = "service"
  template_id    = 11
  extra_template = templatefile("${path.module}/extra_template.json", {})
  timeouts {
    create = "15m"
    delete = "5m"
  }
}

References

https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts

treywelsh commented 11 months ago

Sorry I didn't see that the issue was assigned so I just made a PR, I'll take this one, I'll take care to assign myself to an issue before working on it in the future

tinova commented 11 months ago

no worries! glad that this is underway :)