Skip to content

Commit 499a18d

Browse files
authored
Merge pull request #160 from SumoLogic/ssain-fix-routing-expression-length
fix routing expression
2 parents 8d3936e + 0e1f8b2 commit 499a18d

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

sumologic/resource_sumologic_partition.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func resourceSumologicPartition() *schema.Resource {
2626
},
2727
"routing_expression": {
2828
Type: schema.TypeString,
29-
Required: true,
29+
Optional: true,
3030
ValidateFunc: validation.StringLenBetween(1, 16384),
3131
},
3232
"analytics_tier": {

sumologic/sumologic_partition.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ func (s *Client) DecommissionPartition(id string) error {
5858

5959
func (s *Client) UpdatePartition(spartition Partition) error {
6060
url := fmt.Sprintf("v1/partitions/%s", spartition.ID)
61-
6261
_, err := s.Put(url, spartition)
6362

6463
return err
@@ -67,13 +66,13 @@ func (s *Client) UpdatePartition(spartition Partition) error {
6766
type Partition struct {
6867
ID string `json:"id,omitempty"`
6968
Name string `json:"name"`
70-
RoutingExpression string `json:"routingExpression"`
69+
RoutingExpression string `json:"routingExpression,omitempty"`
7170
AnalyticsTier string `json:"analyticsTier"`
7271
RetentionPeriod int `json:"retentionPeriod"`
7372
IsCompliant bool `json:"isCompliant"`
7473
DataForwardingId string `json:"dataForwardingId"`
7574
IsActive bool `json:"isActive"`
7675
TotalBytes int `json:"totalBytes"`
7776
IndexType string `json:"indexType"`
78-
ReduceRetentionPeriodImmediately bool `json:"reduceRetentionPeriodImmediately"`
77+
ReduceRetentionPeriodImmediately bool `json:"reduceRetentionPeriodImmediately,omitempty"`
7978
}

website/docs/r/partition.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Provides a [Sumologic Partition][1].
1313
resource "sumologic_partition" "examplePartition" {
1414
name = "terraform_examplePartition"
1515
routing_expression = "_sourcecategory=*/Terraform"
16-
analytics_tier = "enhanced"
16+
analytics_tier = "continuous"
1717
is_compliant = false
1818
lifecycle {
1919
prevent_destroy = true

0 commit comments

Comments
 (0)