From 8e852a676803c173a2ee36785568b870a5d36580 Mon Sep 17 00:00:00 2001 From: Kodai Ishikawa Date: Tue, 5 Nov 2024 12:09:51 -0500 Subject: [PATCH] Updated `dynatrace_k8s_monitoring` resource --- .../cloud/kubernetes/monitoring/schema.json | 15 +-------------- .../cloud/kubernetes/monitoring/service.go | 2 +- .../kubernetes/monitoring/settings/settings.go | 3 ++- .../monitoring/testdata/terraform/example_a.tf | 1 - 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/dynatrace/api/builtin/cloud/kubernetes/monitoring/schema.json b/dynatrace/api/builtin/cloud/kubernetes/monitoring/schema.json index 5aed92471..8258deaba 100644 --- a/dynatrace/api/builtin/cloud/kubernetes/monitoring/schema.json +++ b/dynatrace/api/builtin/cloud/kubernetes/monitoring/schema.json @@ -125,19 +125,6 @@ "modificationPolicy": "DEFAULT", "nullable": false, "type": "boolean" - }, - "pvcMonitoringEnabled": { - "default": false, - "description": "This toggle will be removed in a future version. The persistent volume claim monitoring is now builtin and independent of this toggle. See [this community guide](https://dt-url.net/v2200u4m) for details.", - "displayName": "Monitor persistent volume claims", - "documentation": "The persistent volume claims feature is based on custom metrics and is, therefore, subject to licensing.\n\nIf you have DPS licensing see [licensing documentation](https://dt-url.net/nd0348b) for details.\n\nIf you have non-DPS licensing see [DDUs for custom metrics](https://dt-url.net/k8smcc) for details.", - "maxObjects": 1, - "metadata": { - "minActiveGateVersion": "1.239" - }, - "modificationPolicy": "DEFAULT", - "nullable": false, - "type": "boolean" } }, "schemaGroups": [ @@ -221,5 +208,5 @@ "versionInfo": "" } }, - "version": "1.0.1" + "version": "1.0.2" } \ No newline at end of file diff --git a/dynatrace/api/builtin/cloud/kubernetes/monitoring/service.go b/dynatrace/api/builtin/cloud/kubernetes/monitoring/service.go index f653594a5..80bbc5c8c 100644 --- a/dynatrace/api/builtin/cloud/kubernetes/monitoring/service.go +++ b/dynatrace/api/builtin/cloud/kubernetes/monitoring/service.go @@ -23,7 +23,7 @@ import ( "github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/settings/services/settings20" ) -const SchemaVersion = "1.0.1" +const SchemaVersion = "1.0.2" const SchemaID = "builtin:cloud.kubernetes.monitoring" func Service(credentials *settings.Credentials) settings.CRUDService[*monitoring.Settings] { diff --git a/dynatrace/api/builtin/cloud/kubernetes/monitoring/settings/settings.go b/dynatrace/api/builtin/cloud/kubernetes/monitoring/settings/settings.go index 31acd9417..c6228929e 100644 --- a/dynatrace/api/builtin/cloud/kubernetes/monitoring/settings/settings.go +++ b/dynatrace/api/builtin/cloud/kubernetes/monitoring/settings/settings.go @@ -82,7 +82,8 @@ func (me *Settings) Schema() map[string]*schema.Schema { "pvc_monitoring_enabled": { Type: schema.TypeBool, Description: "To enable dashboards and alerts, add the [Kubernetes persistent volume claims](ui/hub/ext/com.dynatrace.extension.kubernetes-pvc) extension to your environment.", - Required: true, + Optional: true, + Deprecated: "This attribute is deprecated, see [this community guide](https://dt-url.net/v2200u4m) for details.", }, "scope": { Type: schema.TypeString, diff --git a/dynatrace/api/builtin/cloud/kubernetes/monitoring/testdata/terraform/example_a.tf b/dynatrace/api/builtin/cloud/kubernetes/monitoring/testdata/terraform/example_a.tf index 9240bc1b9..7036f1c5e 100644 --- a/dynatrace/api/builtin/cloud/kubernetes/monitoring/testdata/terraform/example_a.tf +++ b/dynatrace/api/builtin/cloud/kubernetes/monitoring/testdata/terraform/example_a.tf @@ -5,7 +5,6 @@ resource "dynatrace_k8s_monitoring" "#name#" { include_all_fdi_events = true open_metrics_builtin_enabled = false open_metrics_pipeline_enabled = true - pvc_monitoring_enabled = true scope = "KUBERNETES_CLUSTER-1234567890000000" event_patterns { event_pattern {