Skip to content

Commit

Permalink
Completed transformation from manifest to resource block.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-jameson committed Dec 12, 2024
1 parent 6c7d1ca commit 421b0cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 8 additions & 2 deletions terraform/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ resource "cloudfoundry_service_instance" "elasticsearch" {
###
resource "cloudfoundry_app" "tdp-frontend" {
space = "tanf-dev"
for_each = toset(var.dev_app_names)
for_each = toset(var.test_app_names)
name = "tdp-frontend-${each.value}"
buildpack = "https://github.com/cloudfoundry/nginx-buildpack.git#v1.2.6"
memory = 256
Expand All @@ -134,9 +134,12 @@ resource "cloudfoundry_app" "tdp-frontend" {

resource "cloudfoundry_app" "tdp-backend" {
space = "tanf-dev"
for_each = toset(var.dev_app_names)
for_each = toset(var.test_app_names)
name = "tdp-backend-${each.value}"
memory = 2048
disk_quota = 4096
command = "./gunicorn_start.sh cloud"

buildpacks = [
"https://github.com/cloudfoundry/apt-buildpack",
"https://github.com/cloudfoundry/python-buildpack.git#v1.8.3",
Expand All @@ -151,4 +154,7 @@ resource "cloudfoundry_app" "tdp-backend" {
service_binding {
service_instance = cloudfoundry_service_instance.datafiles.id
}
environment = {
REDIS_URI = "redis://localhost:6379"
}
}
6 changes: 6 additions & 0 deletions terraform/dev/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ variable "dev_app_names" {
description = "list of app names deployed in the dev environment"
default = ["a11y", "qasp", "raft"]
}

variable "test_app_names" {
type = list(string)
description = "test names"
default = ["fake"]
}

0 comments on commit 421b0cd

Please sign in to comment.