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

service_incident_rule uses required string service_id #334

Open
Benbentwo opened this issue Sep 22, 2022 · 0 comments
Open

service_incident_rule uses required string service_id #334

Benbentwo opened this issue Sep 22, 2022 · 0 comments

Comments

@Benbentwo
Copy link

Terraform Version

v1.2.5

Affected Resource(s)

  • service_incident_rule

Terraform Configuration Files

resource "opsgenie_team" "test" {
  name        = "example-team"
  description = "This team deals with all the things, where incidents are >= P2"
}
resource "opsgenie_service_incident_rule" "test" {
  service_id = null # deal with all services, don't mark incident as immediately impacting a service
  incident_rule {
    condition_match_type = "match-all-condition"
    conditions {
        field = "priority"
        operation = "greater-than"
        expected_value = "P3"
    }
    incident_properties {
        message = "This is an incident message"
        priority = "P1"
        stakeholder_properties {
            message = "Message for stakeholders"
            enable = "true"
        }
    }
  }
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

Based on the web API ServiceId should be an array, allowing us to specify multiple services as affected by a rule. e.g. if DB goes down, both FE and BE are impacted. Similarly, an empty array means no services are immediately impacted, but we mark it as an incident for higher priority, post mortems etc.

Actual Behavior

A team incident ruleset cannot be created via API because service_id must be set, and is a string that is non-nullable.

Steps to Reproduce

N/A - API limitation

Important Factoids

N/A

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

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

1 participant