iLert / terraform-provider-ilert

ilert's Terraform provider
https://registry.terraform.io/providers/iLert/ilert/latest/docs
Other
9 stars 1 forks source link

Improvement Suggestion for Discord #91

Open SpawW opened 3 months ago

SpawW commented 3 months ago

In last months the updates in terraform module improve telegram and microsoft teams support and now, for both tools, we don't need more to use an separated alert_connector to create the alert_action.

I like to suggest to add an "discord_webhook" argument like the recent "microsoft_teams_webhook".

So we can have an block configuration like this...

resource "ilert_alert_action" "dev_discord" {
...
  discord_webhook {
    url = "https://discord.com/api/webhooks/123"
  }
  connector {
    type = "discord"
  }
 ...
}

Instead of this:

resource "ilert_alert_action" "dev_discord" {

...
  connector {
    id   = ilert_connector.dev_discord.id
    type = ilert_connector.dev_discord.type
  }
 ...
 }

 resource "ilert_connector" "dev_discord" {
  name = "dev/discord"
  type = "discord"
  discord {
    url = "https://discord.com/api/webhooks/123"
  }
}

With this the terraform files will be more easy to build and maintain and you can do the deduplication of connectors to avoid duplicate configurations inside ilert platform.

krystianity commented 3 months ago

Thanks for the suggestion @SpawW it definitely makes sense to go for this when we further introduce a real discord bot. I dont know if we will have a standlone webhook version before introducing the Discord bot.