Skip to content

Commit 28be5df

Browse files
authored
Merge pull request #445 from SumoLogic/INVS-680_Fix_hard_fail_on_empty_string_tag
INVS-680: Fix hard fail on empty tag
2 parents 6103c5e + a8531f3 commit 28be5df

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## 2.19.1 (Unreleased)
22
FEATURES:
33
* Add new optional `resolution_window` field to resource/sumologic_monitor (GH-418)
4+
BUG FIXES:
5+
* cse rules hard failing if passing tags with empty strings. (GH-445)
46

57
## 2.19.0 (September 20, 2022)
68
FEATURES:

sumologic/resource_sumologic_cse_aggregation_rule.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sumologic
22

33
import (
44
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
5+
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
56
"log"
67
)
78

@@ -85,7 +86,8 @@ func resourceSumologicCSEAggregationRule() *schema.Resource {
8586
Type: schema.TypeList,
8687
Optional: true,
8788
Elem: &schema.Schema{
88-
Type: schema.TypeString,
89+
Type: schema.TypeString,
90+
ValidateFunc: validation.StringIsNotEmpty,
8991
},
9092
},
9193
"trigger_expression": {

sumologic/resource_sumologic_cse_chain_rule.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sumologic
22

33
import (
44
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
5+
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
56
"log"
67
)
78

@@ -73,7 +74,8 @@ func resourceSumologicCSEChainRule() *schema.Resource {
7374
Type: schema.TypeList,
7475
Optional: true,
7576
Elem: &schema.Schema{
76-
Type: schema.TypeString,
77+
Type: schema.TypeString,
78+
ValidateFunc: validation.StringIsNotEmpty,
7779
},
7880
},
7981
"window_size": {

sumologic/resource_sumologic_cse_match_rule.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sumologic
22

33
import (
44
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
5+
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
56
"log"
67
)
78

@@ -50,7 +51,8 @@ func resourceSumologicCSEMatchRule() *schema.Resource {
5051
Type: schema.TypeList,
5152
Optional: true,
5253
Elem: &schema.Schema{
53-
Type: schema.TypeString,
54+
Type: schema.TypeString,
55+
ValidateFunc: validation.StringIsNotEmpty,
5456
},
5557
},
5658
},

sumologic/resource_sumologic_cse_threshold_rule.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sumologic
22

33
import (
44
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
5+
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
56
"log"
67
)
78

@@ -69,7 +70,8 @@ func resourceSumologicCSEThresholdRule() *schema.Resource {
6970
Type: schema.TypeList,
7071
Optional: true,
7172
Elem: &schema.Schema{
72-
Type: schema.TypeString,
73+
Type: schema.TypeString,
74+
ValidateFunc: validation.StringIsNotEmpty,
7375
},
7476
},
7577
"window_size": {

0 commit comments

Comments
 (0)