Skip to content

Instantly share code, notes, and snippets.

@guivin
Last active November 1, 2020 18:57
Show Gist options
  • Save guivin/e4a4fcd3ac9051d035e04c95bad4fcf2 to your computer and use it in GitHub Desktop.
Save guivin/e4a4fcd3ac9051d035e04c95bad4fcf2 to your computer and use it in GitHub Desktop.
helm_terraform_example_prometheus
resource "helm_release" "prometheus" {
chart = "prometheus"
name = "prometheus"
namespace = var.namespace
repository = "https://prometheus-community.github.io/helm-charts"
# When you want to directly specify the value of an element in a map you need \\ to escape the point.
set {
name = "podSecurityPolicy\\.enabled"
value = true
}
set {
name = "server\\.persistentVolume\\.enabled"
value = false
}
set {
name = "server\\.resources"
# You can provide a map of value using yamlencode
value = yamlencode({
limits = {
cpu = "200m"
memory = "50Mi"
}
requests = {
cpu = "100m"
memory = "30Mi"
}
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment