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

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

Terraform module for deploying Kong API gateway to Cloud foundry
https://github.com/philips-labs/terraform-cloudfoundry-kong

api-gateway cloudfoundry kong terraform

Last synced: 5 months ago
JSON representation

Terraform module for deploying Kong API gateway to Cloud foundry

Awesome Lists containing this project

README

          

# terraform-cloudfoundry-kong

Deploys a Kong API gateway to Cloud foundry

## Terraform module registry

The module is [published here](https://registry.terraform.io/modules/philips-labs/kong/cloudfoundry/latest)

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13.4 |
| [cloudfoundry](#requirement\_cloudfoundry) | >= 0.14.1 |
| [htpasswd](#requirement\_htpasswd) | >= 0.5.0 |

## Providers

| Name | Version |
|------|---------|
| [archive](#provider\_archive) | n/a |
| [cloudfoundry](#provider\_cloudfoundry) | >= 0.14.1 |
| [hsdp](#provider\_hsdp) | n/a |
| [htpasswd](#provider\_htpasswd) | >= 0.5.0 |
| [local](#provider\_local) | n/a |
| [random](#provider\_random) | n/a |

## Modules

| Name | Source | Version |
|------|--------|---------|
| [postgres](#module\_postgres) | philips-labs/postgres-service/hsdp | 0.3.0 |

## Resources

| Name | Type |
|------|------|
| [cloudfoundry_app.kong](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/app) | resource |
| [cloudfoundry_app.kong_api_proxy](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/app) | resource |
| [cloudfoundry_network_policy.kong](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/network_policy) | resource |
| [cloudfoundry_network_policy.kong_api_proxy](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/network_policy) | resource |
| [cloudfoundry_route.kong](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/route) | resource |
| [cloudfoundry_route.kong_api_route](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/route) | resource |
| [cloudfoundry_route.kong_internal](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/resources/route) | resource |
| [htpasswd_password.hash](https://registry.terraform.io/providers/loafoe/htpasswd/latest/docs/resources/password) | resource |
| [local_file.nginx_conf](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [local_file.nginx_htpasswd](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [random_password.password](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
| [random_pet.deploy](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource |
| [archive_file.fixture](https://registry.terraform.io/providers/hashicorp/archive/latest/docs/data-sources/file) | data source |
| [cloudfoundry_domain.domain](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/data-sources/domain) | data source |
| [cloudfoundry_domain.internal_domain](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/data-sources/domain) | data source |
| [cloudfoundry_org.org](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/data-sources/org) | data source |
| [cloudfoundry_space.space](https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs/data-sources/space) | data source |
| [hsdp_config.cf](https://registry.terraform.io/providers/philips-software/hsdp/latest/docs/data-sources/config) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [cf\_domain\_name](#input\_cf\_domain\_name) | The CF domain to use for Kong | `string` | `""` | no |
| [cf\_org\_name](#input\_cf\_org\_name) | The CF Org to deploy under | `string` | n/a | yes |
| [cf\_space\_name](#input\_cf\_space\_name) | The CF Space to deploy in | `string` | n/a | yes |
| [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 Kong (MB) | `number` | `1024` | no |
| [docker\_password](#input\_docker\_password) | Docker registry password | `string` | `""` | no |
| [docker\_username](#input\_docker\_username) | Docker registry username | `string` | `""` | no |
| [enable\_postgres](#input\_enable\_postgres) | Enable or disables postgres persistence | `bool` | `false` | no |
| [enable\_protected\_admin\_api](#input\_enable\_protected\_admin\_api) | Enables the ADMIN API for use by e.g. Kong provider | `bool` | `false` | no |
| [environment](#input\_environment) | Environment variables for Kong app | `map(any)` | `{}` | no |
| [hostnames](#input\_hostnames) | The list of hostnames to use for the gateway | `list(string)` | `[]` | no |
| [kong\_autoscaler\_config](#input\_kong\_autoscaler\_config) | The Variant autoscaling configuration for Kong |

list(object({
min = number
max = number
query = string
expr = string
}))
|
[
{
"expr": "query_result > 80",
"max": 5,
"min": 2,
"query": "avg(avg_over_time(cpu{guid=\"{{ guid }}\"}[{{ window }}]))"
}
]
| no |
| [kong\_declarative\_config\_string](#input\_kong\_declarative\_config\_string) | Declarative configuration json for Kong. To be provided while running in db less declarative mode | `string` | `"{\"_format_version\":\"1.1\", \"services\":[{\"host\":\"go-hello-world.eu-west.philips-healthsuite.com\",\"port\":443,\"protocol\":\"https\", \"routes\":[{\"paths\":[\"/\"]}]}],\"plugins\":[{\"name\":\"prometheus\"}]}"` | no |
| [kong\_image](#input\_kong\_image) | Kong Docker image to use | `string` | `"kong/kong:3.5.0"` | no |
| [kong\_nginx\_worker\_processes](#input\_kong\_nginx\_worker\_processes) | Number of worker processes to use. When increase this, also increase memory allocation | `number` | `4` | no |
| [kong\_plugins](#input\_kong\_plugins) | List of plugins to load | `list(string)` |
[
"bundled"
]
| no |
| [memory](#input\_memory) | The amount of RAM to allocate for Kong (MB) | `number` | `1024` | no |
| [name\_postfix](#input\_name\_postfix) | The postfix string to append to the hostname, prevents namespace clashes | `string` | `""` | no |
| [network\_policies](#input\_network\_policies) | The container-to-container network policies to create with Kong as the source app |
list(object({
destination_app = string
protocol = string
port = string
}))
| `[]` | no |
| [start\_command](#input\_start\_command) | Explicit Docker startup command | `string` | `""` | no |
| [strategy](#input\_strategy) | Deployment strategy, 'none' or 'blue-green', default is 'none' | `string` | `"none"` | no |

## Outputs

| Name | Description |
|------|-------------|
| [kong\_api\_endpoint](#output\_kong\_api\_endpoint) | The API endpoint where Kong admin API reachable on |
| [kong\_api\_password](#output\_kong\_api\_password) | The API password |
| [kong\_api\_username](#output\_kong\_api\_username) | The API username |
| [kong\_app\_id](#output\_kong\_app\_id) | The Kong app id |
| [kong\_endpoints](#output\_kong\_endpoints) | The endpoint where Kong is reachable on |

## Contact / Getting help

Please post your questions on the HSDP Slack `#terraform` channel, or start a [discussion](https://github.com/philips-labs/terraform-cloudfoundry-kong/discussions)

## License

License is MIT