Skip to content

Commit

Permalink
Port 4879 terraform provider fix order bug on team resource (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvirsegev authored Oct 4, 2023
1 parent d576572 commit 89a3259
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/cli/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func (c *PortClient) ReadTeam(ctx context.Context, teamName string) (*Team, int,
Description: pt.Team.Description,
CreatedAt: pt.Team.CreatedAt,
UpdatedAt: pt.Team.UpdatedAt,
Provider: pt.Team.Provider,
}

team.Users = make([]string, len(pt.Team.Users))
Expand Down
1 change: 1 addition & 0 deletions port/team/refreshTeamState.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func refreshTeamState(ctx context.Context, state *TeamModel, t *cli.Team) error
state.ID = types.StringValue(t.Name)
state.Name = types.StringValue(t.Name)
state.Description = flex.GoStringToFramework(&t.Description)
state.ProviderName = flex.GoStringToFramework(&t.Provider)

if len(t.Users) != 0 {
state.Users = make([]types.String, len(t.Users))
Expand Down
2 changes: 1 addition & 1 deletion port/team/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TeamSchema() map[string]schema.Attribute {
MarkdownDescription: "The description of the team",
Optional: true,
},
"users": schema.ListAttribute{
"users": schema.SetAttribute{
MarkdownDescription: "The users of the team",
Optional: true,
ElementType: types.StringType,
Expand Down

0 comments on commit 89a3259

Please sign in to comment.