Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/philips-labs/terraform-cloudfoundry-grafana

Terraform module to deploy a Grafana instance to Cloud foundry
https://github.com/philips-labs/terraform-cloudfoundry-grafana

cloudfoundry grafana terraform

Last synced: about 7 hours ago
JSON representation

Terraform module to deploy a Grafana instance to Cloud foundry

Awesome Lists containing this project

README

        

# terraform-cloudfoundry-grafana

Deploys a Grafana instance to Cloud foundry

# Usages

Checkout the example in [examples/default](./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](#requirement\_terraform) | >= 1.3.0 |
| [cloudfoundry](#requirement\_cloudfoundry) | >= 0.50.6 |
| [hsdp](#requirement\_hsdp) | >= 0.42.1 |

## Providers

| Name | Version |
|------|---------|
| [cloudfoundry](#provider\_cloudfoundry) | >= 0.50.6 |
| [hsdp](#provider\_hsdp) | >= 0.42.1 |
| [random](#provider\_random) | n/a |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [cloudfoundry_app.grafana](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/app) | resource |
| [cloudfoundry_app.pg_exporter](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/app) | resource |
| [cloudfoundry_network_policy.grafana](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/network_policy) | resource |
| [cloudfoundry_route.grafana](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/route) | resource |
| [cloudfoundry_route.pg_exporter](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/route) | resource |
| [cloudfoundry_service_instance.database](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/service_instance) | resource |
| [cloudfoundry_service_key.database_key](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/service_key) | resource |
| [hsdp_iam_client.grafana](https://registry.terraform.io/providers/philips-software/hsdp/latest/docs/resources/iam_client) | resource |
| [random_password.client_password](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
| [random_uuid.client_uuid](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/uuid) | resource |
| [cloudfoundry_domain.domain](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/data-sources/domain) | data source |
| [cloudfoundry_domain.internal](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/data-sources/domain) | data source |
| [cloudfoundry_service.rds](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/data-sources/service) | data source |
| [hsdp_config.cf](https://registry.terraform.io/providers/philips-software/hsdp/latest/docs/data-sources/config) | data source |
| [hsdp_config.iam](https://registry.terraform.io/providers/philips-software/hsdp/latest/docs/data-sources/config) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [auto\_assign\_org\_role](#input\_auto\_assign\_org\_role) | The default role to assign to auto signup users | `string` | `"Viewer"` | no |
| [cf\_domain\_name](#input\_cf\_domain\_name) | The CF domain to use for Grafana | `string` | `""` | no |
| [cf\_space\_id](#input\_cf\_space\_id) | The id of the CF Space to deploy in | `string` | n/a | yes |
| [db\_broker](#input\_db\_broker) | The Database broker to use for requesting a PostgreSQL database | `string` | `"hsdp-rds"` | no |
| [db\_json\_params](#input\_db\_json\_params) | Optional DB JSON params | `string` | `"{}"` | no |
| [db\_plan](#input\_db\_plan) | The Database plan to use | `string` | `"postgres-micro-dev"` | no |
| [disk](#input\_disk) | The amount of Disk space to allocate for Grafana (MB) | `number` | `1024` | no |
| [docker\_password](#input\_docker\_password) | Docker registry password | `string` | `""` | no |
| [docker\_username](#input\_docker\_username) | Docker registry username | `string` | `""` | no |
| [email\_domains](#input\_email\_domains) | Allowed email domains for accessing Grafana | `list(string)` |

[
"philips.com"
]
| no |
| [enable\_postgres](#input\_enable\_postgres) | Enable or disables postgres persistence | `bool` | `true` | no |
| [environment](#input\_environment) | Environment variables for Grafana app | `map(any)` | `{}` | no |
| [grafana\_image](#input\_grafana\_image) | Grafana Docker image to use | `string` | `"grafana/grafana:10.2.2"` | no |
| [grafana\_password](#input\_grafana\_password) | The Grafana password to use | `string` | n/a | yes |
| [grafana\_service\_bindings](#input\_grafana\_service\_bindings) | A list of service instances that should be bound to the grafana app | `list(object({ service_instance = string }))` | `[]` | no |
| [grafana\_username](#input\_grafana\_username) | The Grafana username to use | `string` | n/a | yes |
| [iam\_application\_id](#input\_iam\_application\_id) | The IAM application ID to create the OAuth2 client. If provided, Grafana will use IAM for authentication | `string` | `""` | no |
| [memory](#input\_memory) | The amount of RAM to allocate for Grafana (MB) | `number` | `512` | no |
| [name\_postfix](#input\_name\_postfix) | The postfix string to append to the hostname, prevents namespace clashes | `string` | n/a | yes |
| [network\_policies](#input\_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](#input\_oauth2\_client\_id) | The OAuth2 client ID to use for Grafana integration with IAM | `string` | `""` | no |
| [oauth2\_client\_password](#input\_oauth2\_client\_password) | The OAuth2 client password to use for Grafana integration with IAM | `string` | `""` | no |
| [oauth\_allow\_signup](#input\_oauth\_allow\_signup) | Allow automatic signup when OAuth2 is enabled | `bool` | `false` | no |
| [pg\_exporter\_image](#input\_pg\_exporter\_image) | n/a | `string` | `"quay.io/prometheuscommunity/postgres-exporter:latest"` | no |
| [strategy](#input\_strategy) | The deployment strategy to use | `string` | `"rolling"` | no |

## Outputs

| Name | Description |
|------|-------------|
| [grafana\_database\_metrics\_app\_id](#output\_grafana\_database\_metrics\_app\_id) | The metrics app ID |
| [grafana\_database\_metrics\_endpoint](#output\_grafana\_database\_metrics\_endpoint) | The internal metrics endpoint for the Grafana database |
| [grafana\_database\_metrics\_host](#output\_grafana\_database\_metrics\_host) | The Grafana metrics internal hostname |
| [grafana\_database\_metrics\_port](#output\_grafana\_database\_metrics\_port) | The Grafana metrics internal port |
| [grafana\_endpoint](#output\_grafana\_endpoint) | The endpoint where Grafana is reachable on |
| [grafana\_id](#output\_grafana\_id) | The Grafana app ID |

# Contact / Getting help

Please post your questions on the HSDP Slack `#terraform` channel

# License
[License](./LICENSE.md) is MIT