Skip to content

Commit 71ff02f

Browse files
feat(google_monitoring): add selected_regions option to uptime check (#225)
1 parent df4c61e commit 71ff02f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

google_monitoring/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ No modules.
2626
| Name | Description | Type | Default | Required |
2727
|------|-------------|------|---------|:--------:|
2828
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | n/a | `string` | n/a | yes |
29-
| <a name="input_uptime_checks"></a> [uptime\_checks](#input\_uptime\_checks) | n/a | <pre>list(object({<br> name = string<br> host = string<br> path = string<br> request_method = optional(string, "GET")<br> content_type = optional(string)<br> custom_content_type = optional(string)<br> body = optional(string)<br> timeout = optional(string, "60s")<br> period = optional(string, "300s")<br> user_labels = optional(map(string), {})<br><br> accepted_response_status_codes = optional(list(object({<br> status_value = number<br> })), [])<br><br> accepted_response_status_classes = optional(list(object({<br> status_class = string<br> })), [])<br><br> content_matchers = optional(list(object({<br> content = optional(string)<br> matcher = optional(string)<br> })), [])<br> }))</pre> | `[]` | no |
29+
| <a name="input_uptime_checks"></a> [uptime\_checks](#input\_uptime\_checks) | n/a | <pre>list(object({<br> name = string<br> host = string<br> path = string<br> request_method = optional(string, "GET")<br> content_type = optional(string)<br> custom_content_type = optional(string)<br> body = optional(string)<br> timeout = optional(string, "60s")<br> period = optional(string, "300s")<br> user_labels = optional(map(string), {})<br> selected_regions = optional(list(string), [])<br><br> accepted_response_status_codes = optional(list(object({<br> status_value = number<br> })), [])<br><br> accepted_response_status_classes = optional(list(object({<br> status_class = string<br> })), [])<br><br> content_matchers = optional(list(object({<br> content = optional(string)<br> matcher = optional(string)<br> })), [])<br> }))</pre> | `[]` | no |
3030

3131
## Outputs
3232

google_monitoring/uptime_checks.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
resource "google_monitoring_uptime_check_config" "https" {
22
for_each = { for uptime_check in var.uptime_checks : uptime_check.name => uptime_check }
33

4-
display_name = each.value.name
5-
timeout = each.value.timeout
6-
period = each.value.period
7-
user_labels = each.value.user_labels
4+
display_name = each.value.name
5+
timeout = each.value.timeout
6+
period = each.value.period
7+
user_labels = each.value.user_labels
8+
selected_regions = each.value.selected_regions
89

910
http_check {
1011
path = each.value.path

google_monitoring/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ variable "uptime_checks" {
1414
timeout = optional(string, "60s")
1515
period = optional(string, "300s")
1616
user_labels = optional(map(string), {})
17+
selected_regions = optional(list(string), ["EUROPE", "USA_OREGON", "USA_VIRGINIA"])
1718

1819
accepted_response_status_codes = optional(list(object({
1920
status_value = number

0 commit comments

Comments
 (0)