Skip to content

Commit f7d50c5

Browse files
jamie-snoopSean Sain
authored andcommitted
Adding partition import support using the ImportStatePassthrough.
1 parent f155b0f commit f7d50c5

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.this 0000000000000000
42+
```
3743

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

0 commit comments

Comments
 (0)