fiddle with container networking

This commit is contained in:
Kenneth Kehl
2025-10-15 10:34:38 -07:00
parent e6763bbf35
commit 6838f94c7a

View File

@@ -1,20 +1,21 @@
data "cloudfoundry_space" "space" { data "cloudfoundry_space" "space" {
org_name = var.cf_org_name
name = var.cf_space_name name = var.cf_space_name
} }
data "cloudfoundry_app" "source_app" { data "cloudfoundry_app" "source_app" {
name_or_id = var.source_app_name org_name = var.cf_org_name
space = data.cloudfoundry_space.space.id name = var.source_app_name
space_name = data.cloudfoundry_space.space.id
} }
data "cloudfoundry_app" "destination_app" { data "cloudfoundry_app" "destination_app" {
name_or_id = var.destination_app_name name = var.destination_app_name
space = data.cloudfoundry_space.space.id space_name = data.cloudfoundry_space.space.id
} }
resource "cloudfoundry_network_policy" "internal_route" { resource "cloudfoundry_network_policy" "internal_route" {
policy { policies {
source_app = data.cloudfoundry_app.source_app.id source_app = data.cloudfoundry_app.source_app.id
destination_app = data.cloudfoundry_app.destination_app.id destination_app = data.cloudfoundry_app.destination_app.id
port = var.destination_port port = var.destination_port