1. Registry
  2. Packages
  3. Cloudfoundry Provider
  4. API Docs
  5. ServiceRouteBinding
Viewing docs for cloudfoundry 1.18.0
published on Monday, Nov 2, 2026 by cloudfoundry
cloudfoundry
Viewing docs for cloudfoundry 1.18.0
published on Monday, Nov 2, 2026 by cloudfoundry

    Service route bindings are relations between a service instance and a route.

    Not all service instances support route binding. In order to bind to a managed service instance, the service instance should be created from a service offering that has requires route forwarding (requires=[route_forwarding]). In order to bind to a user-provided service instance, the service instance must have route_service_url set.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const srb7 = new cloudfoundry.ServiceRouteBinding("srb7", {
        serviceInstance: "3a8588f9-f846-444f-ab9e-48282f06449b",
        route: "3966c2fb-d84d-462d-82a5-a81cf7cdab20",
        labels: {
            hi: "fi",
        },
    });
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    srb7 = cloudfoundry.ServiceRouteBinding("srb7",
        service_instance="3a8588f9-f846-444f-ab9e-48282f06449b",
        route="3966c2fb-d84d-462d-82a5-a81cf7cdab20",
        labels={
            "hi": "fi",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudfoundry.NewServiceRouteBinding(ctx, "srb7", &cloudfoundry.ServiceRouteBindingArgs{
    			ServiceInstance: pulumi.String("3a8588f9-f846-444f-ab9e-48282f06449b"),
    			Route:           pulumi.String("3966c2fb-d84d-462d-82a5-a81cf7cdab20"),
    			Labels: pulumi.StringMap{
    				"hi": pulumi.String("fi"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var srb7 = new Cloudfoundry.ServiceRouteBinding("srb7", new()
        {
            ServiceInstance = "3a8588f9-f846-444f-ab9e-48282f06449b",
            Route = "3966c2fb-d84d-462d-82a5-a81cf7cdab20",
            Labels = 
            {
                { "hi", "fi" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.ServiceRouteBinding;
    import com.pulumi.cloudfoundry.ServiceRouteBindingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var srb7 = new ServiceRouteBinding("srb7", ServiceRouteBindingArgs.builder()
                .serviceInstance("3a8588f9-f846-444f-ab9e-48282f06449b")
                .route("3966c2fb-d84d-462d-82a5-a81cf7cdab20")
                .labels(Map.of("hi", "fi"))
                .build());
    
        }
    }
    
    resources:
      srb7:
        type: cloudfoundry:ServiceRouteBinding
        properties:
          serviceInstance: 3a8588f9-f846-444f-ab9e-48282f06449b
          route: 3966c2fb-d84d-462d-82a5-a81cf7cdab20
          labels:
            hi: fi
    
    Example coming soon!
    

    Create ServiceRouteBinding Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServiceRouteBinding(name: string, args: ServiceRouteBindingArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceRouteBinding(resource_name: str,
                            args: ServiceRouteBindingArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceRouteBinding(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            route: Optional[str] = None,
                            service_instance: Optional[str] = None,
                            annotations: Optional[Mapping[str, str]] = None,
                            labels: Optional[Mapping[str, str]] = None,
                            parameters: Optional[str] = None)
    func NewServiceRouteBinding(ctx *Context, name string, args ServiceRouteBindingArgs, opts ...ResourceOption) (*ServiceRouteBinding, error)
    public ServiceRouteBinding(string name, ServiceRouteBindingArgs args, CustomResourceOptions? opts = null)
    public ServiceRouteBinding(String name, ServiceRouteBindingArgs args)
    public ServiceRouteBinding(String name, ServiceRouteBindingArgs args, CustomResourceOptions options)
    
    type: cloudfoundry:ServiceRouteBinding
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "cloudfoundry_service_route_binding" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ServiceRouteBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ServiceRouteBindingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ServiceRouteBindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceRouteBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceRouteBindingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var serviceRouteBindingResource = new Cloudfoundry.ServiceRouteBinding("serviceRouteBindingResource", new()
    {
        Route = "string",
        ServiceInstance = "string",
        Annotations = 
        {
            { "string", "string" },
        },
        Labels = 
        {
            { "string", "string" },
        },
        Parameters = "string",
    });
    
    example, err := cloudfoundry.NewServiceRouteBinding(ctx, "serviceRouteBindingResource", &cloudfoundry.ServiceRouteBindingArgs{
    	Route:           pulumi.String("string"),
    	ServiceInstance: pulumi.String("string"),
    	Annotations: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Parameters: pulumi.String("string"),
    })
    
    resource "cloudfoundry_service_route_binding" "serviceRouteBindingResource" {
      lifecycle {
        create_before_destroy = true
      }
      route            = "string"
      service_instance = "string"
      annotations = {
        "string" = "string"
      }
      labels = {
        "string" = "string"
      }
      parameters = "string"
    }
    
    var serviceRouteBindingResource = new ServiceRouteBinding("serviceRouteBindingResource", ServiceRouteBindingArgs.builder()
        .route("string")
        .serviceInstance("string")
        .annotations(Map.of("string", "string"))
        .labels(Map.of("string", "string"))
        .parameters("string")
        .build());
    
    service_route_binding_resource = cloudfoundry.ServiceRouteBinding("serviceRouteBindingResource",
        route="string",
        service_instance="string",
        annotations={
            "string": "string",
        },
        labels={
            "string": "string",
        },
        parameters="string")
    
    const serviceRouteBindingResource = new cloudfoundry.ServiceRouteBinding("serviceRouteBindingResource", {
        route: "string",
        serviceInstance: "string",
        annotations: {
            string: "string",
        },
        labels: {
            string: "string",
        },
        parameters: "string",
    });
    
    type: cloudfoundry:ServiceRouteBinding
    properties:
        annotations:
            string: string
        labels:
            string: string
        parameters: string
        route: string
        serviceInstance: string
    

    ServiceRouteBinding Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ServiceRouteBinding resource accepts the following input properties:

    Route string
    The GUID of the route to be bound
    ServiceInstance string
    The GUID of the service instance to be bound
    Annotations Dictionary<string, string>
    The annotations associated with Cloud Foundry resources. Add as described here.
    Labels Dictionary<string, string>
    The labels associated with Cloud Foundry resources. Add as described here.
    Parameters string
    A JSON object that is passed to the service broker for managed service instance.
    Route string
    The GUID of the route to be bound
    ServiceInstance string
    The GUID of the service instance to be bound
    Annotations map[string]string
    The annotations associated with Cloud Foundry resources. Add as described here.
    Labels map[string]string
    The labels associated with Cloud Foundry resources. Add as described here.
    Parameters string
    A JSON object that is passed to the service broker for managed service instance.
    route string
    The GUID of the route to be bound
    service_instance string
    The GUID of the service instance to be bound
    annotations map(string)
    The annotations associated with Cloud Foundry resources. Add as described here.
    labels map(string)
    The labels associated with Cloud Foundry resources. Add as described here.
    parameters string
    A JSON object that is passed to the service broker for managed service instance.
    route String
    The GUID of the route to be bound
    serviceInstance String
    The GUID of the service instance to be bound
    annotations Map<String,String>
    The annotations associated with Cloud Foundry resources. Add as described here.
    labels Map<String,String>
    The labels associated with Cloud Foundry resources. Add as described here.
    parameters String
    A JSON object that is passed to the service broker for managed service instance.
    route string
    The GUID of the route to be bound
    serviceInstance string
    The GUID of the service instance to be bound
    annotations {[key: string]: string}
    The annotations associated with Cloud Foundry resources. Add as described here.
    labels {[key: string]: string}
    The labels associated with Cloud Foundry resources. Add as described here.
    parameters string
    A JSON object that is passed to the service broker for managed service instance.
    route str
    The GUID of the route to be bound
    service_instance str
    The GUID of the service instance to be bound
    annotations Mapping[str, str]
    The annotations associated with Cloud Foundry resources. Add as described here.
    labels Mapping[str, str]
    The labels associated with Cloud Foundry resources. Add as described here.
    parameters str
    A JSON object that is passed to the service broker for managed service instance.
    route String
    The GUID of the route to be bound
    serviceInstance String
    The GUID of the service instance to be bound
    annotations Map<String>
    The annotations associated with Cloud Foundry resources. Add as described here.
    labels Map<String>
    The labels associated with Cloud Foundry resources. Add as described here.
    parameters String
    A JSON object that is passed to the service broker for managed service instance.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServiceRouteBinding resource produces the following output properties:

    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastOperation ServiceRouteBindingLastOperation
    The details of the last operation performed on the resource
    RouteServiceUrl string
    URL to which requests for bound routes will be forwarded.
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastOperation ServiceRouteBindingLastOperation
    The details of the last operation performed on the resource
    RouteServiceUrl string
    URL to which requests for bound routes will be forwarded.
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    created_at string
    The date and time when the resource was created in RFC3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    last_operation object
    The details of the last operation performed on the resource
    route_service_url string
    URL to which requests for bound routes will be forwarded.
    updated_at string
    The date and time when the resource was updated in RFC3339 format.
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    lastOperation ServiceRouteBindingLastOperation
    The details of the last operation performed on the resource
    routeServiceUrl String
    URL to which requests for bound routes will be forwarded.
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    createdAt string
    The date and time when the resource was created in RFC3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    lastOperation ServiceRouteBindingLastOperation
    The details of the last operation performed on the resource
    routeServiceUrl string
    URL to which requests for bound routes will be forwarded.
    updatedAt string
    The date and time when the resource was updated in RFC3339 format.
    created_at str
    The date and time when the resource was created in RFC3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    last_operation ServiceRouteBindingLastOperation
    The details of the last operation performed on the resource
    route_service_url str
    URL to which requests for bound routes will be forwarded.
    updated_at str
    The date and time when the resource was updated in RFC3339 format.
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    lastOperation Property Map
    The details of the last operation performed on the resource
    routeServiceUrl String
    URL to which requests for bound routes will be forwarded.
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.

    Look up Existing ServiceRouteBinding Resource

    Get an existing ServiceRouteBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ServiceRouteBindingState, opts?: CustomResourceOptions): ServiceRouteBinding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            annotations: Optional[Mapping[str, str]] = None,
            created_at: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            last_operation: Optional[ServiceRouteBindingLastOperationArgs] = None,
            parameters: Optional[str] = None,
            route: Optional[str] = None,
            route_service_url: Optional[str] = None,
            service_instance: Optional[str] = None,
            updated_at: Optional[str] = None) -> ServiceRouteBinding
    func GetServiceRouteBinding(ctx *Context, name string, id IDInput, state *ServiceRouteBindingState, opts ...ResourceOption) (*ServiceRouteBinding, error)
    public static ServiceRouteBinding Get(string name, Input<string> id, ServiceRouteBindingState? state, CustomResourceOptions? opts = null)
    public static ServiceRouteBinding get(String name, Output<String> id, ServiceRouteBindingState state, CustomResourceOptions options)
    resources:  _:    type: cloudfoundry:ServiceRouteBinding    get:      id: ${id}
    import {
      to = cloudfoundry_service_route_binding.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Annotations Dictionary<string, string>
    The annotations associated with Cloud Foundry resources. Add as described here.
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Labels Dictionary<string, string>
    The labels associated with Cloud Foundry resources. Add as described here.
    LastOperation ServiceRouteBindingLastOperation
    The details of the last operation performed on the resource
    Parameters string
    A JSON object that is passed to the service broker for managed service instance.
    Route string
    The GUID of the route to be bound
    RouteServiceUrl string
    URL to which requests for bound routes will be forwarded.
    ServiceInstance string
    The GUID of the service instance to be bound
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    Annotations map[string]string
    The annotations associated with Cloud Foundry resources. Add as described here.
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Labels map[string]string
    The labels associated with Cloud Foundry resources. Add as described here.
    LastOperation ServiceRouteBindingLastOperationArgs
    The details of the last operation performed on the resource
    Parameters string
    A JSON object that is passed to the service broker for managed service instance.
    Route string
    The GUID of the route to be bound
    RouteServiceUrl string
    URL to which requests for bound routes will be forwarded.
    ServiceInstance string
    The GUID of the service instance to be bound
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    annotations map(string)
    The annotations associated with Cloud Foundry resources. Add as described here.
    created_at string
    The date and time when the resource was created in RFC3339 format.
    labels map(string)
    The labels associated with Cloud Foundry resources. Add as described here.
    last_operation object
    The details of the last operation performed on the resource
    parameters string
    A JSON object that is passed to the service broker for managed service instance.
    route string
    The GUID of the route to be bound
    route_service_url string
    URL to which requests for bound routes will be forwarded.
    service_instance string
    The GUID of the service instance to be bound
    updated_at string
    The date and time when the resource was updated in RFC3339 format.
    annotations Map<String,String>
    The annotations associated with Cloud Foundry resources. Add as described here.
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    labels Map<String,String>
    The labels associated with Cloud Foundry resources. Add as described here.
    lastOperation ServiceRouteBindingLastOperation
    The details of the last operation performed on the resource
    parameters String
    A JSON object that is passed to the service broker for managed service instance.
    route String
    The GUID of the route to be bound
    routeServiceUrl String
    URL to which requests for bound routes will be forwarded.
    serviceInstance String
    The GUID of the service instance to be bound
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    annotations {[key: string]: string}
    The annotations associated with Cloud Foundry resources. Add as described here.
    createdAt string
    The date and time when the resource was created in RFC3339 format.
    labels {[key: string]: string}
    The labels associated with Cloud Foundry resources. Add as described here.
    lastOperation ServiceRouteBindingLastOperation
    The details of the last operation performed on the resource
    parameters string
    A JSON object that is passed to the service broker for managed service instance.
    route string
    The GUID of the route to be bound
    routeServiceUrl string
    URL to which requests for bound routes will be forwarded.
    serviceInstance string
    The GUID of the service instance to be bound
    updatedAt string
    The date and time when the resource was updated in RFC3339 format.
    annotations Mapping[str, str]
    The annotations associated with Cloud Foundry resources. Add as described here.
    created_at str
    The date and time when the resource was created in RFC3339 format.
    labels Mapping[str, str]
    The labels associated with Cloud Foundry resources. Add as described here.
    last_operation ServiceRouteBindingLastOperationArgs
    The details of the last operation performed on the resource
    parameters str
    A JSON object that is passed to the service broker for managed service instance.
    route str
    The GUID of the route to be bound
    route_service_url str
    URL to which requests for bound routes will be forwarded.
    service_instance str
    The GUID of the service instance to be bound
    updated_at str
    The date and time when the resource was updated in RFC3339 format.
    annotations Map<String>
    The annotations associated with Cloud Foundry resources. Add as described here.
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    labels Map<String>
    The labels associated with Cloud Foundry resources. Add as described here.
    lastOperation Property Map
    The details of the last operation performed on the resource
    parameters String
    A JSON object that is passed to the service broker for managed service instance.
    route String
    The GUID of the route to be bound
    routeServiceUrl String
    URL to which requests for bound routes will be forwarded.
    serviceInstance String
    The GUID of the service instance to be bound
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.

    Supporting Types

    ServiceRouteBindingLastOperation, ServiceRouteBindingLastOperationArgs

    CreatedAt string
    The time at which the last operation was created
    Description string
    A description of the last operation
    State string
    The state of the last operation
    Type string
    The type of the last operation
    UpdatedAt string
    The time at which the last operation was updated
    CreatedAt string
    The time at which the last operation was created
    Description string
    A description of the last operation
    State string
    The state of the last operation
    Type string
    The type of the last operation
    UpdatedAt string
    The time at which the last operation was updated
    created_at string
    The time at which the last operation was created
    description string
    A description of the last operation
    state string
    The state of the last operation
    type string
    The type of the last operation
    updated_at string
    The time at which the last operation was updated
    createdAt String
    The time at which the last operation was created
    description String
    A description of the last operation
    state String
    The state of the last operation
    type String
    The type of the last operation
    updatedAt String
    The time at which the last operation was updated
    createdAt string
    The time at which the last operation was created
    description string
    A description of the last operation
    state string
    The state of the last operation
    type string
    The type of the last operation
    updatedAt string
    The time at which the last operation was updated
    created_at str
    The time at which the last operation was created
    description str
    A description of the last operation
    state str
    The state of the last operation
    type str
    The type of the last operation
    updated_at str
    The time at which the last operation was updated
    createdAt String
    The time at which the last operation was created
    description String
    A description of the last operation
    state String
    The state of the last operation
    type String
    The type of the last operation
    updatedAt String
    The time at which the last operation was updated

    Import

    terraform

    $ pulumi import cloudfoundry:index/serviceRouteBinding:ServiceRouteBinding <resource_name> <service_route_binding_guid>
    
    $ pulumi import cloudfoundry:index/serviceRouteBinding:ServiceRouteBinding xsuaa_bi 68fea1b6-11b9-4737-ad79-74e49832533f
    
    $ pulumi import cloudfoundry:index/serviceRouteBinding:ServiceRouteBinding #using id attribute in import block
    

    import {

    to = cloudfoundry_service_route_binding.<resource_name>

    id = “<service_route_binding_guid>”

    }

    this resource supports import using identity attribute from Terraform version 1.12 or higher

    import {

    to = cloudfoundry_service_route_binding.<resource_name>

    identity = {

    service_route_binding_guid = “<service_route_binding_guid>”

    }

    }

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    cloudfoundry cloudfoundry/terraform-provider-cloudfoundry
    License
    Notes
    This Pulumi package is based on the cloudfoundry Terraform Provider.
    cloudfoundry
    Viewing docs for cloudfoundry 1.18.0
    published on Monday, Nov 2, 2026 by cloudfoundry

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial