Skip to content

Commit e2812b3

Browse files
authored
Merge pull request #540 from SumoLogic/INVS-1496_Enforce_empty_string_validation_on_scse_entity_domain_mapping
INVS-1496: Enforce empty string validation on scse entity domain mapping
2 parents eb44ef5 + dde3c00 commit e2812b3

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 2.24.1 (Unreleased)
2-
2+
BUG FIXES:
3+
* Enforce non-empty string validation of `default_normalized_domain` and `domain_mappings` in cse_entity_normalization resource. (GH-540)
34

45
## 2.24.0 (June 22, 2023)
56
FEATURES:

sumologic/resource_sumologic_cse_entity_normalization_configuration.go

Lines changed: 10 additions & 6 deletions
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

@@ -29,8 +30,9 @@ func resourceSumologicCSEEntityNormalizationConfiguration() *schema.Resource {
2930
Required: true,
3031
},
3132
"default_normalized_domain": {
32-
Type: schema.TypeString,
33-
Optional: true,
33+
Type: schema.TypeString,
34+
Optional: true,
35+
ValidateFunc: validation.StringIsNotEmpty,
3436
},
3537
"normalize_hostnames": {
3638
Type: schema.TypeBool,
@@ -46,12 +48,14 @@ func resourceSumologicCSEEntityNormalizationConfiguration() *schema.Resource {
4648
Elem: &schema.Resource{
4749
Schema: map[string]*schema.Schema{
4850
"normalized_domain": {
49-
Type: schema.TypeString,
50-
Required: true,
51+
Type: schema.TypeString,
52+
Required: true,
53+
ValidateFunc: validation.StringIsNotEmpty,
5154
},
5255
"raw_domain": {
53-
Type: schema.TypeString,
54-
Required: true,
56+
Type: schema.TypeString,
57+
Required: true,
58+
ValidateFunc: validation.StringIsNotEmpty,
5559
},
5660
},
5761
},

0 commit comments

Comments
 (0)