From 3cdd11b4855b5da0876b83adf5d33fa5e0bb1194 Mon Sep 17 00:00:00 2001 From: Ferdinand Hofherr Date: Fri, 25 Jun 2021 15:37:40 +0200 Subject: [PATCH] Increase create timeout for servers and snapshots In #312 customers reported that server creation can time out if large snapshots are used. This commit increases the timeout for server creation to 90 minutes. Since creating snapshots can also take quite some time the timeout is increased as well. Closes #312 --- internal/server/resource.go | 5 ++++- internal/snapshot/resource.go | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/server/resource.go b/internal/server/resource.go index 0924d5d9a..c102faf42 100644 --- a/internal/server/resource.go +++ b/internal/server/resource.go @@ -9,6 +9,7 @@ import ( "net" "strconv" "strings" + "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -31,7 +32,9 @@ func Resource() *schema.Resource { Importer: &schema.ResourceImporter{ StateContext: schema.ImportStatePassthroughContext, }, - + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(90 * time.Minute), + }, Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, diff --git a/internal/snapshot/resource.go b/internal/snapshot/resource.go index 670b7f54f..ee322a891 100644 --- a/internal/snapshot/resource.go +++ b/internal/snapshot/resource.go @@ -4,6 +4,7 @@ import ( "context" "log" "strconv" + "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -24,6 +25,9 @@ func Resource() *schema.Resource { Importer: &schema.ResourceImporter{ StateContext: schema.ImportStatePassthroughContext, }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(90 * time.Minute), + }, Schema: map[string]*schema.Schema{ "description": { Type: schema.TypeString,