terraform-provider-opsgenie icon indicating copy to clipboard operation
terraform-provider-opsgenie copied to clipboard

[feature request] New data source - opsgenie_teams

Open babbottscott opened this issue 3 years ago • 0 comments

OpsGenie API endpoint

GET /v2/teams

Returned data

[
  {
    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "name": "Database",
    "description": "DBA Team",
    "links": {
      "web": "https://app.opsgenie.com/teams/dashboard/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/main",
      "api": "https://api.opsgenie.com/v2/teams/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
  },
  {
    "id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
    "name": "Security",
    "description": "Security Team",
    "links": {
      "web": "https://app.opsgenie.com/teams/dashboard/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/main",
      "api": "https://api.opsgenie.com/v2/teams/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"
    }
  }, ...
]

Suggested Arguments

  • filter - Optional, May specify multiple. Map of { key = "name", values = [ "matchstring1", "matchstring2" ]} to return only teams matching criteria. Otherwise, return full list

Attributes

  • teams - List of team entries, { name, id }

babbottscott avatar Sep 08 '22 19:09 babbottscott