From 0e8edce0fbe597b75c428198bbc0e4413849c537 Mon Sep 17 00:00:00 2001 From: Jordan Kohl Date: Thu, 16 Jan 2025 11:11:10 -0500 Subject: [PATCH] adds retryablehttp client in place of standard --- internal/provider/provider.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/provider/provider.go b/internal/provider/provider.go index d2a9fae..524646c 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -7,6 +7,7 @@ import ( "context" "os" + "github.com/hashicorp/go-retryablehttp" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/provider" @@ -128,6 +129,9 @@ func (p *segmentProvider) Configure(ctx context.Context, req provider.ConfigureR URL: url, }, } + retryClient := retryablehttp.NewClient() + retryClient.RetryMax = 10 + configuration.HTTPClient = retryClient.StandardClient() client := api.NewAPIClient(configuration)