From cd27a3e8cc570d9b6c1af657c16b513849b8872e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9a=20Grondier?= Date: Wed, 18 Dec 2024 16:01:55 +0100 Subject: [PATCH] Fix incorrect timeouts --- pkg/resources/instance_pool/datasource_list.go | 2 +- pkg/resources/instance_pool/resource.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/resources/instance_pool/datasource_list.go b/pkg/resources/instance_pool/datasource_list.go index a9a24278..74228e05 100644 --- a/pkg/resources/instance_pool/datasource_list.go +++ b/pkg/resources/instance_pool/datasource_list.go @@ -49,7 +49,7 @@ func dsListRead(ctx context.Context, d *schema.ResourceData, meta interface{}) d zone := d.Get(AttrZone).(string) - ctx, cancel := context.WithTimeout(ctx, d.Timeout(schema.TimeoutCreate)) + ctx, cancel := context.WithTimeout(ctx, d.Timeout(schema.TimeoutRead)) defer cancel() defaultClientV3, err := config.GetClientV3(meta) diff --git a/pkg/resources/instance_pool/resource.go b/pkg/resources/instance_pool/resource.go index 6be09712..b749ee58 100644 --- a/pkg/resources/instance_pool/resource.go +++ b/pkg/resources/instance_pool/resource.go @@ -443,7 +443,7 @@ func rRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.D zone := d.Get(AttrZone).(string) - ctx, cancel := context.WithTimeout(ctx, d.Timeout(schema.TimeoutCreate)) + ctx, cancel := context.WithTimeout(ctx, d.Timeout(schema.TimeoutRead)) defer cancel() defaultClientV3, err := config.GetClientV3(meta) @@ -483,7 +483,7 @@ func rUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag zone := d.Get(AttrZone).(string) - ctx, cancel := context.WithTimeout(ctx, d.Timeout(schema.TimeoutCreate)) + ctx, cancel := context.WithTimeout(ctx, d.Timeout(schema.TimeoutUpdate)) defer cancel() defaultClientV3, err := config.GetClientV3(meta) @@ -725,7 +725,7 @@ func rDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag zone := d.Get(AttrZone).(string) - ctx, cancel := context.WithTimeout(ctx, d.Timeout(schema.TimeoutCreate)) + ctx, cancel := context.WithTimeout(ctx, d.Timeout(schema.TimeoutDelete)) defer cancel() defaultClientV3, err := config.GetClientV3(meta)