Compare commits
No commits in common. "add-dns" and "main" have entirely different histories.
5 changed files with 4 additions and 35 deletions
|
|
@ -57,11 +57,7 @@ Please refer to official STACKIT [documentation](https://docs.stackit.cloud/stac
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
As for now, the Cloud Foundry organization and the Stage you deploy into have to be created beforehand.
|
As for now, the Cloud Foundry organization and the Stage you deploy into have to be created beforehand.
|
||||||
You will also need to create an organization manager in order to use STACKIT or custom domains.
|
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).
|
||||||
This can be done via STACKIT [API](https://docs.api.stackit.cloud/documentation/scf/version/v1).
|
|
||||||
If you want to use the org manager inside a Cloud Foundry space, you will need to assign the `SpaceDeveloper` role. This can also be done via [API](https://docs.api.stackit.cloud/documentation/scf/version/v1#tag/Space-Roles/operation/createSpaceRole).
|
|
||||||
|
|
||||||
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).
|
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,4 @@ docker_username = "<DOCKER-USERNAME>"
|
||||||
docker_password = "<DOCKER-PASSWORD>"
|
docker_password = "<DOCKER-PASSWORD>"
|
||||||
cf_app_name = "<NAME-OFF-YOUR-APP>"
|
cf_app_name = "<NAME-OFF-YOUR-APP>"
|
||||||
cf_org_name = "<NAME-OF-YOUR-CLOUD-FOUNDRY-ORGANIZATION>"
|
cf_org_name = "<NAME-OF-YOUR-CLOUD-FOUNDRY-ORGANIZATION>"
|
||||||
cf_space_name = "<NAME-OF-YOUR-CLOUD-FOUNDRY-SPACE>"
|
cf_space_name = "<NAME-OF-YOUR-CLOUD-FOUNDRY-SPACE>"
|
||||||
app_domain = "<YOUR-APP-DOMAIN>"
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
resource "stackit_dns_zone" "cloudfoundry-tf" {
|
|
||||||
dns_name = "cloudfoundry-tf.stackit.gg"
|
|
||||||
name = "cloudfoundry-tf"
|
|
||||||
project_id = var.project_id
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "stackit_dns_record_set" "versatiles" {
|
|
||||||
name = var.app_domain
|
|
||||||
type = "ALIAS"
|
|
||||||
project_id = var.project_id
|
|
||||||
zone_id = stackit_dns_zone.cloudfoundry-tf.zone_id
|
|
||||||
# the alias record must point to cf api url
|
|
||||||
records = ["console.apps.01.cf.eu01.stackit.cloud."]
|
|
||||||
}
|
|
||||||
|
|
@ -7,11 +7,6 @@ data "cloudfoundry_space" "space" {
|
||||||
org = data.cloudfoundry_org.org.id
|
org = data.cloudfoundry_org.org.id
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "cloudfoundry_domain" "versatiles" {
|
|
||||||
name = var.app_domain
|
|
||||||
org = data.cloudfoundry_org.org.id
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "cloudfoundry_app" "versatiles" {
|
resource "cloudfoundry_app" "versatiles" {
|
||||||
name = var.cf_app_name
|
name = var.cf_app_name
|
||||||
space_name = data.cloudfoundry_space.space.name
|
space_name = data.cloudfoundry_space.space.name
|
||||||
|
|
@ -23,10 +18,8 @@ resource "cloudfoundry_app" "versatiles" {
|
||||||
health_check_type = "http"
|
health_check_type = "http"
|
||||||
health_check_http_endpoint = "/"
|
health_check_http_endpoint = "/"
|
||||||
docker_image = var.docker_image
|
docker_image = var.docker_image
|
||||||
routes = [{
|
random_route = true
|
||||||
route = cloudfoundry_domain.versatiles.name
|
strategy = "rolling"
|
||||||
}]
|
|
||||||
strategy = "rolling"
|
|
||||||
docker_credentials = {
|
docker_credentials = {
|
||||||
username = var.docker_username
|
username = var.docker_username
|
||||||
password = var.docker_password
|
password = var.docker_password
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,6 @@ variable "cf_app_name" {
|
||||||
default = "versatiles"
|
default = "versatiles"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "app_domain" {
|
|
||||||
type = string
|
|
||||||
description = "FQDN for the versatiles app."
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "tiles_url" {
|
variable "tiles_url" {
|
||||||
type = string
|
type = string
|
||||||
description = "The url of the tiles file."
|
description = "The url of the tiles file."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue