Last active
November 1, 2020 18:57
-
-
Save guivin/e4a4fcd3ac9051d035e04c95bad4fcf2 to your computer and use it in GitHub Desktop.
helm_terraform_example_prometheus
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
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