/terraform-prometheus-grafana-k8s

Terraform module enabling the deployment of Prometheus and Grafana on Kubernetes

Primary LanguageHCLApache License 2.0Apache-2.0

Requirements

Name Version
terraform >= 0.13
helm >= 2.0.2
k8s >= 0.9.0
kubernetes >= 2.0.2

Providers

Name Version
helm >= 2.0.2
k8s >= 0.9.0
kubernetes >= 2.0.2

Modules

No modules.

Resources

Name Type
helm_release.prometheus resource
k8s_manifest.grafana_addon resource
k8s_manifest.grafana_cm_addon resource
k8s_manifest.grafana_dp_addon resource
k8s_manifest.grafana_svc_addon resource
k8s_manifest.prometheus resource
k8s_manifest.prometheus_crds resource
kubernetes_cluster_role.prometheus resource
kubernetes_cluster_role_binding.prometheus resource
kubernetes_namespace.monitoring_namespace resource
kubernetes_service_account.prometheus resource

Inputs

Name Description Type Default Required
alert_managers List of service for alerts management
list(object({
namespace = string,
name = string,
port = string
}))
[] no
create_monitoring_namespace Create namespace or use existing one bool true no
grafana_configmaps Map of configmaps for grafana dasboard map(any) {} no
grafana_container_port grafana container port number 3000 no
grafana_service_type Service type for the grafana string "ClusterIP" no
grafana_subpath Grafana subpath string "" no
grafana_svc_annotations Map of string(string) containing a set of annotations to add to the grafana's service map(string)
{
"cloud.google.com/load-balancer-type": "Internal"
}
no
grafana_svc_port grafana service port number 3000 no
kubernetes_node_selector Node selector to control where pods are deployed map(string) {} no
monitoring_namespace Namespace name string "monitoring-system" no
pod_monitor_match_label_selector Map for label selector used to select pod to watch map(string) {} no
prometheus_operator_log_level Log level for prometheus operator string "info" no
prometheus_operator_release_name Release name for the prometheus operator string "prometheus" no
prometheus_operator_watched_namespaces List of namespaces watched by the operator list(string) [] no
prometheus_resource_instance_name Name of the prometheus resource instance string "prometheus" no
prometheus_resource_log_level Log level for prometheus resource instance string "info" no
prometheus_stack_config prometheus stack chart helm configuration map(string) {} no
rule_match_label_selector Map for label selector used to select prometheus rules to watch map(string) {} no
service_monitor_match_label_selector Map for label selector used to select service monitors to watch map(string) {} no

Outputs

Name Description
prometheus_release_name Prometheus release name
prometheus_release_namespace Prometheus namespace
wait_for_provisioned Addons