Skip to content

Commit 5c16272

Browse files
authored
Merge pull request #14 from benzaita/lx-2348-transformed-includes-list-to-set
LX-2348 Transformed list to a set to maintain the order
2 parents 5d1ef6a + b3842e3 commit 5c16272

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ HOSTNAME=registry.terraform.io
33
NAMESPACE=benzaita
44
NAME=chaossearch
55
BINARY=terraform-provider-${NAME}
6-
VERSION=0.8.2
6+
VERSION=0.8.3
77
OS_ARCH=$(shell go env GOOS)_$(shell go env GOARCH)
88

99
default: install

chaossearch/resource_object_group.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func resourceObjectGroup() *schema.Resource {
112112
ForceNew: true,
113113
},
114114
"includes": {
115-
Type: schema.TypeList,
115+
Type: schema.TypeSet,
116116
Elem: &schema.Schema{
117117
Type: schema.TypeString,
118118
},
@@ -156,9 +156,12 @@ func resourceObjectGroupCreate(ctx context.Context, data *schema.ResourceData, m
156156
if data.Get("column_selection").(*schema.Set).Len() > 0 {
157157
columnSelectionInterfaces := data.Get("column_selection").(*schema.Set).List()[0]
158158
columnSelectionInterface := columnSelectionInterfaces.(map[string]interface{})
159+
160+
includesListOfInterfaces := columnSelectionInterface["includes"].(*schema.Set).List()
161+
159162
columnSelection = map[string]interface{}{
160163
"type": columnSelectionInterface["type"].(string),
161-
"includes": columnSelectionInterface["includes"].([]interface{}),
164+
"includes": includesListOfInterfaces,
162165
}
163166
}
164167

0 commit comments

Comments
 (0)