Skip to content

Schedule's Teams' IDs (ordering?) recurring replace #1001

@kevinwedwards

Description

@kevinwedwards

PagerDuty v3.23.1

When you get the state of a schedule that is related to multiple teams, I believe the team IDs are ordered. This causes issues when comparing expected state to current state.

Our TF Code:

resource "pagerduty_schedule" "pd_sched_gmic_helios_schedule1" {
.....
teams = [pagerduty_team.team1.id, pagerduty_team.team2.id]
}

Every plan/apply we get this:
# pagerduty_schedule.pd_schedudule will be updated in-place
~ resource "pagerduty_schedule" "pd_schedudule" {
id = "P2W357J"
name = "ScheduleName"
~ teams = [
- "P8KOKBP",
"PUCXHGT",
+ "P8KOKBP",
]
# (3 unchanged attributes hidden)

    # (1 unchanged block hidden)
}

AWS Provider had a similar issue here:
https://stackoverflow.com/questions/68870558/make-terraform-ignore-the-order-of-list-items-returned-from-the-service

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions