Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitting limit of the pager duty API in fetching user for team membership #288

Closed
tgsoverly opened this issue Jan 7, 2021 · 3 comments
Closed

Comments

@tgsoverly
Copy link

tgsoverly commented Jan 7, 2021

I think what is happening:

Since the pager duty api has a limit of 100 users when fetching, if your team has more than 100 users, the membership resource always comes back as "non existent". This causes several operations to fail, including import and create for me.

Terraform Version

Terraform v0.13.4
+ provider registry.terraform.io/hashicorp/aws v3.22.0
+ provider registry.terraform.io/pagerduty/pagerduty v1.8.0

Affected Resource(s)

Please list the resources as a list, for example:

  • team_membership

Debug Output

Command:

TF_LOG=DEBUG tf import 'pagerduty_team_membership.engineer_company_team["First Last"]' PHJ0AA:PSV0AA

Output

2021-01-07T13:38:27.031-0500 [DEBUG] plugin.terraform-provider-pagerduty_v1.8.0: 2021/01/07 13:38:27 [WARN] Removing PHHJ6YN:PSV4ANO since the user: PHHJ6YN is not a member of: PSV4ANO

However both those IDs do exist and that membership does exist.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Have a team with more than 100 users.
  2. Try to add the alphabetically last user to a team.
@tgsoverly tgsoverly changed the title Hitting limit of the pager duty API in fetching user Hitting limit of the pager duty API in fetching user for team membership Jan 14, 2021
@stmcallister
Copy link
Contributor

Thanks for pointing this out! As you mentioned, it appears the library that is getting team_memberships is not supporting the pagination of the endpoint. Will add this fix to my queue. I'm also open to PRs. :)

Sorry for the delayed response.

@stmcallister
Copy link
Contributor

This should be available in v1.9.4 of the provider.

@stmcallister
Copy link
Contributor

Going to close this. Please reopen if this issue is not resolved for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants