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

Add validation to Escalation Policy Teams: MaxItems 1 #412

Merged
merged 1 commit into from Oct 21, 2021

Conversation

stmcallister
Copy link
Contributor

The PagerDuty API doesn't allow more than one team to be associated with an escalation policy. The provider would run a successful plan but then fail on apply. This change catches that condition during the plan.

Test results:

TF_ACC=1 go test -run "TestAccPagerDutyEscalationPolicy" ./pagerduty -v -timeout 120m
=== RUN   TestAccPagerDutyEscalationPolicy_import
--- PASS: TestAccPagerDutyEscalationPolicy_import (10.53s)
=== RUN   TestAccPagerDutyEscalationPolicy_Basic
--- PASS: TestAccPagerDutyEscalationPolicy_Basic (13.03s)
=== RUN   TestAccPagerDutyEscalationPolicyWithTeams_Basic
--- PASS: TestAccPagerDutyEscalationPolicyWithTeams_Basic (12.50s)
PASS
ok  	github.com/terraform-providers/terraform-provider-pagerduty/pagerduty	36.604s

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

Successfully merging this pull request may close these issues.

None yet

2 participants