Skip to content

Commit

Permalink
Fix variable path for getting target id
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed May 13, 2024
1 parent 68c5f26 commit 190fb24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions domain/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locals {
service_name = (var.name == "" ? "${data.cloudfoundry_app.app[0].name}-${var.domain_name}" : var.name)
endpoint = (var.host_name != null ? "${var.host_name}.${var.domain_name}" : var.domain_name)
target_apps = (var.app_name_or_id != null ? [var.app_name_or_id] : var.app_names_or_ids)
service_name = (var.name == "" ? "${data.cloudfoundry_app.app[local.target_apps[0]].name}-${var.domain_name}" : var.name)
}

data "cloudfoundry_space" "space" {
Expand Down Expand Up @@ -35,7 +35,7 @@ resource "cloudfoundry_route" "origin_route" {
dynamic "target" {
for_each = data.cloudfoundry_app.app
content {
app = target.id
app = target.value.id
}
}
}
Expand Down

0 comments on commit 190fb24

Please sign in to comment.