Skip to content

Commit

Permalink
Merge pull request #11 from enthought/fix-organization-team
Browse files Browse the repository at this point in the history
Change OrganizationTeam members from a list to a set
  • Loading branch information
ddebeau authored Sep 6, 2024
2 parents e938124 + 242273a commit 1fc4822
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 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
2 changes: 1 addition & 1 deletion docs/data-sources/organization_team.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ data "quay_organization_team" "team" {
### Read-Only

- `description` (String) Markdown description
- `members` (List of String) List of team members
- `members` (Set of String) List of team members
- `role` (String) Team role
2 changes: 1 addition & 1 deletion docs/resources/organization_team.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "quay_organization_team" "admin" {
### Optional

- `description` (String) Markdown description
- `members` (List of String) List of team members
- `members` (Set of String) List of team members

## Import

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 1fc4822

Please sign in to comment.