Skip to content

philips-labs/terraform-cloudfoundry-grafana

Repository files navigation

terraform-cloudfoundry-grafana

Deploys a Grafana instance to Cloud foundry

Usages

Checkout the example in examples/default

Disclaimer

Important

This repository is managed as Philips Inner-source / Open-source. This repository is NOT endorsed or supported by HSSA&P, I&S Cloud Operations and/or the HSP AWS Account team. You are expected to self-support or raise tickets on the Github project and NOT raise tickets in HSP ServiceNow.

Requirements

Name Version
terraform >= 1.3.0
cloudfoundry >= 0.50.6
hsdp >= 0.42.1

Providers

Name Version
cloudfoundry >= 0.50.6
hsdp >= 0.42.1
random n/a

Modules

No modules.

Resources

Name Type
cloudfoundry_app.grafana resource
cloudfoundry_app.pg_exporter resource
cloudfoundry_network_policy.grafana resource
cloudfoundry_route.grafana resource
cloudfoundry_route.pg_exporter resource
cloudfoundry_service_instance.database resource
cloudfoundry_service_key.database_key resource
hsdp_iam_client.grafana resource
random_password.client_password resource
random_uuid.client_uuid resource
cloudfoundry_domain.domain data source
cloudfoundry_domain.internal data source
cloudfoundry_service.rds data source
hsdp_config.cf data source
hsdp_config.iam data source

Inputs

Name Description Type Default Required
auto_assign_org_role The default role to assign to auto signup users string "Viewer" no
cf_domain_name The CF domain to use for Grafana string "" no
cf_space_id The id of the CF Space to deploy in string n/a yes
db_broker The Database broker to use for requesting a PostgreSQL database string "hsdp-rds" no
db_json_params Optional DB JSON params string "{}" no
db_plan The Database plan to use string "postgres-micro-dev" no
disk The amount of Disk space to allocate for Grafana (MB) number 1024 no
docker_password Docker registry password string "" no
docker_username Docker registry username string "" no
email_domains Allowed email domains for accessing Grafana list(string)
[
"philips.com"
]
no
enable_postgres Enable or disables postgres persistence bool true no
environment Environment variables for Grafana app map(any) {} no
grafana_image Grafana Docker image to use string "grafana/grafana:10.2.2" no
grafana_password The Grafana password to use string n/a yes
grafana_service_bindings A list of service instances that should be bound to the grafana app list(object({ service_instance = string })) [] no
grafana_username The Grafana username to use string n/a yes
iam_application_id The IAM application ID to create the OAuth2 client. If provided, Grafana will use IAM for authentication string "" no
memory The amount of RAM to allocate for Grafana (MB) number 512 no
name_postfix The postfix string to append to the hostname, prevents namespace clashes string n/a yes
network_policies The container-to-container network policies to create with Grafana as the source app
list(object({
destination_app = string
protocol = string
port = string
}))
[] no
oauth2_client_id The OAuth2 client ID to use for Grafana integration with IAM string "" no
oauth2_client_password The OAuth2 client password to use for Grafana integration with IAM string "" no
oauth_allow_signup Allow automatic signup when OAuth2 is enabled bool false no
pg_exporter_image n/a string "quay.io/prometheuscommunity/postgres-exporter:latest" no
strategy The deployment strategy to use string "rolling" no

Outputs

Name Description
grafana_database_metrics_app_id The metrics app ID
grafana_database_metrics_endpoint The internal metrics endpoint for the Grafana database
grafana_database_metrics_host The Grafana metrics internal hostname
grafana_database_metrics_port The Grafana metrics internal port
grafana_endpoint The endpoint where Grafana is reachable on
grafana_id The Grafana app ID

Contact / Getting help

Please post your questions on the HSDP Slack #terraform channel

License

License is MIT