Skip to content

Commit e4d0d36

Browse files
authored
Merge pull request #126 from SumoLogic/import-partitions-support
Import partitions support
2 parents f155b0f + 3467c32 commit e4d0d36

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

sumologic/resource_sumologic_partition.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ func resourceSumologicPartition() *schema.Resource {
1313
Read: resourceSumologicPartitionRead,
1414
Delete: resourceSumologicPartitionDelete,
1515
Update: resourceSumologicPartitionUpdate,
16+
Importer: &schema.ResourceImporter{
17+
State: schema.ImportStatePassthrough,
18+
},
1619

1720
Schema: map[string]*schema.Schema{
1821
"name": {

website/docs/r/partition.html.markdown

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,13 @@ The following arguments are supported:
3434
The following attributes are exported:
3535

3636
- `id` - Unique identifier for the partition.
37+
## Import
38+
Partitions can can be imported using the id. The list of partitions and their ids can be obtained using the Sumologic [partions api][2].
39+
40+
```hcl
41+
terraform import sumologic_partition.partition 1234567890
42+
```
3743

3844
[1]: https://help.sumologic.com/Manage/Partitions
45+
[2]: https://api.sumologic.com/docs/#operation/listPartitions
46+

0 commit comments

Comments
 (0)