diff --git a/docs/resources/feature_flag_environment.md b/docs/resources/feature_flag_environment.md index 322697a0..d0916f9b 100644 --- a/docs/resources/feature_flag_environment.md +++ b/docs/resources/feature_flag_environment.md @@ -19,7 +19,7 @@ This resource allows you to create and manage environment-specific feature flags ## Example Usage ```terraform -resource "launchdarkly_feature_flag_environment" "number_env" { +resource "launchdarkly_feature_flag_environment" "number_ff_env" { flag_id = launchdarkly_feature_flag.number.id env_key = launchdarkly_environment.staging.key diff --git a/examples/resources/launchdarkly_feature_flag_environment/resource.tf b/examples/resources/launchdarkly_feature_flag_environment/resource.tf index f111dbb3..01ca4965 100644 --- a/examples/resources/launchdarkly_feature_flag_environment/resource.tf +++ b/examples/resources/launchdarkly_feature_flag_environment/resource.tf @@ -1,4 +1,4 @@ -resource "launchdarkly_feature_flag_environment" "number_env" { +resource "launchdarkly_feature_flag_environment" "number_ff_env" { flag_id = launchdarkly_feature_flag.number.id env_key = launchdarkly_environment.staging.key diff --git a/go.mod b/go.mod index 632b5538..36ba912f 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ 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/v14 v14.0.0 + 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 @@ -84,6 +84,6 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.56.3 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 49035c9a..fb8c7020 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/v14 v14.0.0 h1:fZfi5zKwgjpaOgK4NKcU5mJT2C8sYsR8nnuJYTaFvNU= -github.com/launchdarkly/api-client-go/v14 v14.0.0/go.mod h1:K7ejD5nn9ar94p/5qrQ0t9iJygdIQyH70U9M9rYvw5Y= +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/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= @@ -1375,8 +1375,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/launchdarkly/approvals_helper.go b/launchdarkly/approvals_helper.go index 21f73ba4..d3b171e0 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) type approvalSchemaOptions struct { diff --git a/launchdarkly/clause_helper.go b/launchdarkly/clause_helper.go index e1ab1bc4..7fcb8d40 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) const ( diff --git a/launchdarkly/clause_helper_test.go b/launchdarkly/clause_helper_test.go index 38f64976..49bc6124 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/config.go b/launchdarkly/config.go index 2e4b11d8..08b534c3 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) //nolint:staticcheck // The version string gets updated at build time using -ldflags diff --git a/launchdarkly/custom_properties_helper.go b/launchdarkly/custom_properties_helper.go index 4845e047..649148a3 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) // 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 c940dc5d..0758a2e1 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "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 4b742215..f587154b 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_environment_test.go b/launchdarkly/data_source_launchdarkly_environment_test.go index 41eb4324..e24baa77 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "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 b0566526..946df41f 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "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 f1ed7a4e..9ff4b64c 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "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 16ab4b45..7905041e 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_metric_test.go b/launchdarkly/data_source_launchdarkly_metric_test.go index f8a17da0..3cd0bcc4 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) @@ -47,10 +47,10 @@ func testAccDataSourceMetricScaffold(client *Client, betaClient *Client, project } // Update the project's experimentation settings to make the new context available for experiments - expSettings := ldapi.ExperimentationSettingsPut{ + expSettings := ldapi.RandomizationSettingsPut{ RandomizationUnits: randomizationUnitsInput, } - _, _, err = betaClient.ld.ExperimentsBetaApi.PutExperimentationSettings(betaClient.ctx, projectKey).ExperimentationSettingsPut(expSettings).Execute() + _, _, err = betaClient.ld.ExperimentsBetaApi.PutExperimentationSettings(betaClient.ctx, projectKey).RandomizationSettingsPut(expSettings).Execute() if err != nil { return nil, err } diff --git a/launchdarkly/data_source_launchdarkly_project_test.go b/launchdarkly/data_source_launchdarkly_project_test.go index 99d1d977..d4825c18 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "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 e0dd813f..ac2fd390 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_segment_test.go b/launchdarkly/data_source_launchdarkly_segment_test.go index 12ce2281..f8b19d6c 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_team_member.go b/launchdarkly/data_source_launchdarkly_team_member.go index 9b4fc594..0a0b822d 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) 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 de30a4a9..3834986c 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_team_members.go b/launchdarkly/data_source_launchdarkly_team_members.go index ad529da6..58512b62 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) 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 c3dae39c..ebe16a23 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_team_test.go b/launchdarkly/data_source_launchdarkly_team_test.go index fbce3492..90d65e5f 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/data_source_launchdarkly_webhook_test.go b/launchdarkly/data_source_launchdarkly_webhook_test.go index 5e597f78..137147d8 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) @@ -22,7 +22,7 @@ data "launchdarkly_webhook" "test" { func testAccDataSourceWebhookCreate(client *Client, webhookName string) (*ldapi.Webhook, error) { statementResources := []string{"proj/*"} - statementActions := []string{"turnFlagOn"} + statementActions := []string{"updateOn"} webhookBody := ldapi.WebhookPost{ Url: "https://www.example.com", Sign: false, @@ -110,7 +110,7 @@ func TestAccDataSourceWebhook_exists(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.#", "1"), resource.TestCheckResourceAttr(resourceName, "statements.#", "1"), resource.TestCheckResourceAttr(resourceName, "statements.0.resources.0", "proj/*"), - resource.TestCheckResourceAttr(resourceName, "statements.0.actions.0", "turnFlagOn"), + resource.TestCheckResourceAttr(resourceName, "statements.0.actions.0", "updateOn"), resource.TestCheckResourceAttr(resourceName, "statements.0.effect", "allow"), resource.TestCheckResourceAttr(resourceName, SECRET, ""), // since we set Sign to false diff --git a/launchdarkly/default_variations_helper.go b/launchdarkly/default_variations_helper.go index 74cc06d9..75a378f3 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) 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 7272492f..3f57878c 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/environments_helper.go b/launchdarkly/environments_helper.go index 025b39e0..7eb22e34 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) type environmentSchemaOptions struct { diff --git a/launchdarkly/environments_helper_test.go b/launchdarkly/environments_helper_test.go index f592387f..0f5c1ebc 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/fallthrough_helper.go b/launchdarkly/fallthrough_helper.go index 94e952c2..fe1ea59f 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) // 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 6d278d91..800d7847 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) type featureFlagEnvSchemaOptions struct { diff --git a/launchdarkly/feature_flags_helper.go b/launchdarkly/feature_flags_helper.go index bbe15587..0a2d3a85 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) type featureFlagSchemaOptions struct { diff --git a/launchdarkly/helper.go b/launchdarkly/helper.go index 4db10d50..a16ce9a8 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) var randomRetrySleepSeeded = false diff --git a/launchdarkly/metrics_helper.go b/launchdarkly/metrics_helper.go index 9b926215..6498a8e6 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func baseMetricSchema(isDataSource bool) map[string]*schema.Schema { @@ -88,6 +88,8 @@ func baseMetricSchema(isDataSource bool) map[string]*schema.Schema { Optional: true, Description: "The success criteria for your metric (if numeric metric)", ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"HigherThanBaseline", "LowerThanBaseline"}, false)), + Computed: true, + ComputedWhen: []string{KIND}, }, URLS: { Type: schema.TypeList, diff --git a/launchdarkly/policies_helper.go b/launchdarkly/policies_helper.go index da3c0263..ad332394 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func policyArraySchema() *schema.Schema { diff --git a/launchdarkly/policy_statements_helper.go b/launchdarkly/policy_statements_helper.go index 2c7c5135..e4969bc0 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) // 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 ceec38cf..93e1749d 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/prerequisite_helper.go b/launchdarkly/prerequisite_helper.go index 5e9b094c..683eceaa 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func prerequisitesSchema(isDataSource bool) *schema.Schema { diff --git a/launchdarkly/project_helper.go b/launchdarkly/project_helper.go index 0c7af42a..20274285 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) 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 7a6c2ce1..760075d3 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceAccessToken() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_audit_log_subscription.go b/launchdarkly/resource_launchdarkly_audit_log_subscription.go index c7e69a26..67caeeb4 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceAuditLogSubscription() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_custom_role.go b/launchdarkly/resource_launchdarkly_custom_role.go index fd9c83c9..6cd992fa 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceCustomRole() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_destination.go b/launchdarkly/resource_launchdarkly_destination.go index 4783552e..b035213f 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceDestination() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_environment.go b/launchdarkly/resource_launchdarkly_environment.go index 4b84b7b7..1a885dcf 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceEnvironment() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_feature_flag.go b/launchdarkly/resource_launchdarkly_feature_flag.go index abad64e0..ffd5e631 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceFeatureFlag() *schema.Resource { @@ -71,6 +71,13 @@ func resourceFeatureFlagCreate(ctx context.Context, d *schema.ResourceData, meta if err != nil { return diag.Errorf("invalid default variations: %v", err) } + variationType := d.Get(VARIATION_TYPE).(string) + if variationType == BOOL_VARIATION && len(variations) == 0 { + // explicitly define default boolean variations. + // this prevents the "Default off variation must be a valid index in the variations list" + // error that we see when we define defaults but no variations + variations = []ldapi.Variation{{Value: true}, {Value: false}} + } flag := ldapi.FeatureFlagBody{ Name: flagName, diff --git a/launchdarkly/resource_launchdarkly_feature_flag_environment.go b/launchdarkly/resource_launchdarkly_feature_flag_environment.go index 9344d3ff..7d8d133e 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) 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 076919ce..729479ec 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/resource_launchdarkly_flag_trigger.go b/launchdarkly/resource_launchdarkly_flag_trigger.go index fb42accd..184e3b07 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceFlagTrigger() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_metric.go b/launchdarkly/resource_launchdarkly_metric.go index c765b110..6d07b350 100644 --- a/launchdarkly/resource_launchdarkly_metric.go +++ b/launchdarkly/resource_launchdarkly_metric.go @@ -7,9 +7,11 @@ 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) +const CUSTOM_METRIC_DEFAULT_SUCCESS_CRITERIA = "HigherThanBaseline" + // Our required fields for metrics depend on the value of the 'kind' enum. // As of now, TF does not support validating multiple attributes at once, so our only options are // Validating at runtime in Create/Update (and only alerting at apply stage) @@ -53,12 +55,19 @@ func customizeMetricDiff(ctx context.Context, diff *schema.ResourceDiff, v inter return fmt.Errorf("click metrics do not accept 'event_key'") } case "custom": + // enum validation is done in validateFunction against attribute + if successCriteriaInConfig.IsNull() { + err := diff.SetNew(SUCCESS_CRITERIA, CUSTOM_METRIC_DEFAULT_SUCCESS_CRITERIA) + if err != nil { + return err + } + } isNumericInConfig := config.GetAttr(IS_NUMERIC) // numeric custom metrics have extra required fields if isNumericInConfig.True() { - // enum validation is done in validateFunction against attribute if successCriteriaInConfig.IsNull() { return fmt.Errorf("numeric custom metrics require 'success_criteria' to be set") + } if unitInConfig.IsNull() { return fmt.Errorf("numeric custom metrics require 'unit' to be set") @@ -168,6 +177,11 @@ func resourceMetricCreate(ctx context.Context, d *schema.ResourceData, metaRaw i if ok { successCriteria := d.Get(SUCCESS_CRITERIA).(string) metric.SuccessCriteria = &successCriteria + } else { + if kind == "custom" { + successCriteria := CUSTOM_METRIC_DEFAULT_SUCCESS_CRITERIA + metric.SuccessCriteria = &successCriteria + } } _, _, err := client.ld.MetricsApi.PostMetric(client.ctx, projectKey).MetricPost(metric).Execute() @@ -249,6 +263,10 @@ func resourceMetricUpdate(ctx context.Context, d *schema.ResourceData, metaRaw i successCriteria, ok := d.GetOk(SUCCESS_CRITERIA) if ok { patch = append(patch, patchReplace("/successCriteria", successCriteria.(string))) + } else { + if kind == "custom" { + patch = append(patch, patchReplace("/successCriteria", CUSTOM_METRIC_DEFAULT_SUCCESS_CRITERIA)) + } } // Only update the maintainer ID if is specified in the schema diff --git a/launchdarkly/resource_launchdarkly_metric_test.go b/launchdarkly/resource_launchdarkly_metric_test.go index 89d88bb0..31196bd8 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/require" ) @@ -113,14 +113,14 @@ func scaffoldProjectWithExperimentationSettings(client *Client, betaClient *Clie } // Update the project's experimentation settings to make the new context available for experiments - expSettings := ldapi.ExperimentationSettingsPut{ + expSettings := ldapi.RandomizationSettingsPut{ RandomizationUnits: randomizationUnitsInput, } - _, _, err = betaClient.ld.ExperimentsBetaApi.PutExperimentationSettings(betaClient.ctx, projectKey).ExperimentationSettingsPut(expSettings).Execute() + _, _, err = betaClient.ld.ExperimentsBetaApi.PutExperimentationSettings(betaClient.ctx, projectKey).RandomizationSettingsPut(expSettings).Execute() return err } -func TestAccMetric_Basic(t *testing.T) { +func TestAccMetric_BasicCreateAndUpdate(t *testing.T) { projectKey := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) resourceName := "launchdarkly_metric.basic" resource.ParallelTest(t, resource.TestCase{ @@ -149,34 +149,6 @@ func TestAccMetric_Basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, - }, - }) -} - -func TestAccMetric_Update(t *testing.T) { - projectKey := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resourceName := "launchdarkly_metric.basic" - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - Steps: []resource.TestStep{ - { - Config: withRandomProject(projectKey, testAccMetricBasic), - Check: resource.ComposeTestCheckFunc( - testAccCheckProjectExists("launchdarkly_project.test"), - testAccCheckMetricExists(resourceName), - resource.TestCheckResourceAttr(resourceName, NAME, "Basic Metric"), - resource.TestCheckResourceAttr(resourceName, KEY, "basic-metric"), - resource.TestCheckResourceAttr(resourceName, PROJECT_KEY, projectKey), - resource.TestCheckResourceAttr(resourceName, KIND, "pageview"), - resource.TestCheckResourceAttr(resourceName, "urls.0.kind", "substring"), - resource.TestCheckResourceAttr(resourceName, "urls.0.substring", "foo"), - resource.TestCheckResourceAttr(resourceName, "urls.1.kind", "regex"), - resource.TestCheckResourceAttr(resourceName, "urls.1.pattern", "foo"), - ), - }, { Config: withRandomProject(projectKey, testAccMetricUpdate), Check: resource.ComposeTestCheckFunc( diff --git a/launchdarkly/resource_launchdarkly_project.go b/launchdarkly/resource_launchdarkly_project.go index 296f7867..bf8b1d7e 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) // 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 d4e03dcc..3d7705dd 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceRelayProxyConfig() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_segment.go b/launchdarkly/resource_launchdarkly_segment.go index ca38f7d9..7db74c9a 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceSegment() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_team.go b/launchdarkly/resource_launchdarkly_team.go index 876b3830..64ab28cb 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceTeam() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_team_member.go b/launchdarkly/resource_launchdarkly_team_member.go index 412c86e7..af94f608 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceTeamMember() *schema.Resource { diff --git a/launchdarkly/resource_launchdarkly_webhook.go b/launchdarkly/resource_launchdarkly_webhook.go index ef3f1920..1d2c3518 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func resourceWebhook() *schema.Resource { diff --git a/launchdarkly/resource_team_role_mapping.go b/launchdarkly/resource_team_role_mapping.go index ac9205c8..0ed475c9 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) var ( diff --git a/launchdarkly/rollout_helper.go b/launchdarkly/rollout_helper.go index 17437e7f..1dc6aeec 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func rolloutSchema() *schema.Schema { diff --git a/launchdarkly/rule_helper.go b/launchdarkly/rule_helper.go index 7b65623d..00c0bdc2 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func rulesSchema(isDataSource bool) *schema.Schema { diff --git a/launchdarkly/segment_rule_helper.go b/launchdarkly/segment_rule_helper.go index d90ccc71..7ddee854 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) type segmentRulesSchemaOptions struct { diff --git a/launchdarkly/segment_rule_helper_test.go b/launchdarkly/segment_rule_helper_test.go index 474b2072..5921243b 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/launchdarkly/segments_helper.go b/launchdarkly/segments_helper.go index 90eb4afa..cddb2bf9 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) type segmentSchemaOptions struct { diff --git a/launchdarkly/target_helper.go b/launchdarkly/target_helper.go index 55eab49a..75088b67 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) func baseTargetsSchema(isDataSource bool) map[string]*schema.Schema { diff --git a/launchdarkly/target_helper_test.go b/launchdarkly/target_helper_test.go index 770e5ead..91d253a5 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/assert" ) diff --git a/launchdarkly/test_utils.go b/launchdarkly/test_utils.go index ed5a67d9..f210c428 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) // testAccProjectScaffoldCreate creates a project with the given project parameters diff --git a/launchdarkly/variations_helper.go b/launchdarkly/variations_helper.go index 5752bd2a..8894dc1c 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" ) const ( diff --git a/launchdarkly/variations_helper_test.go b/launchdarkly/variations_helper_test.go index 328d6e4f..2b372526 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/v14" + ldapi "github.com/launchdarkly/api-client-go/v15" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" )