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

Fix issues with user's teams not set properly and update user's roles #136

Closed
wants to merge 4 commits into from

Conversation

pengux
Copy link
Contributor

@pengux pengux commented Jun 7, 2019

This PR fixes 2 issues:

  1. Teams in the user's resource not set properly, related to r/pagerduty_escalation_policy: correctly set teams #129
  2. Fix acceptance tests not passing because of updated list of user roles

Acceptance test

TF_ACC=1 go test -run TestAccPagerDutyUser_Basic ./pagerduty -v -timeout 120m
=== RUN   TestAccPagerDutyUser_Basic
--- PASS: TestAccPagerDutyUser_Basic (18.44s)
PASS
ok      github.com/terraform-providers/terraform-provider-pagerduty/pagerduty   18.468s
TF_ACC=1 go test -run TestAccPagerDutyTeamMembership_Basic ./pagerduty -v -timeout 120m
=== RUN   TestAccPagerDutyTeamMembership_Basic
--- PASS: TestAccPagerDutyTeamMembership_Basic (16.71s)
PASS
ok      github.com/terraform-providers/terraform-provider-pagerduty/pagerduty   16.746s

Step to reproduce the issue:

Using terraform

Example HCL

resource "pagerduty_user" "foo" {
  name = "Foo"
  email = "foo@foo.com"
  teams = ["${pagerduty_team.foo.id}"]
}

resource "pagerduty_team" "foo" {
  name        = "Foo"
  description = "foo"
}

Setup user and team in Pagerduty based on the configuration from the HCL above.
Import the terraform HCL above with terraform import
Doing a terraform plan now shows a difference where the team information was not imported

Peter Nguyen and others added 4 commits June 5, 2019 11:38
@ghost ghost added the size/XS label Jun 7, 2019
@heimweh
Copy link
Collaborator

heimweh commented Jul 12, 2019

Hi @pengux,

sorry for the delay here. Thank you so much for this! 🙏

We recently merged https://github.com/terraform-providers/terraform-provider-pagerduty/pull/135, which removed the ValidateFunc altogether so that should hopefully fix the observer issue.

Thanks once again and sorry for the delay 🙏

@pengux
Copy link
Contributor Author

pengux commented Jul 17, 2019

Hi @pengux,

sorry for the delay here. Thank you so much for this! 🙏

We recently merged #135, which removed the ValidateFunc altogether so that should hopefully fix the observer issue.

Thanks once again and sorry for the delay 🙏

@heimweh Sounds good, but what about the bug where teams is not properly set for the user resource which this PR also address?

@heimweh
Copy link
Collaborator

heimweh commented Jul 18, 2019

Hi @pengux,

that change is fine and happy to merge it! 👌

@pengux
Copy link
Contributor Author

pengux commented Jul 19, 2019

Closing as #138 replaces this PR

@pengux pengux closed this Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants