Skip to content

Commit

Permalink
Added ignore_members variable and use it in opsgenie_team resource (#3)
Browse files Browse the repository at this point in the history
* Added ignore_members variable and use it in opsgenie_team resource

* switched to passing `ignore_members` in with team block
  • Loading branch information
bergbrains authored Aug 17, 2020
1 parent 6106246 commit 73d4c2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 3 additions & 2 deletions examples/complete/team.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ module "team" {
opsgenie_provider_api_key = var.opsgenie_provider_api_key

team = {
name = module.label.id
description = "team-description"
name = module.label.id
description = "team-description"
ignore_members = var.ignore_members
}
}

Expand Down
6 changes: 6 additions & 0 deletions examples/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ variable "opsgenie_team" {
description = "This variable is used to configure opsgenie team."
default = {}
}

variable "ignore_members" {
type = bool
description = "Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI"
default = false
}
5 changes: 3 additions & 2 deletions modules/team/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ provider "opsgenie" {
}

resource "opsgenie_team" "this" {
name = var.team.name
description = try(var.team.description, var.team.name)
name = var.team.name
description = try(var.team.description, var.team.name)
ignore_members = try(var.team.ignore_members, false)
}

0 comments on commit 73d4c2f

Please sign in to comment.