diff --git a/go.mod b/go.mod index 7250b3e7..71ab9645 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,8 @@ require ( github.com/stretchr/testify v1.7.2 ) +require github.com/launchdarkly/api-client-go/v16 v16.1.1 + require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect @@ -52,7 +54,6 @@ require ( github.com/huandu/xstrings v1.3.2 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/jackc/sqlfmt v0.1.1-0.20191221211249-d576133216e1 // indirect - github.com/launchdarkly/api-client-go/v15 v15.0.0 github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/mitchellh/cli v1.1.5 // indirect diff --git a/go.sum b/go.sum index 0b662281..6f53c1ad 100644 --- a/go.sum +++ b/go.sum @@ -515,8 +515,8 @@ github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfR github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= -github.com/launchdarkly/api-client-go/v15 v15.0.0 h1:tA1oYCrId9L9vE8nFtAtlqkYkjPtnlXeXFMqvuezDtA= -github.com/launchdarkly/api-client-go/v15 v15.0.0/go.mod h1:7dpsX/epfhhRbCv5sEIxKng0xxYbzRYXlp0oJB3+XrQ= +github.com/launchdarkly/api-client-go/v16 v16.1.1 h1:YkGeHD0Syls1NL+ta6FJOXxkACfT58LPB0itaG29mNk= +github.com/launchdarkly/api-client-go/v16 v16.1.1/go.mod h1:LTKQebyewnd5lsscGIAjaJEG9TTRD6qglalv+1bixME= github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/tagliatelle v0.3.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= diff --git a/launchdarkly/approvals_helper.go b/launchdarkly/approvals_helper.go index d3b171e0..684daff9 100644 --- a/launchdarkly/approvals_helper.go +++ b/launchdarkly/approvals_helper.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) type approvalSchemaOptions struct { diff --git a/launchdarkly/clause_helper.go b/launchdarkly/clause_helper.go index 8a028fef..78fc62e8 100644 --- a/launchdarkly/clause_helper.go +++ b/launchdarkly/clause_helper.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) const ( diff --git a/launchdarkly/clause_helper_test.go b/launchdarkly/clause_helper_test.go index 49bc6124..fc46f2fc 100644 --- a/launchdarkly/clause_helper_test.go +++ b/launchdarkly/clause_helper_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/config.go b/launchdarkly/config.go index 08b534c3..12c95b8b 100644 --- a/launchdarkly/config.go +++ b/launchdarkly/config.go @@ -11,7 +11,7 @@ import ( "time" retryablehttp "github.com/hashicorp/go-retryablehttp" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) //nolint:staticcheck // The version string gets updated at build time using -ldflags @@ -126,12 +126,7 @@ func backOff(min, max time.Duration, attemptNum int, resp *http.Response) time.D } func standardRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) { - retry, retryErr := retryablehttp.DefaultRetryPolicy(ctx, resp, err) - if !retry && retryErr == nil && err == nil && resp.StatusCode == http.StatusConflict { - return true, nil - } - - return retry, retryErr + return retryablehttp.DefaultRetryPolicy(ctx, resp, err) } // retryPolicyWith404Retries extends our standard retryPolicy but also retries 404s (with exponential backoff). diff --git a/launchdarkly/config_test.go b/launchdarkly/config_test.go index d6adaf7c..327e2460 100644 --- a/launchdarkly/config_test.go +++ b/launchdarkly/config_test.go @@ -139,77 +139,6 @@ func TestHandleRateLimits(t *testing.T) { }) } -func TestHandleConflicts(t *testing.T) { - t.Run("no retries needed", func(t *testing.T) { - t.Parallel() - calls := 0 - - // create a test server - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - calls++ - w.WriteHeader(http.StatusOK) - })) - defer ts.Close() - - // create a client - client, err := newClient("token", ts.URL, false, DEFAULT_HTTP_TIMEOUT_S) - require.NoError(t, err) - - res, err := client.ld.GetConfig().HTTPClient.Get(ts.URL) - require.NoError(t, err) - assert.Equal(t, res.StatusCode, http.StatusOK) - assert.Equal(t, calls, 1) - }) - - t.Run("max retries exceeded", func(t *testing.T) { - t.Parallel() - calls := 0 - - // create a test server - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - calls++ - w.WriteHeader(http.StatusConflict) - })) - defer ts.Close() - - // create a client - client, err := newClient("token", ts.URL, false, DEFAULT_HTTP_TIMEOUT_S) - require.NoError(t, err) - - res, err := client.ld.GetConfig().HTTPClient.Get(ts.URL) - require.NoError(t, err) - assert.Equal(t, res.StatusCode, http.StatusConflict) - assert.Equal(t, calls, MAX_RETRIES+1) - }) - - t.Run("conflict resolved", func(t *testing.T) { - t.Parallel() - calls := 0 - - // create a test server - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - calls++ - - if calls == 3 { - w.WriteHeader(http.StatusOK) - return - } - - w.WriteHeader(http.StatusConflict) - })) - defer ts.Close() - - // create a client - client, err := newClient("token", ts.URL, false, DEFAULT_HTTP_TIMEOUT_S) - require.NoError(t, err) - - res, err := client.ld.GetConfig().HTTPClient.Get(ts.URL) - require.NoError(t, err) - assert.Equal(t, res.StatusCode, http.StatusOK) - assert.Equal(t, 3, calls) - }) -} - func Test404RetryClient(t *testing.T) { t.Run("no retries needed", func(t *testing.T) { t.Parallel() diff --git a/launchdarkly/custom_properties_helper.go b/launchdarkly/custom_properties_helper.go index 649148a3..c38dce48 100644 --- a/launchdarkly/custom_properties_helper.go +++ b/launchdarkly/custom_properties_helper.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) // https://docs.launchdarkly.com/home/connecting/custom-properties diff --git a/launchdarkly/custom_properties_helper_test.go b/launchdarkly/custom_properties_helper_test.go index 0758a2e1..bcd87e93 100644 --- a/launchdarkly/custom_properties_helper_test.go +++ b/launchdarkly/custom_properties_helper_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_audit_log_subscription_test.go b/launchdarkly/data_source_launchdarkly_audit_log_subscription_test.go index f587154b..6f36a870 100644 --- a/launchdarkly/data_source_launchdarkly_audit_log_subscription_test.go +++ b/launchdarkly/data_source_launchdarkly_audit_log_subscription_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_environment_test.go b/launchdarkly/data_source_launchdarkly_environment_test.go index e24baa77..4dad7a29 100644 --- a/launchdarkly/data_source_launchdarkly_environment_test.go +++ b/launchdarkly/data_source_launchdarkly_environment_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_feature_flag_environment_test.go b/launchdarkly/data_source_launchdarkly_feature_flag_environment_test.go index 946df41f..377ab25f 100644 --- a/launchdarkly/data_source_launchdarkly_feature_flag_environment_test.go +++ b/launchdarkly/data_source_launchdarkly_feature_flag_environment_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_feature_flag_test.go b/launchdarkly/data_source_launchdarkly_feature_flag_test.go index 9ff4b64c..cea9401a 100644 --- a/launchdarkly/data_source_launchdarkly_feature_flag_test.go +++ b/launchdarkly/data_source_launchdarkly_feature_flag_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_flag_trigger_test.go b/launchdarkly/data_source_launchdarkly_flag_trigger_test.go index 7905041e..d04cd4e3 100644 --- a/launchdarkly/data_source_launchdarkly_flag_trigger_test.go +++ b/launchdarkly/data_source_launchdarkly_flag_trigger_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_metric_test.go b/launchdarkly/data_source_launchdarkly_metric_test.go index 3cd0bcc4..08018214 100644 --- a/launchdarkly/data_source_launchdarkly_metric_test.go +++ b/launchdarkly/data_source_launchdarkly_metric_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_project_test.go b/launchdarkly/data_source_launchdarkly_project_test.go index d4825c18..d76200ea 100644 --- a/launchdarkly/data_source_launchdarkly_project_test.go +++ b/launchdarkly/data_source_launchdarkly_project_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_relay_proxy_configuration_test.go b/launchdarkly/data_source_launchdarkly_relay_proxy_configuration_test.go index ac2fd390..1cb934f1 100644 --- a/launchdarkly/data_source_launchdarkly_relay_proxy_configuration_test.go +++ b/launchdarkly/data_source_launchdarkly_relay_proxy_configuration_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_segment_test.go b/launchdarkly/data_source_launchdarkly_segment_test.go index f8b19d6c..be1acaa1 100644 --- a/launchdarkly/data_source_launchdarkly_segment_test.go +++ b/launchdarkly/data_source_launchdarkly_segment_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_team_member.go b/launchdarkly/data_source_launchdarkly_team_member.go index 0a0b822d..a68da830 100644 --- a/launchdarkly/data_source_launchdarkly_team_member.go +++ b/launchdarkly/data_source_launchdarkly_team_member.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func memberSchema() map[string]*schema.Schema { diff --git a/launchdarkly/data_source_launchdarkly_team_member_test.go b/launchdarkly/data_source_launchdarkly_team_member_test.go index 3834986c..2b5edc58 100644 --- a/launchdarkly/data_source_launchdarkly_team_member_test.go +++ b/launchdarkly/data_source_launchdarkly_team_member_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_team_members.go b/launchdarkly/data_source_launchdarkly_team_members.go index 58512b62..2db4f4c5 100644 --- a/launchdarkly/data_source_launchdarkly_team_members.go +++ b/launchdarkly/data_source_launchdarkly_team_members.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func dataSourceTeamMembers() *schema.Resource { diff --git a/launchdarkly/data_source_launchdarkly_team_members_test.go b/launchdarkly/data_source_launchdarkly_team_members_test.go index ebe16a23..8337926d 100644 --- a/launchdarkly/data_source_launchdarkly_team_members_test.go +++ b/launchdarkly/data_source_launchdarkly_team_members_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_team_test.go b/launchdarkly/data_source_launchdarkly_team_test.go index 90d65e5f..401e328c 100644 --- a/launchdarkly/data_source_launchdarkly_team_test.go +++ b/launchdarkly/data_source_launchdarkly_team_test.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_webhook_test.go b/launchdarkly/data_source_launchdarkly_webhook_test.go index 137147d8..4830cb85 100644 --- a/launchdarkly/data_source_launchdarkly_webhook_test.go +++ b/launchdarkly/data_source_launchdarkly_webhook_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/default_variations_helper.go b/launchdarkly/default_variations_helper.go index 75a378f3..8ac328fe 100644 --- a/launchdarkly/default_variations_helper.go +++ b/launchdarkly/default_variations_helper.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func defaultVariationsFromResourceData(d *schema.ResourceData) (*ldapi.Defaults, error) { diff --git a/launchdarkly/default_variations_helper_test.go b/launchdarkly/default_variations_helper_test.go index 3f57878c..432a1e67 100644 --- a/launchdarkly/default_variations_helper_test.go +++ b/launchdarkly/default_variations_helper_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/environments_helper.go b/launchdarkly/environments_helper.go index c71499c3..77942159 100644 --- a/launchdarkly/environments_helper.go +++ b/launchdarkly/environments_helper.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) type environmentSchemaOptions struct { diff --git a/launchdarkly/environments_helper_test.go b/launchdarkly/environments_helper_test.go index 63df618b..55cec954 100644 --- a/launchdarkly/environments_helper_test.go +++ b/launchdarkly/environments_helper_test.go @@ -3,7 +3,7 @@ package launchdarkly import ( "testing" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/fallthrough_helper.go b/launchdarkly/fallthrough_helper.go index fe1ea59f..6d46cfd4 100644 --- a/launchdarkly/fallthrough_helper.go +++ b/launchdarkly/fallthrough_helper.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) // In the LD model, this corresponds to the VariationOrRollout type diff --git a/launchdarkly/feature_flag_environment_helper.go b/launchdarkly/feature_flag_environment_helper.go index 800d7847..0711c8f0 100644 --- a/launchdarkly/feature_flag_environment_helper.go +++ b/launchdarkly/feature_flag_environment_helper.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) type featureFlagEnvSchemaOptions struct { diff --git a/launchdarkly/feature_flags_helper.go b/launchdarkly/feature_flags_helper.go index 0a2d3a85..58bb74ba 100644 --- a/launchdarkly/feature_flags_helper.go +++ b/launchdarkly/feature_flags_helper.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) type featureFlagSchemaOptions struct { diff --git a/launchdarkly/helper.go b/launchdarkly/helper.go index a16ce9a8..b126de68 100644 --- a/launchdarkly/helper.go +++ b/launchdarkly/helper.go @@ -8,7 +8,7 @@ import ( "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) var randomRetrySleepSeeded = false diff --git a/launchdarkly/metrics_helper.go b/launchdarkly/metrics_helper.go index 6498a8e6..07cdedfb 100644 --- a/launchdarkly/metrics_helper.go +++ b/launchdarkly/metrics_helper.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func baseMetricSchema(isDataSource bool) map[string]*schema.Schema { diff --git a/launchdarkly/policies_helper.go b/launchdarkly/policies_helper.go index ad332394..5888dfe4 100644 --- a/launchdarkly/policies_helper.go +++ b/launchdarkly/policies_helper.go @@ -5,7 +5,7 @@ import ( "sort" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func policyArraySchema() *schema.Schema { diff --git a/launchdarkly/policy_statements_helper.go b/launchdarkly/policy_statements_helper.go index e4969bc0..fd25b560 100644 --- a/launchdarkly/policy_statements_helper.go +++ b/launchdarkly/policy_statements_helper.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) // policyStatementSchemaOptions is used to help with renaming 'policy_statements' to statements for the launchdarkly_webhook resource. diff --git a/launchdarkly/policy_statements_helper_test.go b/launchdarkly/policy_statements_helper_test.go index 93e1749d..8043df89 100644 --- a/launchdarkly/policy_statements_helper_test.go +++ b/launchdarkly/policy_statements_helper_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/prerequisite_helper.go b/launchdarkly/prerequisite_helper.go index 683eceaa..57b55484 100644 --- a/launchdarkly/prerequisite_helper.go +++ b/launchdarkly/prerequisite_helper.go @@ -5,7 +5,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func prerequisitesSchema(isDataSource bool) *schema.Schema { diff --git a/launchdarkly/project_helper.go b/launchdarkly/project_helper.go index 20274285..455f08f0 100644 --- a/launchdarkly/project_helper.go +++ b/launchdarkly/project_helper.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func projectRead(ctx context.Context, d *schema.ResourceData, meta interface{}, isDataSource bool) diag.Diagnostics { diff --git a/launchdarkly/resource_launchdarkly_access_token.go b/launchdarkly/resource_launchdarkly_access_token.go index 760075d3..f4870069 100644 --- a/launchdarkly/resource_launchdarkly_access_token.go +++ b/launchdarkly/resource_launchdarkly_access_token.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceAccessToken() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_audit_log_subscription.go b/launchdarkly/resource_launchdarkly_audit_log_subscription.go index 67caeeb4..50bcc970 100644 --- a/launchdarkly/resource_launchdarkly_audit_log_subscription.go +++ b/launchdarkly/resource_launchdarkly_audit_log_subscription.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceAuditLogSubscription() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_custom_role.go b/launchdarkly/resource_launchdarkly_custom_role.go index 6cd992fa..34903b9a 100644 --- a/launchdarkly/resource_launchdarkly_custom_role.go +++ b/launchdarkly/resource_launchdarkly_custom_role.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceCustomRole() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_destination.go b/launchdarkly/resource_launchdarkly_destination.go index b035213f..bb7a83a2 100644 --- a/launchdarkly/resource_launchdarkly_destination.go +++ b/launchdarkly/resource_launchdarkly_destination.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceDestination() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_environment.go b/launchdarkly/resource_launchdarkly_environment.go index 1a885dcf..5bf6f4bd 100644 --- a/launchdarkly/resource_launchdarkly_environment.go +++ b/launchdarkly/resource_launchdarkly_environment.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceEnvironment() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_feature_flag.go b/launchdarkly/resource_launchdarkly_feature_flag.go index ffd5e631..b05d45bc 100644 --- a/launchdarkly/resource_launchdarkly_feature_flag.go +++ b/launchdarkly/resource_launchdarkly_feature_flag.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceFeatureFlag() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_feature_flag_environment.go b/launchdarkly/resource_launchdarkly_feature_flag_environment.go index 7d8d133e..f4dfa604 100644 --- a/launchdarkly/resource_launchdarkly_feature_flag_environment.go +++ b/launchdarkly/resource_launchdarkly_feature_flag_environment.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceFeatureFlagEnvironment() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_feature_flag_environment_test.go b/launchdarkly/resource_launchdarkly_feature_flag_environment_test.go index 729479ec..71554e7c 100644 --- a/launchdarkly/resource_launchdarkly_feature_flag_environment_test.go +++ b/launchdarkly/resource_launchdarkly_feature_flag_environment_test.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/resource_launchdarkly_flag_trigger.go b/launchdarkly/resource_launchdarkly_flag_trigger.go index 184e3b07..fa49e149 100644 --- a/launchdarkly/resource_launchdarkly_flag_trigger.go +++ b/launchdarkly/resource_launchdarkly_flag_trigger.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceFlagTrigger() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_metric.go b/launchdarkly/resource_launchdarkly_metric.go index 6d07b350..887c0b54 100644 --- a/launchdarkly/resource_launchdarkly_metric.go +++ b/launchdarkly/resource_launchdarkly_metric.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) const CUSTOM_METRIC_DEFAULT_SUCCESS_CRITERIA = "HigherThanBaseline" diff --git a/launchdarkly/resource_launchdarkly_metric_test.go b/launchdarkly/resource_launchdarkly_metric_test.go index 31196bd8..b475620f 100644 --- a/launchdarkly/resource_launchdarkly_metric_test.go +++ b/launchdarkly/resource_launchdarkly_metric_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/resource_launchdarkly_project.go b/launchdarkly/resource_launchdarkly_project.go index bf8b1d7e..8d65e5cb 100644 --- a/launchdarkly/resource_launchdarkly_project.go +++ b/launchdarkly/resource_launchdarkly_project.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) // We assign a custom diff in cases where the customer has not assigned a default for CSA or IIS in config diff --git a/launchdarkly/resource_launchdarkly_relay_proxy_configuration.go b/launchdarkly/resource_launchdarkly_relay_proxy_configuration.go index 3d7705dd..c4fd563a 100644 --- a/launchdarkly/resource_launchdarkly_relay_proxy_configuration.go +++ b/launchdarkly/resource_launchdarkly_relay_proxy_configuration.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceRelayProxyConfig() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_segment.go b/launchdarkly/resource_launchdarkly_segment.go index 7db74c9a..19590413 100644 --- a/launchdarkly/resource_launchdarkly_segment.go +++ b/launchdarkly/resource_launchdarkly_segment.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceSegment() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_team.go b/launchdarkly/resource_launchdarkly_team.go index 64ab28cb..6dd6d16e 100644 --- a/launchdarkly/resource_launchdarkly_team.go +++ b/launchdarkly/resource_launchdarkly_team.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceTeam() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_team_member.go b/launchdarkly/resource_launchdarkly_team_member.go index af94f608..d3477cbd 100644 --- a/launchdarkly/resource_launchdarkly_team_member.go +++ b/launchdarkly/resource_launchdarkly_team_member.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceTeamMember() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_webhook.go b/launchdarkly/resource_launchdarkly_webhook.go index 1d2c3518..0aabe6e0 100644 --- a/launchdarkly/resource_launchdarkly_webhook.go +++ b/launchdarkly/resource_launchdarkly_webhook.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func resourceWebhook() *schema.Resource { diff --git a/launchdarkly/resource_team_role_mapping.go b/launchdarkly/resource_team_role_mapping.go index 0ed475c9..ce74c0c6 100644 --- a/launchdarkly/resource_team_role_mapping.go +++ b/launchdarkly/resource_team_role_mapping.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/types" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) var ( diff --git a/launchdarkly/rollout_helper.go b/launchdarkly/rollout_helper.go index 1dc6aeec..7413689d 100644 --- a/launchdarkly/rollout_helper.go +++ b/launchdarkly/rollout_helper.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func rolloutSchema() *schema.Schema { diff --git a/launchdarkly/rule_helper.go b/launchdarkly/rule_helper.go index 00c0bdc2..20d58405 100644 --- a/launchdarkly/rule_helper.go +++ b/launchdarkly/rule_helper.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func rulesSchema(isDataSource bool) *schema.Schema { diff --git a/launchdarkly/segment_rule_helper.go b/launchdarkly/segment_rule_helper.go index 7ddee854..1c6cc393 100644 --- a/launchdarkly/segment_rule_helper.go +++ b/launchdarkly/segment_rule_helper.go @@ -3,7 +3,7 @@ package launchdarkly import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) type segmentRulesSchemaOptions struct { diff --git a/launchdarkly/segment_rule_helper_test.go b/launchdarkly/segment_rule_helper_test.go index 5921243b..f85d9592 100644 --- a/launchdarkly/segment_rule_helper_test.go +++ b/launchdarkly/segment_rule_helper_test.go @@ -3,7 +3,7 @@ package launchdarkly import ( "testing" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/segments_helper.go b/launchdarkly/segments_helper.go index cddb2bf9..3e8e7c75 100644 --- a/launchdarkly/segments_helper.go +++ b/launchdarkly/segments_helper.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) type segmentSchemaOptions struct { diff --git a/launchdarkly/target_helper.go b/launchdarkly/target_helper.go index 75088b67..f8649677 100644 --- a/launchdarkly/target_helper.go +++ b/launchdarkly/target_helper.go @@ -4,7 +4,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) func baseTargetsSchema(isDataSource bool) map[string]*schema.Schema { diff --git a/launchdarkly/target_helper_test.go b/launchdarkly/target_helper_test.go index 91d253a5..e0f1a0ac 100644 --- a/launchdarkly/target_helper_test.go +++ b/launchdarkly/target_helper_test.go @@ -3,7 +3,7 @@ package launchdarkly import ( "testing" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/assert" ) diff --git a/launchdarkly/test_utils.go b/launchdarkly/test_utils.go index f210c428..cfd65077 100644 --- a/launchdarkly/test_utils.go +++ b/launchdarkly/test_utils.go @@ -3,7 +3,7 @@ package launchdarkly import ( "fmt" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) // testAccProjectScaffoldCreate creates a project with the given project parameters diff --git a/launchdarkly/variations_helper.go b/launchdarkly/variations_helper.go index 8894dc1c..209d35b5 100644 --- a/launchdarkly/variations_helper.go +++ b/launchdarkly/variations_helper.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" ) const ( diff --git a/launchdarkly/variations_helper_test.go b/launchdarkly/variations_helper_test.go index 2b372526..1f0eb713 100644 --- a/launchdarkly/variations_helper_test.go +++ b/launchdarkly/variations_helper_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - ldapi "github.com/launchdarkly/api-client-go/v15" + ldapi "github.com/launchdarkly/api-client-go/v16" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" )