Skip to content

Commit

Permalink
Change OrganizationTeam members from a list to a set
Browse files Browse the repository at this point in the history
  • Loading branch information
ddebeau committed Sep 6, 2024
1 parent e938124 commit f132969
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions code_generator/provider_code_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
},
{
"name": "members",
"list": {
"set": {
"computed_optional_required": "optional",
"description": "List of team members",
"element_type": {
Expand Down Expand Up @@ -413,7 +413,7 @@
},
{
"name": "members",
"list": {
"set": {
"computed_optional_required": "computed",
"description": "List of team members",
"element_type": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/provider/organization_team_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (d *organizationTeamDataSource) Read(ctx context.Context, req datasource.Re
for _, member := range resTeamData.Members {
memList = append(memList, member.Name)
}
members, diags := types.ListValueFrom(ctx, types.StringType, memList)
members, diags := types.SetValueFrom(ctx, types.StringType, memList)

resp.Diagnostics.Append(diags...)
if resp.Diagnostics.HasError() {
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/organization_team_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (r *organizationTeamResource) Read(ctx context.Context, req resource.ReadRe
for _, member := range resTeamData.Members {
memList = append(memList, member.Name)
}
members, diags := types.ListValueFrom(ctx, types.StringType, memList)
members, diags := types.SetValueFrom(ctx, types.StringType, memList)

resp.Diagnostics.Append(diags...)
if resp.Diagnostics.HasError() {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f132969

Please sign in to comment.