Deploys the "Grafana + Prometheus + Loki" monitoring stack via Helm on AWS EKS.
Example:
module "monitoring" {
source = "github.com/andreswebs/terraform-aws-eks-monitoring"
cluster_oidc_provider = var.eks_cluster_oidc_provider
loki_iam_role_name = "loki-${var.eks_cluster_id}"
loki_compactor_iam_role_name = "loki-compactor-${var.eks_cluster_id}"
grafana_iam_role_name = "grafana-${var.eks_cluster_id}"
loki_storage_s3_bucket_name = var.loki_storage_s3_bucket_name
chart_version_loki_distributed = var.chart_version_loki_distributed
chart_version_promtail = var.chart_version_promtail
chart_version_prometheus = var.chart_version_prometheus
grafana_enabled = true
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
chart_version_fluent_bit | Chart version | string |
null |
no |
chart_version_grafana | Chart version | string |
null |
no |
chart_version_loki | Chart version | string |
null |
no |
chart_version_loki_distributed | Chart version | string |
null |
no |
chart_version_metrics_server | Chart version | string |
null |
no |
chart_version_prometheus | Chart version | string |
null |
no |
chart_version_promtail | Chart version | string |
null |
no |
cluster_oidc_provider | OpenID Connect (OIDC) Identity Provider associated with the Kubernetes cluster | string |
"" |
no |
create_loki_storage | Create S3 bucket for Loki storage? | bool |
false |
no |
create_loki_storage_id_suffix | Append a random identifier string suffix to the Loki storage S3 bucket name? | bool |
false |
no |
create_loki_storage_kms_key | Create KMS key? | bool |
true |
no |
grafana_enabled | Enable Grafana? | bool |
false |
no |
grafana_k8s_sa_name | Name of the Kubernetes service account for Grafana | string |
"grafana" |
no |
k8s_namespace | Name of the Kubernetes namespace to which resources will be deployed | string |
"monitoring" |
no |
loki_aggregator | Loki aggregator to install, must be either promtail or fluent-bit |
string |
"promtail" |
no |
loki_compactor_k8s_sa_name | Name of the Kubernetes service account for the Loki compactor | string |
"loki-compactor" |
no |
loki_enabled | Enable Loki? | bool |
true |
no |
loki_k8s_sa_name | Name of the Kubernetes service account for Loki components | string |
"loki" |
no |
loki_mode | Loki mode, must be either single or distributed |
string |
"distributed" |
no |
loki_storage_expiration_days | Number of days to retain objects; 0 means never expire |
number |
0 |
no |
loki_storage_kms_key_arn | (Optional) ARN of KMS key used to encrypt bucket objects; ignored if create_kms_key is set to true |
string |
null |
no |
loki_storage_kms_key_deletion_window_in_days | KMS key deletion window in days | number |
30 |
no |
loki_storage_kms_key_enable_rotation | Enable KMS key rotation? | bool |
true |
no |
loki_storage_s3_bucket_name | Name of S3 bucket used for Loki storage | string |
"" |
no |
loki_storage_s3_force_destroy | Force destroy bucket when running terraform destroy ? |
bool |
false |
no |
metrics_server_enabled | Enable Metrics Server? | bool |
true |
no |
prometheus_enabled | Enable Prometheus? | bool |
true |
no |
Name | Source | Version |
---|---|---|
iam | ./modules/iam | n/a |
log_storage | ./modules/storage | n/a |
resources | ./modules/resources | n/a |
Name | Description |
---|---|
namespace | The name (metadata.name ) of the namespace |
Name | Version |
---|---|
random | >= 3.1.0 |
Name | Version |
---|---|
terraform | >= 1.0.0 |
aws | >= 3.48.0 |
helm | >= 2.2.0 |
random | >= 3.1.0 |
Name | Type |
---|---|
random_id.id | resource |
Andre Silva - @andreswebs
This project is licensed under the Unlicense.