From 081a0c36bfab7ba8ba2d2f0632346556e0850385 Mon Sep 17 00:00:00 2001 From: Daniel Gross Date: Fri, 5 Sep 2025 09:53:44 +0200 Subject: [PATCH] Create an example var file --- README.md | 16 +--------------- terraform/.tfvars.example | 11 +++++++++++ terraform/main.tf | 4 ++-- terraform/provider.tf | 2 +- terraform/variables.tf | 2 +- 5 files changed, 16 insertions(+), 19 deletions(-) create mode 100644 terraform/.tfvars.example diff --git a/README.md b/README.md index 3856e3b..41c7c6d 100644 --- a/README.md +++ b/README.md @@ -62,20 +62,6 @@ 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): - -``` -project_id = "" -service_account_key_path = "" -cf_user = "" -cf_password = "" -tiles_url = ".object.storage.eu01.onstackit.cloud/osm.versatiles>" -docker_image = "" -docker_username = "" -docker_password = "" -cf_app_name = "" -cf_org_name = "" -cf_space_name = "" -``` +Create a `.tfvars` file and insert the required terraform variables, see [.tfvars.example](./terraform/.tfvars.example): Call `terraform apply --var-file=`. diff --git a/terraform/.tfvars.example b/terraform/.tfvars.example new file mode 100644 index 0000000..b3a24a2 --- /dev/null +++ b/terraform/.tfvars.example @@ -0,0 +1,11 @@ +project_id = "" +service_account_key_path = "" +cf_user = "" +cf_password = "" +tiles_url = ".object.storage.eu01.onstackit.cloud/osm.versatiles>" +docker_image = "" +docker_username = "" +docker_password = "" +cf_app_name = "" +cf_org_name = "" +cf_space_name = "" \ No newline at end of file diff --git a/terraform/main.tf b/terraform/main.tf index dbe43ad..b7a8957 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -18,10 +18,10 @@ resource "cloudfoundry_app" "versatiles" { health_check_type = "http" health_check_http_endpoint = "/" docker_image = var.docker_image + random_route = true + strategy = "rolling" docker_credentials = { username = var.docker_username password = var.docker_password } - random_route = true - strategy = "rolling" } diff --git a/terraform/provider.tf b/terraform/provider.tf index b7fb738..4241340 100644 --- a/terraform/provider.tf +++ b/terraform/provider.tf @@ -16,7 +16,7 @@ provider "stackit" { } provider "cloudfoundry" { - api_url = "https://api.system.01.cf.eu01.stackit.cloud" + api_url = "https://api.system.01.cf.eu01.stackit.cloud" user = var.cf_user password = var.cf_password } \ No newline at end of file diff --git a/terraform/variables.tf b/terraform/variables.tf index 2a29c77..43c1ec5 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -6,7 +6,7 @@ variable "project_id" { variable "service_account_key_path" { type = string description = "Path to your service account key." - sensitive = true + sensitive = true } variable "cf_user" {