Skip to content

Commit 704b5a0

Browse files
author
Sean Sain
committed
make it optional
1 parent b0fdec3 commit 704b5a0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sumologic/resource_sumologic_partition.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ func resourceSumologicPartition() *schema.Resource {
2626
},
2727
"routing_expression": {
2828
Type: schema.TypeString,
29-
Required: true,
30-
ValidateFunc: validation.StringLenBetween(0, 16384),
29+
Optional: true,
30+
ValidateFunc: validation.StringLenBetween(1, 16384),
3131
},
3232
"analytics_tier": {
3333
Type: schema.TypeString,
@@ -106,7 +106,9 @@ func resourceSumologicPartitionRead(d *schema.ResourceData, meta interface{}) er
106106
return nil
107107
}
108108

109-
d.Set("routing_expression", spartition.RoutingExpression)
109+
if spartition.RoutingExpression != "" {
110+
d.Set("routing_expression", spartition.RoutingExpression)
111+
}
110112
d.Set("name", spartition.Name)
111113
d.Set("analytics_tier", spartition.AnalyticsTier)
112114
d.Set("retention_period", spartition.RetentionPeriod)

0 commit comments

Comments
 (0)