cloudfoundry.RouteServiceBinding
Explore with Pulumi AI
Provides a Cloud Foundry resource for binding of service instances to routes.
Example Usage
The following example binds a specific route to the given service instance.
import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";
const route_bind = new cloudfoundry.RouteServiceBinding("route-bind", {
serviceInstance: cloudfoundry_service_instance.myservice.id,
route: cloudfoundry_route.myroute.id,
});
import pulumi
import pulumi_cloudfoundry as cloudfoundry
route_bind = cloudfoundry.RouteServiceBinding("route-bind",
service_instance=cloudfoundry_service_instance["myservice"]["id"],
route=cloudfoundry_route["myroute"]["id"])
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.NewRouteServiceBinding(ctx, "route-bind", &cloudfoundry.RouteServiceBindingArgs{
ServiceInstance: pulumi.Any(cloudfoundry_service_instance.Myservice.Id),
Route: pulumi.Any(cloudfoundry_route.Myroute.Id),
})
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 route_bind = new Cloudfoundry.RouteServiceBinding("route-bind", new()
{
ServiceInstance = cloudfoundry_service_instance.Myservice.Id,
Route = cloudfoundry_route.Myroute.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudfoundry.RouteServiceBinding;
import com.pulumi.cloudfoundry.RouteServiceBindingArgs;
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 route_bind = new RouteServiceBinding("route-bind", RouteServiceBindingArgs.builder()
.serviceInstance(cloudfoundry_service_instance.myservice().id())
.route(cloudfoundry_route.myroute().id())
.build());
}
}
resources:
route-bind:
type: cloudfoundry:RouteServiceBinding
properties:
serviceInstance: ${cloudfoundry_service_instance.myservice.id}
route: ${cloudfoundry_route.myroute.id}
Create RouteServiceBinding Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RouteServiceBinding(name: string, args: RouteServiceBindingArgs, opts?: CustomResourceOptions);
@overload
def RouteServiceBinding(resource_name: str,
args: RouteServiceBindingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RouteServiceBinding(resource_name: str,
opts: Optional[ResourceOptions] = None,
route: Optional[str] = None,
service_instance: Optional[str] = None,
json_params: Optional[str] = None,
route_service_binding_id: Optional[str] = None)
func NewRouteServiceBinding(ctx *Context, name string, args RouteServiceBindingArgs, opts ...ResourceOption) (*RouteServiceBinding, error)
public RouteServiceBinding(string name, RouteServiceBindingArgs args, CustomResourceOptions? opts = null)
public RouteServiceBinding(String name, RouteServiceBindingArgs args)
public RouteServiceBinding(String name, RouteServiceBindingArgs args, CustomResourceOptions options)
type: cloudfoundry:RouteServiceBinding
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RouteServiceBindingArgs
- 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 RouteServiceBindingArgs
- 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 RouteServiceBindingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteServiceBindingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteServiceBindingArgs
- 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 routeServiceBindingResource = new Cloudfoundry.RouteServiceBinding("routeServiceBindingResource", new()
{
Route = "string",
ServiceInstance = "string",
JsonParams = "string",
RouteServiceBindingId = "string",
});
example, err := cloudfoundry.NewRouteServiceBinding(ctx, "routeServiceBindingResource", &cloudfoundry.RouteServiceBindingArgs{
Route: pulumi.String("string"),
ServiceInstance: pulumi.String("string"),
JsonParams: pulumi.String("string"),
RouteServiceBindingId: pulumi.String("string"),
})
var routeServiceBindingResource = new RouteServiceBinding("routeServiceBindingResource", RouteServiceBindingArgs.builder()
.route("string")
.serviceInstance("string")
.jsonParams("string")
.routeServiceBindingId("string")
.build());
route_service_binding_resource = cloudfoundry.RouteServiceBinding("routeServiceBindingResource",
route="string",
service_instance="string",
json_params="string",
route_service_binding_id="string")
const routeServiceBindingResource = new cloudfoundry.RouteServiceBinding("routeServiceBindingResource", {
route: "string",
serviceInstance: "string",
jsonParams: "string",
routeServiceBindingId: "string",
});
type: cloudfoundry:RouteServiceBinding
properties:
jsonParams: string
route: string
routeServiceBindingId: string
serviceInstance: string
RouteServiceBinding 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 RouteServiceBinding resource accepts the following input properties:
- Route string
- The ID of the route to bind the service instance to.
- Service
Instance string - The ID the service instance to bind to the route.
- Json
Params string - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- Route
Service stringBinding Id
- Route string
- The ID of the route to bind the service instance to.
- Service
Instance string - The ID the service instance to bind to the route.
- Json
Params string - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- Route
Service stringBinding Id
- route String
- The ID of the route to bind the service instance to.
- service
Instance String - The ID the service instance to bind to the route.
- json
Params String - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- route
Service StringBinding Id
- route string
- The ID of the route to bind the service instance to.
- service
Instance string - The ID the service instance to bind to the route.
- json
Params string - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- route
Service stringBinding Id
- route str
- The ID of the route to bind the service instance to.
- service_
instance str - The ID the service instance to bind to the route.
- json_
params str - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- route_
service_ strbinding_ id
- route String
- The ID of the route to bind the service instance to.
- service
Instance String - The ID the service instance to bind to the route.
- json
Params String - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- route
Service StringBinding Id
Outputs
All input properties are implicitly available as output properties. Additionally, the RouteServiceBinding resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RouteServiceBinding Resource
Get an existing RouteServiceBinding 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?: RouteServiceBindingState, opts?: CustomResourceOptions): RouteServiceBinding
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
json_params: Optional[str] = None,
route: Optional[str] = None,
route_service_binding_id: Optional[str] = None,
service_instance: Optional[str] = None) -> RouteServiceBinding
func GetRouteServiceBinding(ctx *Context, name string, id IDInput, state *RouteServiceBindingState, opts ...ResourceOption) (*RouteServiceBinding, error)
public static RouteServiceBinding Get(string name, Input<string> id, RouteServiceBindingState? state, CustomResourceOptions? opts = null)
public static RouteServiceBinding get(String name, Output<String> id, RouteServiceBindingState state, CustomResourceOptions options)
resources: _: type: cloudfoundry:RouteServiceBinding get: 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.
- Json
Params string - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- Route string
- The ID of the route to bind the service instance to.
- Route
Service stringBinding Id - Service
Instance string - The ID the service instance to bind to the route.
- Json
Params string - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- Route string
- The ID of the route to bind the service instance to.
- Route
Service stringBinding Id - Service
Instance string - The ID the service instance to bind to the route.
- json
Params String - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- route String
- The ID of the route to bind the service instance to.
- route
Service StringBinding Id - service
Instance String - The ID the service instance to bind to the route.
- json
Params string - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- route string
- The ID of the route to bind the service instance to.
- route
Service stringBinding Id - service
Instance string - The ID the service instance to bind to the route.
- json_
params str - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- route str
- The ID of the route to bind the service instance to.
- route_
service_ strbinding_ id - service_
instance str - The ID the service instance to bind to the route.
- json
Params String - Arbitrary parameters in the form of stringified JSON object to pass to the service bind handler. Defaults to empty map.
- route String
- The ID of the route to bind the service instance to.
- route
Service StringBinding Id - service
Instance String - The ID the service instance to bind to the route.
Import
Existing Route Service Binding can be imported using the composite id
formed
with service instance’s GUID and route’s GUID.
Import does not support json_params
attribute. Specifying non-empty json_params
in
terraform files after import will lead to the recreation of the resource.
E.g.
bash
$ pulumi import cloudfoundry:index/routeServiceBinding:RouteServiceBinding mybind <service-guid>/<route-guid>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- cloudfoundry cloudfoundry-community/terraform-provider-cloudfoundry
- License
- Notes
- This Pulumi package is based on the
cloudfoundry
Terraform Provider.