diff --git a/code_generator/provider_code_spec.json b/code_generator/provider_code_spec.json index 3eec48e..71b36c8 100644 --- a/code_generator/provider_code_spec.json +++ b/code_generator/provider_code_spec.json @@ -114,7 +114,7 @@ }, { "name": "members", - "list": { + "set": { "computed_optional_required": "optional", "description": "List of team members", "element_type": { @@ -413,7 +413,7 @@ }, { "name": "members", - "list": { + "set": { "computed_optional_required": "computed", "description": "List of team members", "element_type": { diff --git a/internal/datasource_organization_team/organization_team_data_source_gen.go b/internal/datasource_organization_team/organization_team_data_source_gen.go index aee0544..0229d20 100644 --- a/internal/datasource_organization_team/organization_team_data_source_gen.go +++ b/internal/datasource_organization_team/organization_team_data_source_gen.go @@ -17,7 +17,7 @@ func OrganizationTeamDataSourceSchema(ctx context.Context) schema.Schema { Description: "Markdown description", MarkdownDescription: "Markdown description", }, - "members": schema.ListAttribute{ + "members": schema.SetAttribute{ ElementType: types.StringType, Computed: true, Description: "List of team members", @@ -44,7 +44,7 @@ func OrganizationTeamDataSourceSchema(ctx context.Context) schema.Schema { type OrganizationTeamModel struct { Description types.String `tfsdk:"description"` - Members types.List `tfsdk:"members"` + Members types.Set `tfsdk:"members"` Name types.String `tfsdk:"name"` Orgname types.String `tfsdk:"orgname"` Role types.String `tfsdk:"role"` diff --git a/internal/provider/organization_team_data_source.go b/internal/provider/organization_team_data_source.go index c62cbad..169425b 100644 --- a/internal/provider/organization_team_data_source.go +++ b/internal/provider/organization_team_data_source.go @@ -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() { diff --git a/internal/provider/organization_team_resource.go b/internal/provider/organization_team_resource.go index 89813a5..bc3e2f9 100644 --- a/internal/provider/organization_team_resource.go +++ b/internal/provider/organization_team_resource.go @@ -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() { diff --git a/internal/resource_organization_team/organization_team_resource_gen.go b/internal/resource_organization_team/organization_team_resource_gen.go index 22382c4..69f5ffd 100644 --- a/internal/resource_organization_team/organization_team_resource_gen.go +++ b/internal/resource_organization_team/organization_team_resource_gen.go @@ -24,7 +24,7 @@ func OrganizationTeamResourceSchema(ctx context.Context) schema.Schema { MarkdownDescription: "Markdown description", Default: stringdefault.StaticString(""), }, - "members": schema.ListAttribute{ + "members": schema.SetAttribute{ ElementType: types.StringType, Optional: true, Description: "List of team members", @@ -60,7 +60,7 @@ func OrganizationTeamResourceSchema(ctx context.Context) schema.Schema { type OrganizationTeamModel struct { Description types.String `tfsdk:"description"` - Members types.List `tfsdk:"members"` + Members types.Set `tfsdk:"members"` Name types.String `tfsdk:"name"` Orgname types.String `tfsdk:"orgname"` Role types.String `tfsdk:"role"`