-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add uptime check #4
Conversation
@@ -35,3 +35,7 @@ variable "project_team" { | |||
description = "The team this project belongs to, for billing and reporting purposes, etc" | |||
default = "eq" | |||
} | |||
|
|||
variable "uptime_check_host" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add this to terraform.tfvars.example
since it is mandatory.
display_name = "${var.uptime_check_host}" | ||
timeout = "5s" | ||
period = "60s" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add project = "${var.stackdriver_workspace}"
for this to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Mine worked as my project id is the same as my stackdriver workspace.
monitoring_alerts.tf
Outdated
type = "uptime_url" | ||
|
||
labels = { | ||
project_id = "${var.stackdriver_workspace}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed and I think we should remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, the Terraform doc isn't clear and it's in their example. Removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs an uptime alert policy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you terraform fmt
the files.
Adds the uptime check that is currently manually created in production.
Configuring SSL certificate validation is not currently possible in Terraform - hashicorp/terraform-provider-google-beta#1243.
The conditions config is derived from https://cloud.google.com/monitoring/alerts/policies-in-json.