How to Create New Teams in OpsGenie
As your company grows, you'll need a streamlined way to configure new teams with alerting on specific resources. This guide demonstrates how to use the opsgenie-team
component to create a new team in OpsGenie. By tagging resources appropriately, you can ensure that alerts are directed to the right team through Datadog.
Problem
As a company grows so does its number of teams. We need a way to be easily able to configure a new team with alerting on particular resources.
Solution
The opsgenie-team component can be used as a virtual component to create a new team.
TL;DR
Create a new opsgenie-team component. Then tag resources with the team: <my-new-team-name>
to start sending alerts through datadog.
Prerequisites
Basic Configuration
components:
terraform:
opsgenie-team-sre:
component: opsgenie-team
vars:
enabled: true
# Name of the team and the name of the team tag value
# Teams must be globally unique
name: sre
description: "SRE team"
# Services can only be owned by a single team, so we put the services with the team
# Service names are globally unique or will conflict with other teams
# Services may not map directly to github repos, as multiple microservices might make up one service
services:
frontend:
description: "Front End Lorem Ipsum"
backend:
description: "Back End Lorem Ipsum"
members:
- user: [email protected]
role: admin
integrations: {}
routing_rules: {}
Tagging
Resources should then be tagged with the team:team
name tag. This would look like
components:
terraform:
aurora-postgres:
vars:
tags:
team: sre
service: aurora-postgres