1. Registry
  2. Packages
  3. Cloudfoundry Provider
  4. API Docs
  5. getServiceInstances
Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry
cloudfoundry
Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry

    Fetches service instances available under an org.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    export = async () => {
        const svcs = await cloudfoundry.getServiceInstances({
            org: "784b4cd0-4771-4e4d-9052-a07e178bae56",
        });
        return {
            svcs: svcs,
        };
    }
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    svcs = cloudfoundry.get_service_instances(org="784b4cd0-4771-4e4d-9052-a07e178bae56")
    pulumi.export("svcs", svcs)
    
    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 {
    		svcs, err := cloudfoundry.GetServiceInstances(ctx, &cloudfoundry.GetServiceInstancesArgs{
    			Org: pulumi.StringRef("784b4cd0-4771-4e4d-9052-a07e178bae56"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("svcs", svcs)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var svcs = Cloudfoundry.GetServiceInstances.Invoke(new()
        {
            Org = "784b4cd0-4771-4e4d-9052-a07e178bae56",
        });
    
        return new Dictionary<string, object?>
        {
            ["svcs"] = svcs,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.CloudfoundryFunctions;
    import com.pulumi.cloudfoundry.inputs.GetServiceInstancesArgs;
    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) {
            final var svcs = CloudfoundryFunctions.getServiceInstances(GetServiceInstancesArgs.builder()
                .org("784b4cd0-4771-4e4d-9052-a07e178bae56")
                .build());
    
            ctx.export("svcs", svcs);
        }
    }
    
    variables:
      svcs:
        fn::invoke:
          function: cloudfoundry:getServiceInstances
          arguments:
            org: 784b4cd0-4771-4e4d-9052-a07e178bae56
    outputs:
      svcs: ${svcs}
    
    Example coming soon!
    

    Using getServiceInstances

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getServiceInstances(args: GetServiceInstancesArgs, opts?: InvokeOptions): Promise<GetServiceInstancesResult>
    function getServiceInstancesOutput(args: GetServiceInstancesOutputArgs, opts?: InvokeOutputOptions): Output<GetServiceInstancesResult>
    def get_service_instances(name: Optional[str] = None,
                              org: Optional[str] = None,
                              space: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetServiceInstancesResult
    def get_service_instances_output(name: pulumi.Input[Optional[str]] = None,
                              org: pulumi.Input[Optional[str]] = None,
                              space: pulumi.Input[Optional[str]] = None,
                              opts: Optional[InvokeOutputOptions] = None) -> Output[GetServiceInstancesResult]
    func GetServiceInstances(ctx *Context, args *GetServiceInstancesArgs, opts ...InvokeOption) (*GetServiceInstancesResult, error)
    func GetServiceInstancesOutput(ctx *Context, args *GetServiceInstancesOutputArgs, opts ...InvokeOption) GetServiceInstancesResultOutput

    > Note: This function is named GetServiceInstances in the Go SDK.

    public static class GetServiceInstances 
    {
        public static Task<GetServiceInstancesResult> InvokeAsync(GetServiceInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceInstancesResult> Invoke(GetServiceInstancesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceInstancesResult> Invoke(GetServiceInstancesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetServiceInstancesResult> getServiceInstances(GetServiceInstancesArgs args, InvokeOptions options)
    public static Output<GetServiceInstancesResult> getServiceInstances(GetServiceInstancesArgs args, InvokeOptions options)
    public static Output<GetServiceInstancesResult> getServiceInstances(GetServiceInstancesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: cloudfoundry:index/getServiceInstances:getServiceInstances
      arguments:
        # arguments dictionary
    data "cloudfoundry_get_service_instances" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The name of the service instance to look up
    Org string
    The GUID of the org under which the service instances are present
    Space string
    The GUID of the space to filter for
    Name string
    The name of the service instance to look up
    Org string
    The GUID of the org under which the service instances are present
    Space string
    The GUID of the space to filter for
    name string
    The name of the service instance to look up
    org string
    The GUID of the org under which the service instances are present
    space string
    The GUID of the space to filter for
    name String
    The name of the service instance to look up
    org String
    The GUID of the org under which the service instances are present
    space String
    The GUID of the space to filter for
    name string
    The name of the service instance to look up
    org string
    The GUID of the org under which the service instances are present
    space string
    The GUID of the space to filter for
    name str
    The name of the service instance to look up
    org str
    The GUID of the org under which the service instances are present
    space str
    The GUID of the space to filter for
    name String
    The name of the service instance to look up
    org String
    The GUID of the org under which the service instances are present
    space String
    The GUID of the space to filter for

    getServiceInstances Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceInstances List<GetServiceInstancesServiceInstance>
    The list of service instances
    Name string
    The name of the service instance to look up
    Org string
    The GUID of the org under which the service instances are present
    Space string
    The GUID of the space to filter for
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceInstances []GetServiceInstancesServiceInstance
    The list of service instances
    Name string
    The name of the service instance to look up
    Org string
    The GUID of the org under which the service instances are present
    Space string
    The GUID of the space to filter for
    id string
    The provider-assigned unique ID for this managed resource.
    service_instances list(object)
    The list of service instances
    name string
    The name of the service instance to look up
    org string
    The GUID of the org under which the service instances are present
    space string
    The GUID of the space to filter for
    id String
    The provider-assigned unique ID for this managed resource.
    serviceInstances List<GetServiceInstancesServiceInstance>
    The list of service instances
    name String
    The name of the service instance to look up
    org String
    The GUID of the org under which the service instances are present
    space String
    The GUID of the space to filter for
    id string
    The provider-assigned unique ID for this managed resource.
    serviceInstances GetServiceInstancesServiceInstance[]
    The list of service instances
    name string
    The name of the service instance to look up
    org string
    The GUID of the org under which the service instances are present
    space string
    The GUID of the space to filter for
    id str
    The provider-assigned unique ID for this managed resource.
    service_instances Sequence[GetServiceInstancesServiceInstance]
    The list of service instances
    name str
    The name of the service instance to look up
    org str
    The GUID of the org under which the service instances are present
    space str
    The GUID of the space to filter for
    id String
    The provider-assigned unique ID for this managed resource.
    serviceInstances List<Property Map>
    The list of service instances
    name String
    The name of the service instance to look up
    org String
    The GUID of the org under which the service instances are present
    space String
    The GUID of the space to filter for

    Supporting Types

    GetServiceInstancesServiceInstance

    Annotations Dictionary<string, string>
    The annotations associated with Cloud Foundry resources.
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    DashboardUrl string
    The URL to the service instance dashboard (or null if there is none); only shown when type is managed.
    Id string
    The GUID of the object.
    Labels Dictionary<string, string>
    The labels associated with Cloud Foundry resources.
    LastOperation GetServiceInstancesServiceInstanceLastOperation
    The details of the last operation performed on the resource
    MaintenanceInfo GetServiceInstancesServiceInstanceMaintenanceInfo
    Information about the version of this service instance; only shown when type is managed
    Name string
    The name of the service instance
    RouteServiceUrl string
    URL to which requests for bound routes will be forwarded; only shown when type is user-provided.
    ServicePlan string
    The ID of the service plan from which the service instance was created, only shown when type is managed
    Space string
    The ID of the space in which the service instance exists
    SyslogDrainUrl string
    URL to which logs for bound applications will be streamed; only shown when type is user-provided.
    Tags List<string>
    List of tags used by apps to identify service instances. They are shown in the app VCAP_SERVICES env.
    Type string
    Type of the service instance. Either managed or user-provided.
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    UpgradeAvailable bool
    Whether or not an upgrade of this service instance is available on the current Service Plan; details are available in the maintenance_info object; Only shown when type is managed
    Annotations map[string]string
    The annotations associated with Cloud Foundry resources.
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    DashboardUrl string
    The URL to the service instance dashboard (or null if there is none); only shown when type is managed.
    Id string
    The GUID of the object.
    Labels map[string]string
    The labels associated with Cloud Foundry resources.
    LastOperation GetServiceInstancesServiceInstanceLastOperation
    The details of the last operation performed on the resource
    MaintenanceInfo GetServiceInstancesServiceInstanceMaintenanceInfo
    Information about the version of this service instance; only shown when type is managed
    Name string
    The name of the service instance
    RouteServiceUrl string
    URL to which requests for bound routes will be forwarded; only shown when type is user-provided.
    ServicePlan string
    The ID of the service plan from which the service instance was created, only shown when type is managed
    Space string
    The ID of the space in which the service instance exists
    SyslogDrainUrl string
    URL to which logs for bound applications will be streamed; only shown when type is user-provided.
    Tags []string
    List of tags used by apps to identify service instances. They are shown in the app VCAP_SERVICES env.
    Type string
    Type of the service instance. Either managed or user-provided.
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    UpgradeAvailable bool
    Whether or not an upgrade of this service instance is available on the current Service Plan; details are available in the maintenance_info object; Only shown when type is managed
    annotations map(string)
    The annotations associated with Cloud Foundry resources.
    created_at string
    The date and time when the resource was created in RFC3339 format.
    dashboard_url string
    The URL to the service instance dashboard (or null if there is none); only shown when type is managed.
    id string
    The GUID of the object.
    labels map(string)
    The labels associated with Cloud Foundry resources.
    last_operation object
    The details of the last operation performed on the resource
    maintenance_info object
    Information about the version of this service instance; only shown when type is managed
    name string
    The name of the service instance
    route_service_url string
    URL to which requests for bound routes will be forwarded; only shown when type is user-provided.
    service_plan string
    The ID of the service plan from which the service instance was created, only shown when type is managed
    space string
    The ID of the space in which the service instance exists
    syslog_drain_url string
    URL to which logs for bound applications will be streamed; only shown when type is user-provided.
    tags list(string)
    List of tags used by apps to identify service instances. They are shown in the app VCAP_SERVICES env.
    type string
    Type of the service instance. Either managed or user-provided.
    updated_at string
    The date and time when the resource was updated in RFC3339 format.
    upgrade_available bool
    Whether or not an upgrade of this service instance is available on the current Service Plan; details are available in the maintenance_info object; Only shown when type is managed
    annotations Map<String,String>
    The annotations associated with Cloud Foundry resources.
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    dashboardUrl String
    The URL to the service instance dashboard (or null if there is none); only shown when type is managed.
    id String
    The GUID of the object.
    labels Map<String,String>
    The labels associated with Cloud Foundry resources.
    lastOperation GetServiceInstancesServiceInstanceLastOperation
    The details of the last operation performed on the resource
    maintenanceInfo GetServiceInstancesServiceInstanceMaintenanceInfo
    Information about the version of this service instance; only shown when type is managed
    name String
    The name of the service instance
    routeServiceUrl String
    URL to which requests for bound routes will be forwarded; only shown when type is user-provided.
    servicePlan String
    The ID of the service plan from which the service instance was created, only shown when type is managed
    space String
    The ID of the space in which the service instance exists
    syslogDrainUrl String
    URL to which logs for bound applications will be streamed; only shown when type is user-provided.
    tags List<String>
    List of tags used by apps to identify service instances. They are shown in the app VCAP_SERVICES env.
    type String
    Type of the service instance. Either managed or user-provided.
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    upgradeAvailable Boolean
    Whether or not an upgrade of this service instance is available on the current Service Plan; details are available in the maintenance_info object; Only shown when type is managed
    annotations {[key: string]: string}
    The annotations associated with Cloud Foundry resources.
    createdAt string
    The date and time when the resource was created in RFC3339 format.
    dashboardUrl string
    The URL to the service instance dashboard (or null if there is none); only shown when type is managed.
    id string
    The GUID of the object.
    labels {[key: string]: string}
    The labels associated with Cloud Foundry resources.
    lastOperation GetServiceInstancesServiceInstanceLastOperation
    The details of the last operation performed on the resource
    maintenanceInfo GetServiceInstancesServiceInstanceMaintenanceInfo
    Information about the version of this service instance; only shown when type is managed
    name string
    The name of the service instance
    routeServiceUrl string
    URL to which requests for bound routes will be forwarded; only shown when type is user-provided.
    servicePlan string
    The ID of the service plan from which the service instance was created, only shown when type is managed
    space string
    The ID of the space in which the service instance exists
    syslogDrainUrl string
    URL to which logs for bound applications will be streamed; only shown when type is user-provided.
    tags string[]
    List of tags used by apps to identify service instances. They are shown in the app VCAP_SERVICES env.
    type string
    Type of the service instance. Either managed or user-provided.
    updatedAt string
    The date and time when the resource was updated in RFC3339 format.
    upgradeAvailable boolean
    Whether or not an upgrade of this service instance is available on the current Service Plan; details are available in the maintenance_info object; Only shown when type is managed
    annotations Mapping[str, str]
    The annotations associated with Cloud Foundry resources.
    created_at str
    The date and time when the resource was created in RFC3339 format.
    dashboard_url str
    The URL to the service instance dashboard (or null if there is none); only shown when type is managed.
    id str
    The GUID of the object.
    labels Mapping[str, str]
    The labels associated with Cloud Foundry resources.
    last_operation GetServiceInstancesServiceInstanceLastOperation
    The details of the last operation performed on the resource
    maintenance_info GetServiceInstancesServiceInstanceMaintenanceInfo
    Information about the version of this service instance; only shown when type is managed
    name str
    The name of the service instance
    route_service_url str
    URL to which requests for bound routes will be forwarded; only shown when type is user-provided.
    service_plan str
    The ID of the service plan from which the service instance was created, only shown when type is managed
    space str
    The ID of the space in which the service instance exists
    syslog_drain_url str
    URL to which logs for bound applications will be streamed; only shown when type is user-provided.
    tags Sequence[str]
    List of tags used by apps to identify service instances. They are shown in the app VCAP_SERVICES env.
    type str
    Type of the service instance. Either managed or user-provided.
    updated_at str
    The date and time when the resource was updated in RFC3339 format.
    upgrade_available bool
    Whether or not an upgrade of this service instance is available on the current Service Plan; details are available in the maintenance_info object; Only shown when type is managed
    annotations Map<String>
    The annotations associated with Cloud Foundry resources.
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    dashboardUrl String
    The URL to the service instance dashboard (or null if there is none); only shown when type is managed.
    id String
    The GUID of the object.
    labels Map<String>
    The labels associated with Cloud Foundry resources.
    lastOperation Property Map
    The details of the last operation performed on the resource
    maintenanceInfo Property Map
    Information about the version of this service instance; only shown when type is managed
    name String
    The name of the service instance
    routeServiceUrl String
    URL to which requests for bound routes will be forwarded; only shown when type is user-provided.
    servicePlan String
    The ID of the service plan from which the service instance was created, only shown when type is managed
    space String
    The ID of the space in which the service instance exists
    syslogDrainUrl String
    URL to which logs for bound applications will be streamed; only shown when type is user-provided.
    tags List<String>
    List of tags used by apps to identify service instances. They are shown in the app VCAP_SERVICES env.
    type String
    Type of the service instance. Either managed or user-provided.
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    upgradeAvailable Boolean
    Whether or not an upgrade of this service instance is available on the current Service Plan; details are available in the maintenance_info object; Only shown when type is managed

    GetServiceInstancesServiceInstanceLastOperation

    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

    GetServiceInstancesServiceInstanceMaintenanceInfo

    Description string
    A description of the version of the service instance
    Version string
    The version of the service instance
    Description string
    A description of the version of the service instance
    Version string
    The version of the service instance
    description string
    A description of the version of the service instance
    version string
    The version of the service instance
    description String
    A description of the version of the service instance
    version String
    The version of the service instance
    description string
    A description of the version of the service instance
    version string
    The version of the service instance
    description str
    A description of the version of the service instance
    version str
    The version of the service instance
    description String
    A description of the version of the service instance
    version String
    The version of the service instance

    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.19.0
    published on Friday, Nov 13, 2026 by cloudfoundry

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial