Skip to content

Commit b4f1ccb

Browse files
authored
Merge pull request #535 from SumoLogic/INVS-1489_Enforce_group_by_fields_validation_in_cse_rule_resources
INVS-1489: Enforce group_by_fields validation in cse_*_rule resources
2 parents 0191974 + e3b0e66 commit b4f1ccb

6 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FEATURES:
33
* **New Resource:** sumologic_cse_outlier_rule (GH-532)
44
* Add new optional `global_signal_suppression_window` field to sumologic_cse_insights_configuration (TRIDENT-18052)
55

6+
BUG FIXES:
7+
* Enforce validation of `group_by_fields` in cse_*_rule resources, on non empty string elements. (GH-535)
8+
69
## 2.23.0 (May 24, 2023)
710
FEATURES:
811
* **New Resource:** sumologic_log_search (GH-432)

sumologic/resource_sumologic_cse_aggregation_rule.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ func resourceSumologicCSEAggregationRule() *schema.Resource {
5858
Type: schema.TypeList,
5959
Optional: true,
6060
Elem: &schema.Schema{
61-
Type: schema.TypeString,
61+
Type: schema.TypeString,
62+
ValidateFunc: validation.StringIsNotEmpty,
6263
},
6364
},
6465
"is_prototype": {

sumologic/resource_sumologic_cse_chain_rule.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func resourceSumologicCSEChainRule() *schema.Resource {
4646
Type: schema.TypeList,
4747
Optional: true,
4848
Elem: &schema.Schema{
49-
Type: schema.TypeString,
49+
Type: schema.TypeString,
50+
ValidateFunc: validation.StringIsNotEmpty,
5051
},
5152
},
5253
"is_prototype": {

sumologic/resource_sumologic_cse_first_seen_rule.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ func resourceSumologicCSEFirstSeenRule() *schema.Resource {
4242
Type: schema.TypeList,
4343
Optional: true,
4444
Elem: &schema.Schema{
45-
Type: schema.TypeString,
45+
Type: schema.TypeString,
46+
ValidateFunc: validation.StringIsNotEmpty,
4647
},
4748
},
4849
"is_prototype": {

sumologic/resource_sumologic_cse_outlier_rule.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ func resourceSumologicCSEOutlierRule() *schema.Resource {
6767
Type: schema.TypeList,
6868
Optional: true,
6969
Elem: &schema.Schema{
70-
Type: schema.TypeString,
70+
Type: schema.TypeString,
71+
ValidateFunc: validation.StringIsNotEmpty,
7172
},
7273
},
7374
"is_prototype": {

sumologic/resource_sumologic_cse_threshold_rule.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ func resourceSumologicCSEThresholdRule() *schema.Resource {
4343
Type: schema.TypeList,
4444
Optional: true,
4545
Elem: &schema.Schema{
46-
Type: schema.TypeString,
46+
Type: schema.TypeString,
47+
ValidateFunc: validation.StringIsNotEmpty,
4748
},
4849
},
4950
"is_prototype": {

0 commit comments

Comments
 (0)