Skip to content

Commit 8c9ed29

Browse files
Add IsIncludedInDefaultSearch variable to partition resource
1 parent 73ab427 commit 8c9ed29

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

sumologic/resource_sumologic_partition.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ func resourceSumologicPartition() *schema.Resource {
6767
Type: schema.TypeBool,
6868
Optional: true,
6969
},
70+
"is_included_in_default_search": {
71+
Type: schema.TypeBool,
72+
Description: "Indicates whether the partition is included in the default search scope. Configuring this property is exclusively permitted for flex partitions.",
73+
Optional: true,
74+
},
7075
},
7176
}
7277
}
@@ -113,6 +118,7 @@ func resourceSumologicPartitionRead(d *schema.ResourceData, meta interface{}) er
113118
d.Set("is_active", spartition.IsActive)
114119
d.Set("total_bytes", spartition.TotalBytes)
115120
d.Set("index_type", spartition.IndexType)
121+
d.Set("is_included_in_default_search", spartition.IsIncludedInDefaultSearch)
116122

117123
return nil
118124
}
@@ -146,5 +152,6 @@ func resourceToPartition(d *schema.ResourceData) Partition {
146152
TotalBytes: d.Get("total_bytes").(int),
147153
IndexType: d.Get("index_type").(string),
148154
ReduceRetentionPeriodImmediately: d.Get("reduce_retention_period_immediately").(bool),
155+
IsIncludedInDefaultSearch: d.Get("is_included_in_default_search").(bool),
149156
}
150157
}

sumologic/sumologic_partition.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,5 @@ type Partition struct {
7575
TotalBytes int `json:"totalBytes"`
7676
IndexType string `json:"indexType"`
7777
ReduceRetentionPeriodImmediately bool `json:"reduceRetentionPeriodImmediately,omitempty"`
78+
IsIncludedInDefaultSearch bool `json:"isIncludedInDefaultSearch"`
7879
}

website/docs/r/partition.html.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ resource "sumologic_partition" "examplePartition" {
1515
routing_expression = "_sourcecategory=*/Terraform"
1616
analytics_tier = "continuous"
1717
is_compliant = false
18+
is_included_in_default_search = true
1819
lifecycle {
1920
prevent_destroy = true
2021
}
@@ -27,10 +28,11 @@ The following arguments are supported:
2728

2829
- `name` - (Required, Forces new resource) The name of the partition.
2930
- `routing_expression` - (Required) The query that defines the data to be included in the partition.
30-
- `analytics_tier` - (Optional) The cloud flex analytics tier for your data; only relevant if your account has basic analytics enabled. If no value is supplied, partition will be created in continuous tier. Other possible values are : "frequent" and "infrequent".
31+
- `analytics_tier` - (Optional) The cloud flex analytics tier for your data; only relevant if your account has basic analytics enabled. If no value is supplied, partition will be created in continuous tier. Other possible values are : "frequent" and "infrequent". For flex partition, you can leave it empty or send flex.
3132
- `retention_period` - (Optional) The number of days to retain data in the partition, or -1 to use the default value for your account. Only relevant if your account has variable retention enabled.
3233
- `is_compliant` - (Optional) Whether the partition is compliant or not. Mark a partition as compliant if it contains data used for compliance or audit purpose. Retention for a compliant partition can only be increased and cannot be reduced after the partition is marked compliant. A partition once marked compliant, cannot be marked non-compliant later.
3334
- `reduce_retention_period_immediately` - (Optional) This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.
35+
- `is_included_in_default_search` - Indicates whether the partition is included in the default search scope. When executing a query such as "error | count," certain partitions are automatically part of the search scope. However, for specific partitions, the user must explicitly mention the partition using the _index term, as in "_index=webApp error | count". This property governs the default inclusion of the partition in the search scope. Configuring this property is exclusively permitted for flex partitions.
3436

3537
## Attributes reference
3638

0 commit comments

Comments
 (0)