Skip to content

Commit

Permalink
Merge pull request #113 from SumoLogic/ssain-add-lookup-table-docs
Browse files Browse the repository at this point in the history
add docs for lookup tables
  • Loading branch information
seansain authored Nov 13, 2020
2 parents 743594e + b04d0cf commit e09570f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.5.0 (November 13, 2020)

FEATURES:

* **New Resource:** sumologic_lookup_table (GH-87)

## 2.4.1 (November 5, 2020)

BUG FIXES:
Expand Down
56 changes: 56 additions & 0 deletions website/docs/r/lookup_table.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
layout: "sumologic"
page_title: "SumoLogic: sumologic_lookup_table"
description: |-
Provides a Sumologic Lookup Table
---

# sumologic_lookup_table
Provides a [Sumologic Lookup Table][1].

## Example Usage
```hcl
data "sumologic_personal_folder" "personalFolder" {}
resource "sumologic_lookup_table" "lookupTable" {
name = "a lookup table updated"
fields {
field_name = "FieldName1"
field_type = "boolean"
}
ttl = 100
primary_keys = ["FieldName1"]
parent_folder_id = "${data.sumologic_personal_folder.personalFolder.id}"
size_limit_action = "DeleteOldData"
description = "some description"
}
```

## Argument reference

The following arguments are supported:

- `name` - (Required) The name of the lookup table.
- `parent_folder_id` - (Required) The parent-folder-path identifier of the lookup table in the Library.
- `description` - (Required) The description of the lookup table.
- `fields` - (Required) The list of fields in the lookup table.
- `fieldName` - (Required) The name of the field.
- `fieldType` - (Required) The data type of the field. Supported types: boolean, int, long, double, string
- `primaryKeys` - (Required) The names of the fields that make up the primary key for the lookup table. These will be a subset of the fields that the table will contain.
- `ttl` - (Optional) A time to live for each entry in the lookup table (in minutes). 365 days is the maximum time to live for each entry that you can specify. Setting it to 0 means that the records will not expire automatically.
- `sizeLimitAction` - (Optional) The action that needs to be taken when the size limit is reached for the table. The possible values can be StopIncomingMessages or DeleteOldData. DeleteOldData will start deleting old data once size limit is reached whereas StopIncomingMessages will discard all the updates made to the lookup table once size limit is reached.

## Attributes reference

The following attributes are exported:

- `id` - Unique identifier for the partition.

## Import
Lookup Tables can be imported using the id, e.g.:

```hcl
terraform import sumologic_lookup_table.test 1234567890
```

[1]: https://help.sumologic.com/05Search/Lookup_Tables

0 comments on commit e09570f

Please sign in to comment.