Skip to content

Commit

Permalink
Injecting the name search explicitly into the Team search (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
oldNoakes authored and heimweh committed Jan 23, 2019
1 parent 0e41ecb commit 19b6213
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pagerduty/data_source_pagerduty_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ func dataSourcePagerDutyTeamRead(d *schema.ResourceData, meta interface{}) error

searchTeam := d.Get("name").(string)

resp, _, err := client.Teams.List(&pagerduty.ListTeamsOptions{})
o := &pagerduty.ListTeamsOptions{
Query: searchTeam,
}

resp, _, err := client.Teams.List(o)
if err != nil {
return err
}
Expand Down

0 comments on commit 19b6213

Please sign in to comment.