-
Notifications
You must be signed in to change notification settings - Fork 87
resource_network_policy
ArthurHlt edited this page Aug 31, 2020
·
3 revisions
Provides a Cloud Foundry resource for managing Cloud Foundry network policies to manage access between applications via container-to-container networking.
The following creates container to container access policy between the given applications.
resource "cf_network_policy" "my-policy" {
policy {
source_app = cf_app.app1.id
destination_app = cf_app.app2.id
port = "8080-8090"
}
policy {
source_app = cf_app.app1.id
destination_app = cf_app.app3.id
port = "9999"
protocol = "udp"
}
}
The following arguments are supported:
-
policy
- (Required, List) List of policies that allow direct network traffic from one app to another.-
source_app
- (Required, String) The ID of the application to connect from. -
destination_app
- (Required, String) The ID of the application to connect to. -
port
- (Required, String) Port (8080) or range of ports (8080-8085) for connection to destination app -
protocol
- (Optional, String) One of 'udp' or 'tcp' identifying the allowed protocol for the access. Default is 'tcp'.
-
The following attributes are exported along with any defaults for the inputs attributes.
-
id
- The GUID of the network_policy
The current Network policy can be imported using the network_policy
, e.g.
$ terraform import cf_network_policy.my-policy a-guid
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_domain
- cloudfoundry_info
- cloudfoundry_isolation_segment
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_route
- cloudfoundry_router_group
- cloudfoundry_service
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_stack
- cloudfoundry_user
- cloudfoundry_user_provided_service
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_buildpack
- cloudfoundry_default_asg
- cloudfoundry_domain
- cloudfoundry_evg
- cloudfoundry_feature_flag
- cloudfoundry_isolation_segment
- cloudfoundry_isolation_segment_entitlement
- cloudfoundry_network_policy
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_org_users
- cloudfoundry_private_domain_access
- cloudfoundry_route
- cloudfoundry_route_service_binding
- cloudfoundry_service_broker
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_service_plan_access
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_space_users
- cloudfoundry_user
- cloudfoundry_user_provided_service