diff --git a/templates/kubespray/main.tf b/templates/kubespray/main.tf index f72b149..d21e761 100644 --- a/templates/kubespray/main.tf +++ b/templates/kubespray/main.tf @@ -1,5 +1,5 @@ module "cluster" { - source = "github.com/getupcloud/terraform-cluster-kubespray?ref=v4.0.0-beta1" + source = "github.com/getupcloud/terraform-cluster-kubespray?ref=v4.0.0-beta2" # cluster basics customer_name = var.customer_name @@ -14,11 +14,9 @@ module "cluster" { dump_debug = var.dump_debug # monitoring and operations - cronitor_enabled = var.cronitor_enabled - cronitor_pagerduty_key = var.cronitor_pagerduty_key - cronitor_notification_lists = var.cronitor_notification_lists - opsgenie_enabled = var.opsgenie_enabled - teleport_auth_token = var.teleport_auth_token + cronitor_id = var.cronitor_id + opsgenie_integration_api_key = var.opsgenie_integration_api_key + teleport_auth_token = var.teleport_auth_token # flux flux_git_repo = var.flux_git_repo diff --git a/templates/providers-config.tf b/templates/providers-config.tf index 105981d..50b2222 100644 --- a/templates/providers-config.tf +++ b/templates/providers-config.tf @@ -1,11 +1,3 @@ -provider "cronitor" { - api_key = var.cronitor_api_key -} - -provider "opsgenie" { - api_key = var.opsgenie_api_key == "" ? "FAKE" : var.opsgenie_api_key -} - provider "shell" { enable_parallelism = true interpreter = ["/bin/bash", "-c"] diff --git a/templates/requires.tf b/templates/requires.tf index 9f212a3..17de356 100644 --- a/templates/requires.tf +++ b/templates/requires.tf @@ -14,16 +14,6 @@ terraform { version = "< 1" } - cronitor = { - source = "nauxliu/cronitor" - version = "~> 1" - } - - opsgenie = { - source = "opsgenie/opsgenie" - version = "~> 0.6" - } - random = { version = "~> 2" } diff --git a/templates/variables-common.tf b/templates/variables-common.tf index c156907..1d0b0ca 100644 --- a/templates/variables-common.tf +++ b/templates/variables-common.tf @@ -1,28 +1,6 @@ ## Common variables to all providers ## Copy to cluster repo -variable "cronitor_enabled" { - description = "Creates and enables Cronitor monitor." - type = bool - default = false -} - -variable "cronitor_notification_lists" { - description = "Cronitor Notification lists by SLA" - type = any - default = { - high : ["default", "opsgenie-high-sla"] - low : ["default", "opsgenie-low-sla"] - none : [] - } -} - -variable "cronitor_pagerduty_key" { - description = "Cronitor PagerDuty key" - type = string - default = "" -} - variable "cluster_name" { description = "Cluster name" type = string @@ -108,22 +86,22 @@ variable "manifests_template_vars" { } } -variable "modules" { - description = "Configure modules to install" - type = any - default = {} +variable "cronitor_id" { + description = "Cronitor Monitor ID (6 chars key)." + type = string + default = "" } -variable "opsgenie_enabled" { - description = "Creates and enables Opsgenie integration." - type = bool - default = false +variable "opsgenie_integration_api_key" { + description = "Opsgenie integration API key to send alerts." + type = string + default = "" } -variable "opsgenie_team_name" { - description = "Opsgenie Owner team name of the integration." - type = string - default = "Operations" +variable "modules" { + description = "Configure modules to install" + type = any + default = {} } variable "post_create" { diff --git a/templates/variables.tf b/templates/variables.tf index 3ca5062..e69de29 100644 --- a/templates/variables.tf +++ b/templates/variables.tf @@ -1,9 +0,0 @@ -variable "cronitor_api_key" { - description = "Cronitor API key" - type = string -} - -variable "opsgenie_api_key" { - description = "Opsgenie API key to create prometheus integration" - type = string -}