https://github.com/philips-labs/terraform-cloudfoundry-promregator
Terraform module to deploy promregator to cloudfoundry
https://github.com/philips-labs/terraform-cloudfoundry-promregator
cloudfoundry terraform
Last synced: 7 months ago
JSON representation
Terraform module to deploy promregator to cloudfoundry
- Host: GitHub
- URL: https://github.com/philips-labs/terraform-cloudfoundry-promregator
- Owner: philips-labs
- License: mit
- Created: 2021-01-20T10:22:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-07T14:50:51.000Z (over 4 years ago)
- Last Synced: 2025-01-18T05:30:48.955Z (9 months ago)
- Topics: cloudfoundry, terraform
- Language: HCL
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# terraform-cloudfoundry-promregator
Terraform module to deploy promregator to cloudfoundry.
This module will deploy a promregator instance to cloudfoundry and will configure it to aggregate for the org and space name configured in the settings.
You can configure the targets by adding a map to the promregator_targets property with the properties that you would like to configure for that target. The possible values can be seen in [the promregator config](https://github.com/promregator/promregator/blob/master/docs/config.md)
This module does not configure any internal network policies required to allow promregator or prometheus to connect to the apps being monitored. You will need to configure these manually.
## Example usage
```tf
module "promregator" {
source = "github.com/philips-labs/terraform-cloudfoundry-promregator"domain = "my.domain"
org_name = "my-deployment-org"
space_id = "my-deployment-space-id"
cf_api_host = "api.mycf.com"
cf_username = "myuser"
cf_password = "mypassword"
docker_username = "docker-user"
docker_password = "docker-password"promregator_targets = [{
orgname = "org-to-be-promregated"
spacename = "spacetobepromregated"
protocol = "http"
preferredrouteregex = ".*.apps.internal"
anotherconfig = "my value"
}]
}
```## Requirements
| Name | Version |
| ------------ | ----------- |
| terraform | >= 0.13.0 |
| cloudfoundry | >= 0.1206.0 |## Providers
| Name | Version |
| ------------ | ----------- |
| cloudfoundry | >= 0.1206.0 |
| random | n/a |## Inputs
| Name | Description | Type | Default | Required |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- | --------------------------------- | :------: |
| cf_api_host | The cf api host to use for discovery of the apps in the metrics org and space | `string` | n/a | yes |
| cf_password | Credentials for cf_api_host | `string` | n/a | yes |
| cf_username | Credentials for cf_api_host | `string` | n/a | yes |
| disk_quota | The amount of disk space that should be allocated to the promregator app by CloudFoundry | `number` | `1024` | no |
| docker_password | The docker password used to pull the promregator_docker_image | `string` | `""` | no |
| docker_username | The docker username used to pull the promregator_docker_image | `string` | `""` | no |
| domain | The cf domain that will be used for the route on the promregator app | `string` | `"apps.internal"` | no |
| environment | Environment variables to be passed to the promregator instance. These will be merged with and overwrite the vars set in this module. | `map(any)` | `{}` | no |
| instances | The number of instances of the promregator app to be run | `number` | `1` | no |
| memory | The amount of memory that should be allocated to the app by CloudFoundry | `number` | `512` | no |
| name_postfix | The postfix string to append to the space, hostname, etc. Prevents namespace clashes | `string` | `""` | no |
| network_policies | The container-to-container network policies to create with Promregator as the source app |list(object({| `[]` | no |
destination_app = string
protocol = string
port = string
}))
| org_name | The name of the cf organisation to create the promregator instance in | `string` | n/a | yes |
| promregator_docker_image | The docker image to use for promregator | `string` | `"promregator/promregator:0.8.5"` | no |
| promregator_targets | A list of maps representing the properties of the target to be configured. These are the config values from propergator targets | `list(map(any))` | n/a | yes |
| space_id | The id of the cf space to create the promregator instance in | `string` | n/a | yes |## Outputs
| Name | Description |
| -------------------- | ------------------------------------------- |
| promregator_endpoint | The endpoint where Promregator is reachable |
| promregator_id | The Promregator app id |