From 50f2ee272abf573aa54122e746c4b85c612b7c32 Mon Sep 17 00:00:00 2001 From: Atanas Pamukchiev Date: Sun, 12 Feb 2023 21:57:04 +0100 Subject: [PATCH] feat: Update dependencies --- go.mod | 2 +- go.sum | 4 ++-- internal/splunkacs/resource_hec_token.go | 6 +++--- internal/splunkacs/resource_index.go | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 51358b4..f63adb4 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/atanaspam/terraform-provider-splunkacs go 1.18 require ( - github.com/atanaspam/splunkacs-api-go v1.2.0 + github.com/atanaspam/splunkacs-api-go v1.5.0 github.com/hashicorp/terraform-plugin-docs v0.13.0 github.com/hashicorp/terraform-plugin-framework v1.1.1 github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 diff --git a/go.sum b/go.sum index b86ca24..ac52b00 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/atanaspam/splunkacs-api-go v1.2.0 h1:9N+SKRdel1LdI8tUuko++X5TfYRNY5fY6dIsPqqvteM= -github.com/atanaspam/splunkacs-api-go v1.2.0/go.mod h1:8miDXQ0y+j5gIU4BxGhZYUDiOV11y5tSjsf0JY1LXkk= +github.com/atanaspam/splunkacs-api-go v1.5.0 h1:922C8n9uOUxAAtGthyEi0XUIR+p7XpMybul4a14yRGs= +github.com/atanaspam/splunkacs-api-go v1.5.0/go.mod h1:8miDXQ0y+j5gIU4BxGhZYUDiOV11y5tSjsf0JY1LXkk= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= diff --git a/internal/splunkacs/resource_hec_token.go b/internal/splunkacs/resource_hec_token.go index bd00c50..9963fa0 100644 --- a/internal/splunkacs/resource_hec_token.go +++ b/internal/splunkacs/resource_hec_token.go @@ -340,11 +340,11 @@ func waitHecCreatePropagation(ctx context.Context, client *splunkacs.SplunkAcsCl retries := 20 for i < retries { tflog.Debug(ctx, fmt.Sprintf("waiting for HEC token to become available. Retry: %d", i)) - hecResp, httpResp, err := client.GetHecToken(hecCreateResponse.CreateResponseItem.Spec.Name) - if err != nil && httpResp.StatusCode != 404 { + hecResp, apiResp, err := client.GetHecToken(hecCreateResponse.CreateResponseItem.Spec.Name) + if err != nil && apiResp.StatusCode != 404 { tflog.Error(ctx, "encountered an unexpected error while waiting for HEC to become avaialable") return nil, err - } else if err != nil && httpResp.StatusCode == 404 { + } else if err != nil && apiResp.StatusCode == 404 { i++ time.Sleep(10 * time.Second) continue diff --git a/internal/splunkacs/resource_index.go b/internal/splunkacs/resource_index.go index 782316e..bb77b3c 100644 --- a/internal/splunkacs/resource_index.go +++ b/internal/splunkacs/resource_index.go @@ -277,11 +277,11 @@ func waitIndexPropagation(ctx context.Context, client *splunkacs.SplunkAcsClient retries := 20 for i < retries { tflog.Info(ctx, fmt.Sprintf("waiting for Index to become eventually consistent. Retry: %d\n", i)) - indexResp, httpResp, err := client.GetIndex(indexName) - if err != nil && httpResp.StatusCode != 404 { + indexResp, apiResp, err := client.GetIndex(indexName) + if err != nil && apiResp.StatusCode != 404 { tflog.Error(ctx, "encountered an unexpected error while waiting for Index to become eventually consistent") return nil, err - } else if err != nil && httpResp.StatusCode == 404 { + } else if err != nil && apiResp.StatusCode == 404 { i++ time.Sleep(10 * time.Second) continue