Skip to content

Commit

Permalink
move membersBody
Browse files Browse the repository at this point in the history
  • Loading branch information
Taimoor Ahmad committed Nov 28, 2023
1 parent 0e02e33 commit 93831d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cmd/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,14 @@ func exportServices(c *opslevel.Client, shell *os.File, directory string) {
}

func getMembershipsAsTerraformConfig(members []opslevel.TeamMembership) string {
membersBody := strings.Builder{}
for _, member := range members {
memberConfig := `
memberConfig := `
member {
email = "%s"
role = "%s"
}`

membersBody := strings.Builder{}
for _, member := range members {
membersBody.WriteString(fmt.Sprintf(memberConfig, member.User.Email, member.Role))
}
return membersBody.String()
Expand Down

0 comments on commit 93831d7

Please sign in to comment.