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

Addressing pagerduty_slack_connection unable to set "No Priority" vs "Any Priority" for priorities configuration #519

Conversation

imjaroiswebdev
Copy link
Contributor

@imjaroiswebdev imjaroiswebdev commented Jun 2, 2022

Addressing #456

After validating the behaviour of PagerDuty's API in regards of configuring the priorities for Slack Connection resource and comparing it with the current capabilities of our TF Provider, I could make sure that there ware no way to configure a No Priority priorities setting sticking to the interface of the PagerDuty's API. So it was necessary to add a more explicit way to achieve this configuration. As a result We end up making a little upgrade to the priorities attribute interface:

  • priorities - (Optional) Allows you to filter events by priority. Needs to be an array of PagerDuty priority IDs. Available through pagerduty_priority data source.
    • When omitted or set to an empty array ([]) in the configuration for a Slack Connection, its default behaviour is to set priorities to No Priority value.
    • When set to ["*"] its corresponding value for priorities in Slack Connection's configuration will be Any Priority.

Screen Shot 2022-06-09 at 00 30 11

Test results:

Copy link
Contributor

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! Love the idea of adding the * syntax! Thank you!! 👍 🌮 🎉

@stmcallister stmcallister merged commit 09bfd7c into PagerDuty:master Jun 9, 2022
@mrwacky42
Copy link
Contributor

Is it me, or is this a breaking change? It looks like the default value is the opposite of the old default value.

 resource "pagerduty_slack_connection" "slack" {
        id                = "<redacted>"
        # (7 unchanged attributes hidden)

!       config {
!           priorities = [
-               "*",
            ]
            # (1 unchanged attribute hidden)
        }
    }

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.

3 participants