cloudfoundry.ServiceBroker
Explore with Pulumi AI
Example Usage
The following example registers a service broker.
import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";
const mysql = new cloudfoundry.ServiceBroker("mysql", {
password: "admin",
url: "http://mysql-broker.local.pcfdev.io",
username: "admin",
});
import pulumi
import pulumi_cloudfoundry as cloudfoundry
mysql = cloudfoundry.ServiceBroker("mysql",
password="admin",
url="http://mysql-broker.local.pcfdev.io",
username="admin")
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.NewServiceBroker(ctx, "mysql", &cloudfoundry.ServiceBrokerArgs{
Password: pulumi.String("admin"),
Url: pulumi.String("http://mysql-broker.local.pcfdev.io"),
Username: pulumi.String("admin"),
})
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 mysql = new Cloudfoundry.ServiceBroker("mysql", new()
{
Password = "admin",
Url = "http://mysql-broker.local.pcfdev.io",
Username = "admin",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudfoundry.ServiceBroker;
import com.pulumi.cloudfoundry.ServiceBrokerArgs;
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 mysql = new ServiceBroker("mysql", ServiceBrokerArgs.builder()
.password("admin")
.url("http://mysql-broker.local.pcfdev.io")
.username("admin")
.build());
}
}
resources:
mysql:
type: cloudfoundry:ServiceBroker
properties:
password: admin
url: http://mysql-broker.local.pcfdev.io
username: admin
Create ServiceBroker Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceBroker(name: string, args: ServiceBrokerArgs, opts?: CustomResourceOptions);
@overload
def ServiceBroker(resource_name: str,
args: ServiceBrokerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceBroker(resource_name: str,
opts: Optional[ResourceOptions] = None,
password: Optional[str] = None,
url: Optional[str] = None,
username: Optional[str] = None,
annotations: Optional[Mapping[str, str]] = None,
catalog_change: Optional[bool] = None,
catalog_hash: Optional[str] = None,
fail_when_catalog_not_accessible: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
service_broker_id: Optional[str] = None,
space: Optional[str] = None)
func NewServiceBroker(ctx *Context, name string, args ServiceBrokerArgs, opts ...ResourceOption) (*ServiceBroker, error)
public ServiceBroker(string name, ServiceBrokerArgs args, CustomResourceOptions? opts = null)
public ServiceBroker(String name, ServiceBrokerArgs args)
public ServiceBroker(String name, ServiceBrokerArgs args, CustomResourceOptions options)
type: cloudfoundry:ServiceBroker
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 ServiceBrokerArgs
- 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 ServiceBrokerArgs
- 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 ServiceBrokerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceBrokerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceBrokerArgs
- 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 serviceBrokerResource = new Cloudfoundry.ServiceBroker("serviceBrokerResource", new()
{
Password = "string",
Url = "string",
Username = "string",
Annotations =
{
{ "string", "string" },
},
CatalogChange = false,
CatalogHash = "string",
FailWhenCatalogNotAccessible = false,
Labels =
{
{ "string", "string" },
},
Name = "string",
ServiceBrokerId = "string",
Space = "string",
});
example, err := cloudfoundry.NewServiceBroker(ctx, "serviceBrokerResource", &cloudfoundry.ServiceBrokerArgs{
Password: pulumi.String("string"),
Url: pulumi.String("string"),
Username: pulumi.String("string"),
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
CatalogChange: pulumi.Bool(false),
CatalogHash: pulumi.String("string"),
FailWhenCatalogNotAccessible: pulumi.Bool(false),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
ServiceBrokerId: pulumi.String("string"),
Space: pulumi.String("string"),
})
var serviceBrokerResource = new ServiceBroker("serviceBrokerResource", ServiceBrokerArgs.builder()
.password("string")
.url("string")
.username("string")
.annotations(Map.of("string", "string"))
.catalogChange(false)
.catalogHash("string")
.failWhenCatalogNotAccessible(false)
.labels(Map.of("string", "string"))
.name("string")
.serviceBrokerId("string")
.space("string")
.build());
service_broker_resource = cloudfoundry.ServiceBroker("serviceBrokerResource",
password="string",
url="string",
username="string",
annotations={
"string": "string",
},
catalog_change=False,
catalog_hash="string",
fail_when_catalog_not_accessible=False,
labels={
"string": "string",
},
name="string",
service_broker_id="string",
space="string")
const serviceBrokerResource = new cloudfoundry.ServiceBroker("serviceBrokerResource", {
password: "string",
url: "string",
username: "string",
annotations: {
string: "string",
},
catalogChange: false,
catalogHash: "string",
failWhenCatalogNotAccessible: false,
labels: {
string: "string",
},
name: "string",
serviceBrokerId: "string",
space: "string",
});
type: cloudfoundry:ServiceBroker
properties:
annotations:
string: string
catalogChange: false
catalogHash: string
failWhenCatalogNotAccessible: false
labels:
string: string
name: string
password: string
serviceBrokerId: string
space: string
url: string
username: string
ServiceBroker 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 ServiceBroker resource accepts the following input properties:
- Password string
- The password to authenticate against the service broker API calls
- Url string
- The URL to the service broker API
- Username string
- The user name to use to authenticate against the service broker API calls
- Annotations Dictionary<string, string>
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- Catalog
Change bool - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- Catalog
Hash string - Fail
When boolCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- Labels Dictionary<string, string>
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- Name string
- The name of the service broker
- Service
Broker stringId - The GUID of the service broker
- Space string
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- Password string
- The password to authenticate against the service broker API calls
- Url string
- The URL to the service broker API
- Username string
- The user name to use to authenticate against the service broker API calls
- Annotations map[string]string
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- Catalog
Change bool - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- Catalog
Hash string - Fail
When boolCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- Labels map[string]string
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- Name string
- The name of the service broker
- Service
Broker stringId - The GUID of the service broker
- Space string
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- password String
- The password to authenticate against the service broker API calls
- url String
- The URL to the service broker API
- username String
- The user name to use to authenticate against the service broker API calls
- annotations Map<String,String>
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- catalog
Change Boolean - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- catalog
Hash String - fail
When BooleanCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- labels Map<String,String>
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- name String
- The name of the service broker
- service
Broker StringId - The GUID of the service broker
- space String
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- password string
- The password to authenticate against the service broker API calls
- url string
- The URL to the service broker API
- username string
- The user name to use to authenticate against the service broker API calls
- annotations {[key: string]: string}
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- catalog
Change boolean - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- catalog
Hash string - fail
When booleanCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- labels {[key: string]: string}
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- name string
- The name of the service broker
- service
Broker stringId - The GUID of the service broker
- space string
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- password str
- The password to authenticate against the service broker API calls
- url str
- The URL to the service broker API
- username str
- The user name to use to authenticate against the service broker API calls
- annotations Mapping[str, str]
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- catalog_
change bool - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- catalog_
hash str - fail_
when_ boolcatalog_ not_ accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- labels Mapping[str, str]
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- name str
- The name of the service broker
- service_
broker_ strid - The GUID of the service broker
- space str
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- password String
- The password to authenticate against the service broker API calls
- url String
- The URL to the service broker API
- username String
- The user name to use to authenticate against the service broker API calls
- annotations Map<String>
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- catalog
Change Boolean - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- catalog
Hash String - fail
When BooleanCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- labels Map<String>
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- name String
- The name of the service broker
- service
Broker StringId - The GUID of the service broker
- space String
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceBroker resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Plans Dictionary<string, string> - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- Services Dictionary<string, string>
- Map of service GUIDs keyed by service name
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Plans map[string]string - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- Services map[string]string
- Map of service GUIDs keyed by service name
- id String
- The provider-assigned unique ID for this managed resource.
- service
Plans Map<String,String> - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- services Map<String,String>
- Map of service GUIDs keyed by service name
- id string
- The provider-assigned unique ID for this managed resource.
- service
Plans {[key: string]: string} - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- services {[key: string]: string}
- Map of service GUIDs keyed by service name
- id str
- The provider-assigned unique ID for this managed resource.
- service_
plans Mapping[str, str] - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- services Mapping[str, str]
- Map of service GUIDs keyed by service name
- id String
- The provider-assigned unique ID for this managed resource.
- service
Plans Map<String> - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- services Map<String>
- Map of service GUIDs keyed by service name
Look up Existing ServiceBroker Resource
Get an existing ServiceBroker 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?: ServiceBrokerState, opts?: CustomResourceOptions): ServiceBroker
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
catalog_change: Optional[bool] = None,
catalog_hash: Optional[str] = None,
fail_when_catalog_not_accessible: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
password: Optional[str] = None,
service_broker_id: Optional[str] = None,
service_plans: Optional[Mapping[str, str]] = None,
services: Optional[Mapping[str, str]] = None,
space: Optional[str] = None,
url: Optional[str] = None,
username: Optional[str] = None) -> ServiceBroker
func GetServiceBroker(ctx *Context, name string, id IDInput, state *ServiceBrokerState, opts ...ResourceOption) (*ServiceBroker, error)
public static ServiceBroker Get(string name, Input<string> id, ServiceBrokerState? state, CustomResourceOptions? opts = null)
public static ServiceBroker get(String name, Output<String> id, ServiceBrokerState state, CustomResourceOptions options)
resources: _: type: cloudfoundry:ServiceBroker 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.
- Annotations Dictionary<string, string>
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- Catalog
Change bool - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- Catalog
Hash string - Fail
When boolCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- Labels Dictionary<string, string>
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- Name string
- The name of the service broker
- Password string
- The password to authenticate against the service broker API calls
- Service
Broker stringId - The GUID of the service broker
- Service
Plans Dictionary<string, string> - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- Services Dictionary<string, string>
- Map of service GUIDs keyed by service name
- Space string
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- Url string
- The URL to the service broker API
- Username string
- The user name to use to authenticate against the service broker API calls
- Annotations map[string]string
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- Catalog
Change bool - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- Catalog
Hash string - Fail
When boolCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- Labels map[string]string
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- Name string
- The name of the service broker
- Password string
- The password to authenticate against the service broker API calls
- Service
Broker stringId - The GUID of the service broker
- Service
Plans map[string]string - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- Services map[string]string
- Map of service GUIDs keyed by service name
- Space string
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- Url string
- The URL to the service broker API
- Username string
- The user name to use to authenticate against the service broker API calls
- annotations Map<String,String>
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- catalog
Change Boolean - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- catalog
Hash String - fail
When BooleanCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- labels Map<String,String>
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- name String
- The name of the service broker
- password String
- The password to authenticate against the service broker API calls
- service
Broker StringId - The GUID of the service broker
- service
Plans Map<String,String> - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- services Map<String,String>
- Map of service GUIDs keyed by service name
- space String
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- url String
- The URL to the service broker API
- username String
- The user name to use to authenticate against the service broker API calls
- annotations {[key: string]: string}
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- catalog
Change boolean - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- catalog
Hash string - fail
When booleanCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- labels {[key: string]: string}
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- name string
- The name of the service broker
- password string
- The password to authenticate against the service broker API calls
- service
Broker stringId - The GUID of the service broker
- service
Plans {[key: string]: string} - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- services {[key: string]: string}
- Map of service GUIDs keyed by service name
- space string
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- url string
- The URL to the service broker API
- username string
- The user name to use to authenticate against the service broker API calls
- annotations Mapping[str, str]
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- catalog_
change bool - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- catalog_
hash str - fail_
when_ boolcatalog_ not_ accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- labels Mapping[str, str]
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- name str
- The name of the service broker
- password str
- The password to authenticate against the service broker API calls
- service_
broker_ strid - The GUID of the service broker
- service_
plans Mapping[str, str] - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- services Mapping[str, str]
- Map of service GUIDs keyed by service name
- space str
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- url str
- The URL to the service broker API
- username str
- The user name to use to authenticate against the service broker API calls
- annotations Map<String>
- Add annotations as described here. Works only on cloud foundry with api >= v3.71.
- catalog
Change Boolean - Special marker to know and trigger a service broker update, this should not be set to true on your resource declaration
- catalog
Hash String - fail
When BooleanCatalog Not Accessible - Set to true if you want to see errors when getting service broker catalog (default behaviour is silently failed).
- labels Map<String>
- Add labels as described here. Works only on cloud foundry with api >= v3.71.
- name String
- The name of the service broker
- password String
- The password to authenticate against the service broker API calls
- service
Broker StringId - The GUID of the service broker
- service
Plans Map<String> - Map of service plan GUIDs keyed by service "<service name>/<plan name>"
- services Map<String>
- Map of service GUIDs keyed by service name
- space String
- The ID of the space to scope this broker to (registering the broker as space-scoped). By default, registers standard brokers
- url String
- The URL to the service broker API
- username String
- The user name to use to authenticate against the service broker API calls
Import
An existing Service Broker can be imported using its guid, e.g.
bash
$ pulumi import cloudfoundry:index/serviceBroker:ServiceBroker mysql a-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.