From 8e13a2cbffe5235dcdfc13276f419629ec24b967 Mon Sep 17 00:00:00 2001 From: Thiery Ouattara Date: Tue, 18 Apr 2023 12:41:51 +0000 Subject: [PATCH] Fix access_key creation bug fixed #342 --- outscale/resource_outscale_access_key.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/outscale/resource_outscale_access_key.go b/outscale/resource_outscale_access_key.go index 86c3b6d72..f93be0d72 100644 --- a/outscale/resource_outscale_access_key.go +++ b/outscale/resource_outscale_access_key.go @@ -74,8 +74,9 @@ func resourceOutscaleAccessKeyCreate(d *schema.ResourceData, meta interface{}) e if err = checkDateFormat(expirDate); err != nil { return err } + req.ExpirationDate = &expirDate } - req.ExpirationDate = &expirDate + var resp oscgo.CreateAccessKeyResponse err = resource.Retry(5*time.Minute, func() *resource.RetryError { rp, httpResp, err := conn.AccessKeyApi.CreateAccessKey(context.Background()).CreateAccessKeyRequest(req).Execute()