Skip to content

Commit afcbdc3

Browse files
authored
fix: make deprecated metric is_active field optional and computed (#285)
* update deprecated field to make optional and computed * run make generate
1 parent 7dd8f81 commit afcbdc3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

docs/data-sources/metric.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ data "launchdarkly_metric" "example" {
3030
- `key` (String) The unique key that references the metric. A change in this field will force the destruction of the existing resource and the creation of a new one.
3131
- `project_key` (String) The metrics's project key. A change in this field will force the destruction of the existing resource and the creation of a new one.
3232

33+
### Optional
34+
35+
- `is_active` (Boolean, Deprecated) Ignored. All metrics are considered active.
36+
3337
### Read-Only
3438

3539
- `analysis_type` (String) The method for analyzing metric events. Available choices are `mean` and `percentile`.
3640
- `description` (String) The description of the metric's purpose.
3741
- `event_key` (String) The event key for your metric (if custom metric)
3842
- `id` (String) The ID of this resource.
3943
- `include_units_without_events` (Boolean) Include units that did not send any events and set their value to 0.
40-
- `is_active` (Boolean, Deprecated) Ignored. All metrics are considered active.
4144
- `is_numeric` (Boolean) Whether a `custom` metric is a numeric metric or not.
4245
- `kind` (String) The metric type. Available choices are `click`, `custom`, and `pageview`.
4346
- `maintainer_id` (String) The LaunchDarkly member ID of the member who will maintain the metric. If not set, the API will automatically apply the member associated with your Terraform API key or the most recently-set maintainer

launchdarkly/metrics_helper.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ func baseMetricSchema(isDataSource bool) map[string]*schema.Schema {
5959
TAGS: tagsSchema(tagsSchemaOptions{isDataSource: isDataSource}),
6060
IS_ACTIVE: {
6161
Type: schema.TypeBool,
62-
Optional: !isDataSource,
63-
Computed: isDataSource,
62+
Optional: true,
63+
Computed: true,
6464
Description: "Ignored. All metrics are considered active.",
65-
Default: false,
6665
Deprecated: "No longer in use. This field will be removed in a future major release of the LaunchDarkly provider.",
6766
},
6867
IS_NUMERIC: {

0 commit comments

Comments
 (0)