mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 18:26:50 +02:00
Added thanos options to terraform
This commit is contained in:
@@ -116,6 +116,12 @@ resource "hcloud_server" "manager" {
|
||||
hcloud_token_enabled : var.hcloud_token_enabled
|
||||
hcloud_token : var.hcloud_token
|
||||
hcloud_namespace : var.hcloud_namespace
|
||||
thanos_enabled : var.thanos_enabled
|
||||
thanos_namespace : var.thanos_namespace
|
||||
s3_bucket_name : var.thanos_s3_bucket_name
|
||||
aws_region_name : var.aws_region_name
|
||||
aws_access_key : var.aws_access_key
|
||||
aws_secret_key : var.aws_secret_key
|
||||
}))
|
||||
argocd_ha_values : base64encode(file("${path.module}/templates/helm/argocd-values-ha.yaml"))
|
||||
argocd_values : base64encode(file("${path.module}/templates/helm/argocd-values.yaml"))
|
||||
|
||||
@@ -10,3 +10,10 @@ hcloud:
|
||||
enabled: ${hcloud_token_enabled}
|
||||
token: ${hcloud_token}
|
||||
namespace: {$hcloud_namespace}
|
||||
thanos:
|
||||
enabled: ${thanos_enabled}
|
||||
namespace: ${thanos_namespace}
|
||||
bucketName: ${s3_bucket_name}
|
||||
awsRegion: ${aws_region_name}
|
||||
accessKey: ${aws_access_key}
|
||||
secretKey: ${aws_secret_key}
|
||||
|
||||
@@ -173,3 +173,36 @@ variable "hcloud_namespace" {
|
||||
type = string
|
||||
default = "hcloud"
|
||||
}
|
||||
|
||||
variable "thanos_enabled" {
|
||||
description = "If true, a namespace configured by thanos_namespace will be created and thanos object store config with provided access key and secret key will be created"
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
variable "thanos_namespace" {
|
||||
description = "Namespace for thanos sidecar in Prometheus"
|
||||
type = string
|
||||
default = "observability"
|
||||
}
|
||||
variable "thanos_s3_bucket_name" {
|
||||
description = "Name of the S3 bucket to store data from thanos in. If thanos is enabled, it must be overriden and filled."
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
variable "aws_region_name" {
|
||||
description = "AWS region in which the bucket resides."
|
||||
type = string
|
||||
default = "eu-central-1"
|
||||
}
|
||||
variable "aws_access_key" {
|
||||
description = "AWS access key to retrieve/store data in the bucket. Must be filled if thanos is enabled."
|
||||
type = string
|
||||
default = ""
|
||||
sensitive = true
|
||||
}
|
||||
variable "aws_secret_key" {
|
||||
description = "AWS secret key to retrieve/store data in the bucket. Must be filled if thanos is enabled"
|
||||
type = string
|
||||
default = ""
|
||||
sensitive = true
|
||||
}
|
||||
Reference in New Issue
Block a user