Skip to content

Commit 33e4584

Browse files
committed
fix: formatting
1 parent 95619c9 commit 33e4584

2 files changed

Lines changed: 25 additions & 23 deletions

File tree

main.tf

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
resource "datadog_sensitive_data_scanner_group" "this" {
22
name = var.group_name
33
description = var.group_description
4+
is_enabled = var.is_enabled
5+
product_list = var.product_list
6+
47
filter {
58
query = var.filter_query
69
}
7-
is_enabled = var.is_enabled
8-
product_list = var.product_list
910

1011
dynamic "samplings" {
1112
for_each = var.product_list
@@ -22,11 +23,6 @@ data "datadog_sensitive_data_scanner_standard_pattern" "patterns" {
2223
}
2324

2425
resource "datadog_sensitive_data_scanner_rule" "rules" {
25-
lifecycle {
26-
# Use this meta-argument to avoid disabling the group when modifying the
27-
# `included_keyword_configuration` field
28-
create_before_destroy = true
29-
}
3026
for_each = data.datadog_sensitive_data_scanner_standard_pattern.patterns
3127

3228
name = each.key
@@ -39,4 +35,10 @@ resource "datadog_sensitive_data_scanner_rule" "rules" {
3935
type = "replacement_string"
4036
replacement_string = var.redaction_replacement_string
4137
}
38+
39+
lifecycle {
40+
# Use this meta-argument to avoid disabling the group when modifying the
41+
# `included_keyword_configuration` field
42+
create_before_destroy = true
43+
}
4244
}

variables.tf

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
variable "group_name" {
1+
variable "filter_query" {
22
type = string
3-
description = "The name of the Sensitive Data Scanner group."
4-
default = "Default Scanning Group"
3+
description = "The filter query to determine which logs/spans/events are scanned."
4+
default = "*"
55
}
66

77
variable "group_description" {
@@ -10,10 +10,16 @@ variable "group_description" {
1010
default = "Managed by OpenTofu"
1111
}
1212

13-
variable "filter_query" {
13+
variable "group_name" {
1414
type = string
15-
description = "The filter query to determine which logs/spans/events are scanned."
16-
default = "*"
15+
description = "The name of the Sensitive Data Scanner group."
16+
default = "Default Scanning Group"
17+
}
18+
19+
variable "is_enabled" {
20+
type = bool
21+
description = "Whether the scanning group is enabled."
22+
default = true
1723
}
1824

1925
variable "product_list" {
@@ -28,10 +34,10 @@ variable "product_samplings" {
2834
default = {}
2935
}
3036

31-
variable "is_enabled" {
32-
type = bool
33-
description = "Whether the scanning group is enabled."
34-
default = true
37+
variable "redaction_replacement_string" {
38+
type = string
39+
description = "The string to use for redaction if type is replacement_string."
40+
default = "[REDACTED]"
3541
}
3642

3743
variable "standard_patterns" {
@@ -74,9 +80,3 @@ variable "standard_patterns" {
7480
"Twilio Auth Token Scanner"
7581
]
7682
}
77-
78-
variable "redaction_replacement_string" {
79-
type = string
80-
description = "The string to use for redaction if type is replacement_string."
81-
default = "[REDACTED]"
82-
}

0 commit comments

Comments
 (0)