Apply requested changes

This commit is contained in:
Daniel_Groß 2025-09-05 09:42:39 +02:00
parent bafd9ab432
commit 377450a663
Signed by: daniel.gross
SSH key fingerprint: SHA256:tyyj1WVL1JmKHP6+jZjOtTzMj9U13qRk7jUcGI/zkRQ
2 changed files with 18 additions and 6 deletions

View file

@ -62,8 +62,20 @@ In order to create Cloud Foundry resources automatically, you will need a servic
### Deployment
Change to the `terraform` directory.
Create a `.tfvars` file and insert the required terraform variables, see [variables.tf](./terraform/variables.tf).
Create a `.tfvars` file and insert the required terraform variables, see [variables.tf](./terraform/variables.tf):
```
project_id = "<YOUR-PROJECT-ID>"
service_account_key_path = "<PATH-TO-YOUR-SA-KEY>"
cf_user = "<CLOUD-FOUNDRY-USER-MAIL>"
cf_password = "<CLOUD-FOUNDRY-USER-PASSWORD>"
tiles_url = "<https://<YOUR-BUCKET>.object.storage.eu01.onstackit.cloud/osm.versatiles>"
docker_image = "<DOCKER-IMAGE-URL>"
docker_username = "<DOCKER-USERNAME>"
docker_password = "<DOCKER-PASSWORD>"
cf_app_name = "<NAME-OFF-YOUR-APP>"
cf_org_name = "<NAME-OF-YOUR-CLOUD-FOUNDRY-ORGANIZATION>"
cf_space_name = "<NAME-OF-YOUR-CLOUD-FOUNDRY-SPACE>"
```
Call `terraform apply --var-file=<PATH-TO-TFVARS-FILE>`.

View file

@ -8,7 +8,7 @@ data "cloudfoundry_space" "space" {
}
resource "cloudfoundry_app" "versatiles" {
name = var.cf_app_name
name = var.cf_app_name
space_name = data.cloudfoundry_space.space.name
org_name = data.cloudfoundry_org.org.name
memory = "2G"
@ -17,7 +17,7 @@ resource "cloudfoundry_app" "versatiles" {
command = "versatiles serve -p $PORT -s frontend-dev.br.tar ${var.tiles_url}"
health_check_type = "http"
health_check_http_endpoint = "/"
docker_image = var.docker_image
docker_image = var.docker_image
docker_credentials = {
username = var.docker_username
password = var.docker_password