Difference between revisions of "Terraform resource: opsgenie api integration"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
* https://registry.terraform.io/providers/Cyldei/opsgenie/latest/docs/resources/api_integration
 +
 +
<pre>
 +
resource "opsgenie_api_integration" "example-api-integration" {
 +
  name = "api-based-int"
 +
  type = "API"
 +
 +
  responders {
 +
    type = "user"
 +
    id  = "${opsgenie_user.user.id}"
 +
  }
 +
 +
  responders {
 +
    type = "user"
 +
    id  = "${opsgenie_user.fahri.id}"
 +
  }
 +
}
 +
 +
resource "opsgenie_api_integration" "example-api-integration" {
 +
  name = "api-based-int-2"
 +
  type = "Prometheus"
 +
 +
  responders {
 +
    type = "user"
 +
    id  = "${opsgenie_user.user.id}"
 +
  }
 +
 +
  enabled                        = false
 +
  allow_write_access            = false
 +
  ignore_responders_from_payload = true
 +
  suppress_notifications        = true
 +
  owner_team_id                  = "${opsgenie_team.team.id}"
 +
}
 +
 +
resource "opsgenie_api_integration" "test3" {
 +
  name  = "webhook-int"
 +
  type  = "Webhook"
 +
 +
  responders {
 +
    type = "user"
 +
    id  = "${opsgenie_user.user.id}"
 +
  }
 +
  enabled                = false
 +
  allow_write_access      = false
 +
  suppress_notifications  = true
 +
  webhook_url            = "https://api.example.com/v1"
 +
  headers = {
 +
    header1 = value1
 +
  }
 +
}
 +
</pre>
  
  

Latest revision as of 09:48, 25 October 2024

resource "opsgenie_api_integration" "example-api-integration" {
  name = "api-based-int"
  type = "API"

  responders {
    type = "user"
    id   = "${opsgenie_user.user.id}"
  }

  responders {
    type = "user"
    id   = "${opsgenie_user.fahri.id}"
  }
}

resource "opsgenie_api_integration" "example-api-integration" {
  name = "api-based-int-2"
  type = "Prometheus"

  responders {
    type = "user"
    id   = "${opsgenie_user.user.id}"
  }

  enabled                        = false
  allow_write_access             = false
  ignore_responders_from_payload = true
  suppress_notifications         = true
  owner_team_id                  = "${opsgenie_team.team.id}"
}

resource "opsgenie_api_integration" "test3" {
  name  = "webhook-int"
  type  = "Webhook"

  responders {
    type = "user"
    id   = "${opsgenie_user.user.id}"
  }
  enabled                 = false
  allow_write_access      = false
  suppress_notifications  = true
  webhook_url             = "https://api.example.com/v1"
  headers = {
    header1 = value1
  }
}


See also[edit]

Advertising: