PagerDuty / terraform-provider-pagerduty

Terraform PagerDuty provider
https://www.terraform.io/docs/providers/pagerduty/
Mozilla Public License 2.0
203 stars 212 forks source link

Return users associated with the team for pagerduty_team data source #262

Open saraogivinay opened 4 years ago

saraogivinay commented 4 years ago

Currently pagerduty_team data source only returns 3 attributes as listed in this doc https://www.terraform.io/docs/providers/pagerduty/d/team.html. It would a great use of the the team data source if it also returned the users in that team as an attribute.

One of the use case that I currently was working is, when creating a pagerduty schedule you have to provide a list of users to add to the schedule. But if you have teams created and those teams have users associated with it then we can simply fetch the user ids from the team data source and pass it into pagerduty_schedule resource rather than passing in user id which are retrieved using the user data source.

Would appreciate any feedback on this request.

Terraform Version

Terraform v0.12.29

Affected Resource(s)

https://www.terraform.io/docs/providers/pagerduty/d/team.html

saraogivinay commented 4 years ago

https://github.com/PagerDuty/terraform-provider-pagerduty/pull/103 seems to be related to this

corymatheson commented 3 years ago

103 seems to be ~3 years old now. Is there any chance of getting this merged?

lokenorlinjohannessen commented 3 years ago

@corymatheson I also need this, so going to create a updated PR and try to get it merged into the provider.

franklinlindemberg commented 2 years ago

Im looking forward to this as well

doryer commented 2 years ago

I am looking forward for this as well, waiting for https://github.com/PagerDuty/terraform-provider-pagerduty/pull/346 to be merged