-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MON-459: Bump to HCL 2 syntax / tf 0.12.1
- Loading branch information
Showing
288 changed files
with
6,115 additions
and
5,971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
module "filter-tags" { | ||
source = "../../../common/filter-tags" | ||
|
||
environment = "${var.environment}" | ||
environment = var.environment | ||
resource = "ark" | ||
filter_tags_use_defaults = "${var.filter_tags_use_defaults}" | ||
filter_tags_custom = "${var.filter_tags_custom}" | ||
filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" | ||
filter_tags_use_defaults = var.filter_tags_use_defaults | ||
filter_tags_custom = var.filter_tags_custom | ||
filter_tags_custom_excluded = var.filter_tags_custom_excluded | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
resource "datadog_monitor" "ark_schedules_monitor" { | ||
count = "${var.ark_schedules_enabled == "true" ? 1 : 0}" | ||
count = var.ark_schedules_enabled == "true" ? 1 : 0 | ||
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Ark backup failed" | ||
type = "query alert" | ||
message = "${coalesce(var.ark_schedules_monitor_message, var.message)}" | ||
message = coalesce(var.ark_schedules_monitor_message, var.message) | ||
|
||
query = <<EOQ | ||
sum(${var.ark_schedules_monitor_timeframe}):min:ark.ark_backup_failure_total${module.filter-tags.query_alert} by {schedule}.as_count() > 1 | ||
EOQ | ||
EOQ | ||
|
||
thresholds { | ||
thresholds = { | ||
critical = 1 | ||
warning = 0 | ||
warning = 0 | ||
} | ||
|
||
evaluation_delay = "${var.evaluation_delay}" | ||
new_host_delay = "${var.new_host_delay}" | ||
no_data_timeframe = "${var.ark_schedules_monitor_no_data_timeframe}" | ||
evaluation_delay = var.evaluation_delay | ||
new_host_delay = var.new_host_delay | ||
no_data_timeframe = var.ark_schedules_monitor_no_data_timeframe | ||
|
||
notify_no_data = true | ||
renotify_interval = 0 | ||
notify_audit = false | ||
timeout_h = 0 | ||
include_tags = true | ||
locked = false | ||
notify_no_data = true | ||
renotify_interval = 0 | ||
notify_audit = false | ||
timeout_h = 0 | ||
include_tags = true | ||
locked = false | ||
require_full_window = false | ||
|
||
tags = ["env:${var.environment}", "type:caas", "provider:prometheus", "resource:ark", "team:claranet", "created-by:terraform", "${var.ark_schedules_extra_tags}"] | ||
tags = ["env:${var.environment}", "type:caas", "provider:prometheus", "resource:ark", "team:claranet", "created-by:terraform", var.ark_schedules_extra_tags] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
output "ark_schedules_monitor_id" { | ||
description = "id for monitor ark_schedules_monitor" | ||
value = "${datadog_monitor.ark_schedules_monitor.*.id}" | ||
value = datadog_monitor.ark_schedules_monitor.*.id | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
terraform { | ||
required_version = ">= 0.12" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
module "filter-tags" { | ||
source = "../../../common/filter-tags" | ||
|
||
environment = "${var.environment}" | ||
environment = var.environment | ||
resource = "kubernetes" | ||
filter_tags_use_defaults = "${var.filter_tags_use_defaults}" | ||
filter_tags_custom = "${var.filter_tags_custom}" | ||
filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" | ||
filter_tags_use_defaults = var.filter_tags_use_defaults | ||
filter_tags_custom = var.filter_tags_custom | ||
filter_tags_custom_excluded = var.filter_tags_custom_excluded | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
resource "datadog_monitor" "apiserver" { | ||
count = "${var.apiserver_enabled == "true" ? 1 : 0}" | ||
count = var.apiserver_enabled == "true" ? 1 : 0 | ||
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Kubernetes API server does not respond" | ||
message = "${coalesce(var.apiserver_message, var.message)}" | ||
message = coalesce(var.apiserver_message, var.message) | ||
|
||
type = "service check" | ||
|
||
query = <<EOQ | ||
"kube_apiserver_controlplane.up"${module.filter-tags.service_check}.last(6).count_by_status() | ||
EOQ | ||
EOQ | ||
|
||
thresholds = { | ||
warning = "${var.apiserver_threshold_warning}" | ||
warning = var.apiserver_threshold_warning | ||
critical = 5 | ||
} | ||
|
||
new_host_delay = "${var.new_host_delay}" | ||
notify_no_data = true | ||
renotify_interval = 0 | ||
notify_audit = false | ||
timeout_h = 0 | ||
include_tags = true | ||
locked = false | ||
new_host_delay = var.new_host_delay | ||
notify_no_data = true | ||
renotify_interval = 0 | ||
notify_audit = false | ||
timeout_h = 0 | ||
include_tags = true | ||
locked = false | ||
require_full_window = true | ||
|
||
tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.apiserver_extra_tags}"] | ||
tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", var.apiserver_extra_tags] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
output "apiserver_id" { | ||
description = "id for monitor apiserver" | ||
value = "${datadog_monitor.apiserver.*.id}" | ||
value = datadog_monitor.apiserver.*.id | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
terraform { | ||
required_version = ">= 0.12" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
module "filter-tags" { | ||
source = "../../../../common/filter-tags" | ||
|
||
environment = "${var.environment}" | ||
environment = var.environment | ||
resource = "ingress" | ||
filter_tags_use_defaults = "${var.filter_tags_use_defaults}" | ||
filter_tags_custom = "${var.filter_tags_custom}" | ||
filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" | ||
filter_tags_use_defaults = var.filter_tags_use_defaults | ||
filter_tags_custom = var.filter_tags_custom | ||
filter_tags_custom_excluded = var.filter_tags_custom_excluded | ||
extra_tags_excluded = ["upstream:upstream-default-backend"] | ||
} | ||
|
||
module "filter-tags-5xx" { | ||
source = "../../../../common/filter-tags" | ||
|
||
environment = "${var.environment}" | ||
environment = var.environment | ||
resource = "ingress" | ||
filter_tags_use_defaults = "${var.filter_tags_use_defaults}" | ||
filter_tags_custom = "${var.filter_tags_custom}" | ||
filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" | ||
filter_tags_use_defaults = var.filter_tags_use_defaults | ||
filter_tags_custom = var.filter_tags_custom | ||
filter_tags_custom_excluded = var.filter_tags_custom_excluded | ||
extra_tags = ["status_code:5xx"] | ||
extra_tags_excluded = ["upstream:upstream-default-backend"] | ||
} | ||
|
||
module "filter-tags-4xx" { | ||
source = "../../../../common/filter-tags" | ||
|
||
environment = "${var.environment}" | ||
environment = var.environment | ||
resource = "ingress" | ||
filter_tags_use_defaults = "${var.filter_tags_use_defaults}" | ||
filter_tags_custom = "${var.filter_tags_custom}" | ||
filter_tags_custom_excluded = "${var.filter_tags_custom_excluded}" | ||
filter_tags_use_defaults = var.filter_tags_use_defaults | ||
filter_tags_custom = var.filter_tags_custom | ||
filter_tags_custom_excluded = var.filter_tags_custom_excluded | ||
extra_tags = ["status_code:4xx"] | ||
extra_tags_excluded = ["upstream:upstream-default-backend"] | ||
} | ||
|
Oops, something went wrong.