Skip to content

Commit

Permalink
feat: add availability as an option (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 authored Dec 2, 2022
1 parent 9a43092 commit 84ef32c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions modules/slo-native/dynamic.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,17 @@ resource "google_monitoring_slo" "slo" {
dynamic "basic_sli" {
for_each = local.type == "basic_sli" ? ["yes"] : []
content {
latency {
threshold = local.latency_threshold
dynamic "latency" {
for_each = local.latency_threshold != null ? ["yes"] : []
content {
threshold = local.latency_threshold
}
}
dynamic "availability" {
for_each = local.latency_threshold == null ? ["yes"] : []
content {
enabled = true
}
}
}
}
Expand Down

0 comments on commit 84ef32c

Please sign in to comment.