Skip to content

Commit 556c36f

Browse files
committed
Updated dynatrace_vulnerability_settings resource
1 parent ebb85e0 commit 556c36f

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

dynatrace/api/builtin/appsec/runtimevulnerabilitydetection/schema.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@
5757
"nullable": false,
5858
"type": "boolean"
5959
},
60+
"enableResourceAttributeRules": {
61+
"description": "When new monitoring rules are enabled, classic rules are disabled. To re-enable classic rules, disable the new monitoring rules.",
62+
"displayName": "Enable new monitoring rules",
63+
"documentation": "",
64+
"maxObjects": 1,
65+
"metadata": {
66+
"featureFlag": "com.compuware.EnableCaspResourceAttributesSettingsToggle.feature",
67+
"maturity": "GENERAL_AVAILABILITY"
68+
},
69+
"modificationPolicy": "DEFAULT",
70+
"nullable": true,
71+
"type": "boolean"
72+
},
6073
"enableRuntimeVulnerabilityDetection": {
6174
"default": false,
6275
"description": "",
@@ -320,5 +333,5 @@
320333
]
321334
}
322335
},
323-
"version": "3.8"
336+
"version": "3.9"
324337
}

dynatrace/api/builtin/appsec/runtimevulnerabilitydetection/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/settings/services/settings20"
2525
)
2626

27-
const SchemaVersion = "3.8"
27+
const SchemaVersion = "3.9"
2828
const SchemaID = "builtin:appsec.runtime-vulnerability-detection"
2929

3030
func Service(credentials *rest.Credentials) settings.CRUDService[*runtimevulnerabilitydetection.Settings] {

dynatrace/api/builtin/appsec/runtimevulnerabilitydetection/settings/settings.go

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ import (
2323
)
2424

2525
type Settings struct {
26-
EnableCodeLevelVulnerabilityDetection bool `json:"enableCodeLevelVulnerabilityDetection"` // Enable Code-level Vulnerability Analytics
27-
EnableRuntimeVulnerabilityDetection bool `json:"enableRuntimeVulnerabilityDetection"` // Enable Third-party Vulnerability Analytics
28-
GlobalMonitoringModeDotNet MonitoringMode `json:"globalMonitoringModeDotNet"` // (v1.290) Global .NET code-level vulnerability detection control defines the default for all process groups. You can use monitoring rules to override the default for certain processes. Possible Values: `MONITORING_OFF`, `MONITORING_ON`
29-
GlobalMonitoringModeGo *MonitoringMode `json:"globalMonitoringModeGo,omitempty"` // Global Go code-level vulnerability detection control defines the default for all process groups. You can use monitoring rules to override the default for certain processes.
30-
GlobalMonitoringModeJava MonitoringMode `json:"globalMonitoringModeJava"` // Global Java code-level vulnerability detection control defines the default for all process groups. You can use monitoring rules to override the default for certain processes. Possible Values: `MONITORING_OFF`, `MONITORING_ON`
31-
GlobalMonitoringModeTPV MonitoringMode `json:"globalMonitoringModeTPV"` // Global third-party vulnerability detection control defines the default for all processes. Possible Values: `MONITORING_OFF`, `MONITORING_ON`
32-
Technologies *Technology `json:"technologies"` // Vulnerability Analytics can be enabled/disabled per supported technology.
26+
EnableCodeLevelVulnerabilityDetection bool `json:"enableCodeLevelVulnerabilityDetection"` // Enable Code-level Vulnerability Analytics
27+
EnableResourceAttributeRules *bool `json:"enableResourceAttributeRules,omitempty"` // When new monitoring rules are enabled, classic rules are disabled. To re-enable classic rules, disable the new monitoring rules.
28+
EnableRuntimeVulnerabilityDetection bool `json:"enableRuntimeVulnerabilityDetection"` // Enable Third-party Vulnerability Analytics
29+
GlobalMonitoringModeDotNet MonitoringMode `json:"globalMonitoringModeDotNet"` // (v1.290) Global .NET code-level vulnerability detection control defines the default for all process groups. You can use monitoring rules to override the default for certain processes. Possible Values: `MONITORING_OFF`, `MONITORING_ON`
30+
GlobalMonitoringModeGo *MonitoringMode `json:"globalMonitoringModeGo,omitempty"` // Global Go code-level vulnerability detection control defines the default for all process groups. You can use monitoring rules to override the default for certain processes.
31+
GlobalMonitoringModeJava MonitoringMode `json:"globalMonitoringModeJava"` // Global Java code-level vulnerability detection control defines the default for all process groups. You can use monitoring rules to override the default for certain processes. Possible Values: `MONITORING_OFF`, `MONITORING_ON`
32+
GlobalMonitoringModeTPV MonitoringMode `json:"globalMonitoringModeTPV"` // Global third-party vulnerability detection control defines the default for all processes. Possible Values: `MONITORING_OFF`, `MONITORING_ON`
33+
Technologies *Technology `json:"technologies"` // Vulnerability Analytics can be enabled/disabled per supported technology.
3334
}
3435

3536
func (me *Settings) Name() string {
@@ -43,6 +44,11 @@ func (me *Settings) Schema() map[string]*schema.Schema {
4344
Description: "Enable Code-level Vulnerability Analytics",
4445
Required: true,
4546
},
47+
"enable_resource_attribute_rules": {
48+
Type: schema.TypeBool,
49+
Description: "When new monitoring rules are enabled, classic rules are disabled. To re-enable classic rules, disable the new monitoring rules.",
50+
Optional: true, // nullable
51+
},
4652
"enable_runtime_vulnerability_detection": {
4753
Type: schema.TypeBool,
4854
Description: "Enable Third-party Vulnerability Analytics",
@@ -88,6 +94,7 @@ func (me *Settings) Schema() map[string]*schema.Schema {
8894
func (me *Settings) MarshalHCL(properties hcl.Properties) error {
8995
return properties.EncodeAll(map[string]any{
9096
"enable_code_level_vulnerability_detection": me.EnableCodeLevelVulnerabilityDetection,
97+
"enable_resource_attribute_rules": me.EnableResourceAttributeRules,
9198
"enable_runtime_vulnerability_detection": me.EnableRuntimeVulnerabilityDetection,
9299
"global_monitoring_mode_dot_net": me.GlobalMonitoringModeDotNet,
93100
"global_monitoring_mode_go": me.GlobalMonitoringModeGo,
@@ -100,6 +107,7 @@ func (me *Settings) MarshalHCL(properties hcl.Properties) error {
100107
func (me *Settings) UnmarshalHCL(decoder hcl.Decoder) error {
101108
err := decoder.DecodeAll(map[string]any{
102109
"enable_code_level_vulnerability_detection": &me.EnableCodeLevelVulnerabilityDetection,
110+
"enable_resource_attribute_rules": &me.EnableResourceAttributeRules,
103111
"enable_runtime_vulnerability_detection": &me.EnableRuntimeVulnerabilityDetection,
104112
"global_monitoring_mode_dot_net": &me.GlobalMonitoringModeDotNet,
105113
"global_monitoring_mode_go": &me.GlobalMonitoringModeGo,

0 commit comments

Comments
 (0)