diff --git a/modules/uptime-check/README.md b/modules/uptime-check/README.md index 277f0a6..44784dd 100644 --- a/modules/uptime-check/README.md +++ b/modules/uptime-check/README.md @@ -117,6 +117,7 @@ No modules. |------|-------------|------|---------|:--------:| | [aggregations](#input\_aggregations) | Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together. |
object({
alignment_period = optional(string, "300s") # The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds.
group_by_fields = optional(list(string), []) # The set of fields to preserve when crossSeriesReducer is specified.
cross_series_reducer = optional(string, "") # The approach to be used to combine time series.
per_series_aligner = optional(string, "ALIGN_COUNT_TRUE") # The approach to be used to align individual time series.
})
|
{
"alignment_period": "60s",
"cross_series_reducer": "",
"group_by_fields": [],
"per_series_aligner": "ALIGN_COUNT"
}
| no | | [alert\_policy\_filter](#input\_alert\_policy\_filter) | A filter that identifies which time series should be compared with the threshold. | `string` | `""` | no | +| [auth\_info](#input\_auth\_info) | The authentication information using username and password. |
object({
username = string # The username to authenticate.
password = string # The password to authenticate.
})
|
{
"password": "",
"username": ""
}
| no | | [auth\_token](#input\_auth\_token) | Slack app bot's token used to integrate GCP notifications with slack channel | `string` | `null` | no | | [channel\_name](#input\_channel\_name) | Slack channel name to which notifications will be sent. | `string` | `null` | no | | [checker\_location](#input\_checker\_location) | Checker location filter for uptime check metric. If specified, this filter will be added to the alert policy config. Can be one of: apac-singapore, eur-belgium, sa-brazil-sao\_paulo, usa-iowa, usa-oregon, usa-virginia. | `string` | `""` | no | diff --git a/modules/uptime-check/main.tf b/modules/uptime-check/main.tf index 7ee0f7d..7311c15 100644 --- a/modules/uptime-check/main.tf +++ b/modules/uptime-check/main.tf @@ -9,7 +9,10 @@ resource "google_monitoring_uptime_check_config" "https" { port = var.http_check.port use_ssl = var.http_check.use_ssl validate_ssl = var.http_check.validate_ssl - + auth_info { + username = var.auth_info.username + password = var.auth_info.password + } accepted_response_status_codes { status_class = var.http_check.status_class status_value = var.http_check.status_value diff --git a/modules/uptime-check/variables.tf b/modules/uptime-check/variables.tf index eb664ea..2fa6f0d 100644 --- a/modules/uptime-check/variables.tf +++ b/modules/uptime-check/variables.tf @@ -169,3 +169,15 @@ variable "documentation_content" { description = "The text of the alert documentation." default = "" } + +variable "auth_info" { + type = object({ + username = string # The username to authenticate. + password = string # The password to authenticate. + }) + description = "The authentication information using username and password." + default = { + username = "" + password = "" + } +}