add-tf-code #2

Merged
daniel.gross merged 10 commits from add-tf-code into main 2025-09-05 07:55:49 +00:00
Showing only changes of commit bafd9ab432 - Show all commits

View file

@ -57,11 +57,13 @@ Please refer to official STACKIT [documentation](https://docs.stackit.cloud/stac
### Prerequisites
As for now, the Cloud Foundry organization and the Stage you deploy into have to be created beforehand.
Create service account: see the [docs](https://docs.stackit.cloud/stackit/en/how-to-create-cloud-foundry-service-accounts-67772133.html#HowtoCreateCloudFoundryServiceAccounts-StepBySteptotheServiceAccount).
In order to create Cloud Foundry resources automatically, you will need a service account and service key. Please refer to the [docs](https://docs.stackit.cloud/stackit/en/how-to-create-cloud-foundry-service-accounts-67772133.html#HowtoCreateCloudFoundryServiceAccounts-StepBySteptotheServiceAccount).
* `cf create-service space-scoped-service-account space-deployer test-tf`
* `cf create-service-key <SERVICE_ACCOUNT_NAME> <SERVICE_KEY_NAME>`
* retrieve credentials: `cf service-key <SERVICE_ACCOUNT_NAME> <SERVICE_KEY_NAME>`
### Deployment
Change to the `terraform` directory.
Create a `.tfvars` file and insert the required terraform variables, see [variables.tf](./terraform/variables.tf).
Call `terraform apply --var-file=<PATH-TO-TFVARS-FILE>`.