opsgenie_team

Manages a Team within OpsGenie.

Example Usage

resource "opsgenie_user" "first" {
  username  = "[email protected]"
  full_name = "Cookie Monster"
  role      = "User"
}

resource "opsgenie_user" "second" {
  username  = "[email protected]"
  full_name = "Dr Ivo Eggman Robotnik"
  role      = "User"
}

resource "opsgenie_team" "test" {
  name        = "example"
  description = "This team deals with all the things"

  member {
    username = "${opsgenie_user.first.username}"
    role     = "admin"
  }

  member {
    username = "${opsgenie_user.second.username}"
    role     = "user"
  }
}

Argument Reference

The following arguments are supported:

  • name - (Required) The name associated with this team. OpsGenie defines that this must not be longer than 100 characters.

  • description - (Optional) A description for this team.

  • member - (Optional) A Member block as documented below.

member supports the following:

  • username - (Required) The username for the member to add to this Team.
  • role - (Required) The role for the user within the Team - can be either 'Admin' or 'User'.

Attributes Reference

The following attributes are exported:

  • id - The ID of the OpsGenie User.

Import

Users can be imported using the id, e.g.

$ terraform import opsgenie_team.team1 812be1a1-32c8-4666-a7fb-03ecc385106c

© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/opsgenie/r/team.html