diff --git a/CHANGELOG.md b/CHANGELOG.md index 69ec9f55..433d35cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ +## [2.12.1] - 2023-05-15 + +BUG FIXES: + +- Fixes [an issue](https://github.com/launchdarkly/terraform-provider-launchdarkly/issues/142) in the `launchdarkly_feature_flag_environment` resource where empty `fallthrough` blocks would cause the provider to panic. + ## [2.12.0] - 2023-03-10 + FEATURES: - Adds the optional `randomization_units` attribute to the `launchdarkly_metric` resource and data source. For more information, read [Allocating experiment audiences](https://docs.launchdarkly.com/home/creating-experiments/allocation). Thanks, @goldfrapp04! diff --git a/launchdarkly/audit_log_subscription_configs_generated.go b/launchdarkly/audit_log_subscription_configs_generated.go index 0cff50a5..0cb95eb2 100644 --- a/launchdarkly/audit_log_subscription_configs_generated.go +++ b/launchdarkly/audit_log_subscription_configs_generated.go @@ -115,6 +115,24 @@ var SUBSCRIPTION_CONFIGURATION_FIELDS = map[string]IntegrationConfig{ Type: "uri", }, }, + "grafana": { + "apiKey": { + AllowedValues: []string{}, + DefaultValue: nil, + Description: "Enter an API key to your Grafana instance. This API key must have editor privileges.", + IsOptional: false, + IsSecret: true, + Type: "string", + }, + "endpointUrl": { + AllowedValues: []string{}, + DefaultValue: nil, + Description: "Enter your Grafana instance's URL. This instance must be accessible to LaunchDarkly's servers.", + IsOptional: false, + IsSecret: false, + Type: "uri", + }, + }, "honeycomb": { "apiKey": { AllowedValues: []string{}, @@ -154,7 +172,7 @@ var SUBSCRIPTION_CONFIGURATION_FIELDS = map[string]IntegrationConfig{ "msteams": {"url": { AllowedValues: []string{}, DefaultValue: nil, - Description: "Enter your Microsoft Teams [incoming webhook URL](https://docs.launchdarkly.com/integrations/microsoft-teams#setting-up-a-connector-in-microsoft-teams).", + Description: "Enter your Microsoft Teams [incoming webhook URL](https://docs.launchdarkly.com/integrations/microsoft-teams/webhooks#setting-up-a-connector-in-microsoft-teams).", IsOptional: false, IsSecret: false, Type: "uri", diff --git a/launchdarkly/fallthrough_helper.go b/launchdarkly/fallthrough_helper.go index fe663217..0ab50408 100644 --- a/launchdarkly/fallthrough_helper.go +++ b/launchdarkly/fallthrough_helper.go @@ -49,11 +49,16 @@ type fallthroughModel struct { } func validateFallThroughResourceData(f []interface{}) error { + for _, f := range f { + if f == nil { + return errors.New("feature flag fallthrough block cannot be empty. Please specify at least one of variation or rollout_weights") + } + } if !isPercentRollout(f) { fall := f[0].(map[string]interface{}) if bucketBy, ok := fall[BUCKET_BY]; ok { if bucketBy.(string) != "" { - return errors.New("flag_fallthrough: cannot use bucket_by argument with variation, only with rollout_weights") + return errors.New("flag fallthrough: cannot use bucket_by argument with variation, only with rollout_weights") } } } diff --git a/scripts/codegen/manifestgen/generator.go b/scripts/codegen/manifestgen/generator.go index 186d5475..0ced09b6 100644 --- a/scripts/codegen/manifestgen/generator.go +++ b/scripts/codegen/manifestgen/generator.go @@ -6,9 +6,11 @@ import ( "github.com/dave/jennifer/jen" ) +// These integrations are ommitted because the subscriptions are created and managed by the integrations var OMITTED_INTEGRATION_KEYS = []string{ "msteams-app", - "zapier", // Zapier is omitted because it the integration configuration is managed by Zapier + "compass", + "zapier", } func isOmitted(integrationKey string) bool {