-
Notifications
You must be signed in to change notification settings - Fork 0
/
sec-score-export.tf
100 lines (97 loc) · 2.3 KB
/
sec-score-export.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
resource "azurerm_resource_group" "sec_score_export_rg" {
count = var.export_to_workspace_ID != null ? 1 : 0
name = var.sec_score_export_rg
location = var.location
}
resource "azurerm_security_center_automation" "export_to_workspace" {
count = var.export_to_workspace_ID != null ? 1 : 0
name = "ExportToWorkspace"
location = var.location
resource_group_name = var.sec_score_export_rg
scopes = [data.azurerm_subscription.current.id]
action {
type = "loganalytics"
resource_id = var.export_to_workspace_ID
}
source {
event_source = "Assessments"
rule_set {
rule {
expected_value = "Microsoft.Security/assessments"
operator = "Contains"
property_path = "type"
property_type = "String"
}
}
}
source {
event_source = "AssessmentsSnapshot"
rule_set {
rule {
expected_value = "Microsoft.Security/assessments"
operator = "Contains"
property_path = "type"
property_type = "String"
}
}
}
source {
event_source = "SubAssessments"
}
source {
event_source = "SubAssessmentsSnapshot"
}
source {
event_source = "Alerts"
rule_set {
rule {
expected_value = "low"
operator = "Equals"
property_path = "Severity"
property_type = "String"
}
}
rule_set {
rule {
expected_value = "medium"
operator = "Equals"
property_path = "Severity"
property_type = "String"
}
}
rule_set {
rule {
expected_value = "high"
operator = "Equals"
property_path = "Severity"
property_type = "String"
}
}
rule_set {
rule {
expected_value = "informational"
operator = "Equals"
property_path = "Severity"
property_type = "String"
}
}
}
source {
event_source = "SecureScores"
}
source {
event_source = "SecureScoresSnapshot"
}
source {
event_source = "SecureScoreControls"
}
source {
event_source = "SecureScoreControlsSnapshot"
}
source {
event_source = "RegulatoryComplianceAssessment"
}
source {
event_source = "RegulatoryComplianceAssessmentSnapshot"
}
}