terraform-provider-opsgenie
terraform-provider-opsgenie copied to clipboard
Maintain Slack Integrations in Terraform
Affected Resource(s)
- opsgenie_api_integration
- opsgenie_integration_action
Terraform Configuration Files
import {
to = opsgenie_api_integration.monitoring_dev_integration
id = "<someGuid>"
}
resource "opsgenie_api_integration" "monitoring_dev_integration" {
name = "Slack (#monitoring-dev)"
type = "SlackApp"
enabled = true
}
According to https://github.com/opsgenie/terraform-provider-opsgenie/issues/102 Slack Integrations cannot be managed with Terraform as creation requires user input. However, you can import existing SlackApp integration as a opsgenie_api_integration . The question is if it's possible to do anything useful with that. opsgenie_api_integration itself doesn't allow specifying a filter block which appears to be a property of a Slack Integration in the UI. It is possible to add opsgenie_integration_action to the imported Slack integration.
resource "opsgenie_integration_action" "monitoring_dev_action" {
integration_id = opsgenie_api_integration.monitoring_dev_integration.id
...
But it appears that it just breaks the UI and does nothing useful.
Of course none of this is documented nor officially supported but my question is can we get at least some support for Slack Integration definitions in Terraform? Even if Integrations themselves are created via UI and have to be imported can they be made configurable and removable in Terraform?