diff --git a/docs/data-sources/region.md b/docs/data-sources/region.md index f5d11102..6472f08b 100644 --- a/docs/data-sources/region.md +++ b/docs/data-sources/region.md @@ -10,7 +10,17 @@ description: |- Scalingo Region metadata +## Example Usage +```terraform +data "scalingo_region" "osc-fr1" { + name = "osc-fr1" +} + +output "scalingo_dashboard" { + value = scalingo_region.osc-fr1.dashboard +} +``` ## Schema diff --git a/docs/resources/notifier.md b/docs/resources/notifier.md index 010f364d..25ab6fd8 100644 --- a/docs/resources/notifier.md +++ b/docs/resources/notifier.md @@ -25,11 +25,34 @@ data_source "scalingo_notification_platform" "slack" { # application resource "scalingo_notifier" "all_events" { app = scalingo_app.test_app.id + name = "Slack Audit Notifier" platform_id = data_source.scalingo_notification_platform.slack.id - webhook_id = "https://hooks.slack.com/services/..." + + active = true + send_all_events = true + webhook_url = "https://hooks.slack.com/services/..." +} + +# Create a notifier to get emails for all alerts and only selected critical +# events on the application +data_source "scalingo_notification_platform" "email" { + name = "email" +} +resource "scalingo_notifier" "all_events" { + app = scalingo_app.test_app.id name = "Email Audit Notifier" - send_all_events = true + platform_id = data_source.scalingo_notification_platform.email.id + + send_all_alerts = true + selected_events = [ + "addon_deleted", + "addon_suspended", + "app_crashed_repeated", + "domain_removed", + "notifier_removed", + "variable_removed", + ] emails = ["ops@example.com"] } ```