Setup for Prometheus + Thanos on Cloudfoundry. This provides a path towards unlimited metrics storage. This module deploys a number of apps and services to provide Thanos
- Deploys a Thanos instance with S3 Bucket as storage
- Variant sidecar for scrape target and rule discovery
- Alertmanager support
- Teams notification support
module "thanos" {
source = "philips-labs/thanos/cloudfoundry"
version = "4.2.0"
cf_org_name = var.cf_org_name
cf_space_id = var.cf_space_id
cf_functional_account = {
api_endpoint = var.cf_api_url
username = var.cf_username
password = var.cf_password
}
}
Name | Version |
---|---|
terraform | >= 0.13.0 |
cloudfoundry | >= 0.14.2 |
hsdp | >= 0.18.1 |
random | >= 2.2.1 |
Name | Version |
---|---|
cloudfoundry | >= 0.14.2 |
hsdp | >= 0.18.1 |
random | >= 2.2.1 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
alertmanager_config | Alertmanager config | string |
"" |
no |
alertmanager_image | Image to use for Alertmanager | string |
"prom/alertmanager:v0.23.0" |
no |
cf_functional_account | Configuration for the CloudFoundry function account. Required for variant and if enable_cf_exporter is set to true | object({ |
{ |
no |
cf_org_name | Cloudfoundry ORG name to use for reverse proxy | string |
n/a | yes |
cf_paas_exporter_disk_quota | CF PaaS Exporter disk quota | number |
100 |
no |
cf_paas_exporter_image | Image to use for cf paas exporter. Use a v* tagged version to prevent automatic updates | string |
"philipslabs/paas-prometheus-exporter:latest" |
no |
cf_paas_exporter_memory | CF PaaS Exporter memory | number |
256 |
no |
cf_space_id | Cloudfoundry SPACE id to use for deploying all Thanos components. | string |
n/a | yes |
docker_password | Docker registry password | string |
"" |
no |
docker_username | Docker registry username | string |
"" |
no |
enable_cf_exporter | Enable the CloudFoundry metrics exporter and scrape it from Thanos | bool |
false |
no |
environment | Pass environment variable to the app | map(any) |
{} |
no |
name_postfix | The postfix string to append to the space, hostname, etc. Prevents namespace clashes | string |
"" |
no |
teams_incoming_webhook_url | Teams incoming webhook URL | string |
"" |
no |
tenants | The list of tenants to scrape. When an app does not specify tenant then 'default' is used | list(string) |
[ |
no |
thanos_disk_quota | Thanos disk quota | number |
5000 |
no |
thanos_extra_config | Any extra yaml config that will be merged into the prometheus config at runtime. Extra targets can be added here. | string |
"" |
no |
thanos_file_sd_url | A URL that exposes a prometheus file_sd yaml file will be periodically downloaded and used for service discovery | string |
"" |
no |
thanos_image | Image to use for Thanos app. Use a v* tagged version to prevent automatic updates | string |
"philipslabs/cf-thanos:v4.3.6" |
no |
thanos_memory | Thanos memory | number |
1024 |
no |
thanos_public_endpoints | Make Thanos public endpoint | bool |
false |
no |
thanos_query_image | Image to use for Thanos query. Use a v* tagged version to prevent automatic updates | string |
"philipslabs/cf-thanos:v4.3.6" |
no |
thanos_store_disk_quota | Thanos store disk quota | number |
5000 |
no |
thanos_store_image | Image to use for Thanos store. Use a v* tagged version to prevent automatic updates | string |
"philipslabs/cf-thanos:v4.3.6" |
no |
thanos_store_memory | Thanos store memory | number |
1536 |
no |
Name | Description |
---|---|
alertmanager_app_id | App id of Alertmanager |
alertmanager_internal_endpoint | Internal route of alertmanager |
postfix | Cluster ID / Postfix of Thanos deployment |
thanos_app_id | App id for Thanos |
thanos_endpoint | URL of Thanos deployment |
thanos_query_app_id | App id for Thanos Query |
thanos_query_endpoint | URL of Thanos query deployment |
thanos_space_id | Cloud foundry space ID of Thanos |
thanos_store_app_id | App id for Thanos Store |
thanos_store_endpoint | Internal only URL of Thanos store deployment |
Please post your questions on the HSDP Slack #terraform
channel, or start a discussion
License is MIT