I am unable to set Alert & Notification in Stackdriver. Able to configure Notification channel and Uptime Check using Terraform. Below are the codes I am using.
resource "google_monitoring_notification_channel" "basic" {
display_name = "Test Notification Channel"
type = "email"
labels = {
email_address = "fakeid007@gmail.com"
}
project = "department1"
}
resource "google_monitoring_uptime_check_config" "http" {
display_name = "01 - Website uptime check [global]"
timeout = "10s"
period = "60s"
project = "department1"
http_check {
path = "/"
port = "80"
mask_headers = null
use_ssl = null
validate_ssl = null
request_method = "GET"
}
monitored_resource {
type = "uptime_url"
labels = {
host = "35.184.98.16"
}
}
}
But I am not able to figure out the below part, which is possible with manual intervention.
In the picture you can see that the notification channel I created with terraform is visible.
Request to help me automate the Alert & Notification also.
