Skip to content

Commit c6b1936

Browse files
authored
fix: update other definition of list to set (#64)
There's a second definition I forgot about in #62
1 parent 7b5425c commit c6b1936

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/provider/endpoint_resource.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ type EndpointResourceModel struct {
7575
Url types.String `tfsdk:"url"`
7676
Id types.String `tfsdk:"id"`
7777
Security types.Object `tfsdk:"security"`
78-
Tags types.List `tfsdk:"tags"`
78+
Tags types.Set `tfsdk:"tags"`
7979
}
8080

8181
type EndpointResourceSecurityToken struct {
@@ -424,15 +424,15 @@ func (r *EndpointResource) Read(ctx context.Context, req resource.ReadRequest, r
424424
data.Security = securityValueObject
425425
}
426426

427-
data.Tags = types.ListNull(types.StringType)
427+
data.Tags = types.SetNull(types.StringType)
428428
if endpoint.Tags != nil && len(*endpoint.Tags) > 0 {
429429
var tags []string
430430
for _, tag := range *endpoint.Tags {
431431
if tag.Label != nil {
432432
tags = append(tags, *tag.Label)
433433
}
434434
}
435-
t, diags := types.ListValueFrom(ctx, types.StringType, tags)
435+
t, diags := types.SetValueFrom(ctx, types.StringType, tags)
436436
resp.Diagnostics.Append(diags...)
437437
data.Tags = t
438438
}

0 commit comments

Comments
 (0)