add-network-policy - Cloud Foundry CLI Reference Guide


NAME

add-network-policy - Create policy to allow direct network traffic from one app to another

USAGE

cf add-network-policy SOURCE_APP --destination-app DESTINATION_APP [-s DESTINATION_SPACE_NAME [-o DESTINATION_ORG_NAME]] [--protocol (tcp | udp) --port RANGE]

EXAMPLES

cf add-network-policy frontend --destination-app backend --protocol tcp --port 8081 cf add-network-policy frontend --destination-app backend -s backend-space -o backend-org --protocol tcp --port 8080-8090

OPTIONS

--destination-app

Name of app to connect to

--port

Port or range of ports for connection to destination app (Default: 8080)

--protocol

Protocol to connect apps with (Default: tcp)

-o

The org of the destination app (Default: targeted org)

-s

The space of the destination app (Default: targeted space)

SEE ALSO

apps, network-policies, remove-network-policy