1. Registry
  2. Packages
  3. Cloudfoundry Provider
  4. API Docs
  5. getServicePlan
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 a Service Plan based on the filters provided

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const xsuaa_application = cloudfoundry.getServicePlan({
        serviceOfferingName: "xsuaa",
        name: "application",
    });
    export const serviceplanId = xsuaa_application.then(xsuaa_application => xsuaa_application.id);
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    xsuaa_application = cloudfoundry.get_service_plan(service_offering_name="xsuaa",
        name="application")
    pulumi.export("serviceplanId", xsuaa_application.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 {
    		xsuaa_application, err := cloudfoundry.GetServicePlan(ctx, &cloudfoundry.GetServicePlanArgs{
    			ServiceOfferingName: "xsuaa",
    			Name:                "application",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("serviceplanId", xsuaa_application.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var xsuaa_application = Cloudfoundry.GetServicePlan.Invoke(new()
        {
            ServiceOfferingName = "xsuaa",
            Name = "application",
        });
    
        return new Dictionary<string, object?>
        {
            ["serviceplanId"] = xsuaa_application.Apply(xsuaa_application => xsuaa_application.Apply(getServicePlanResult => getServicePlanResult.Id)),
        };
    });
    
    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.GetServicePlanArgs;
    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 xsuaa-application = CloudfoundryFunctions.getServicePlan(GetServicePlanArgs.builder()
                .serviceOfferingName("xsuaa")
                .name("application")
                .build());
    
            ctx.export("serviceplanId", xsuaa_application.id());
        }
    }
    
    variables:
      xsuaa-application:
        fn::invoke:
          function: cloudfoundry:getServicePlan
          arguments:
            serviceOfferingName: xsuaa
            name: application
    outputs:
      serviceplanId: ${["xsuaa-application"].id}
    
    Example coming soon!
    

    Using getServicePlan

    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 getServicePlan(args: GetServicePlanArgs, opts?: InvokeOptions): Promise<GetServicePlanResult>
    function getServicePlanOutput(args: GetServicePlanOutputArgs, opts?: InvokeOutputOptions): Output<GetServicePlanResult>
    def get_service_plan(name: Optional[str] = None,
                         service_broker_name: Optional[str] = None,
                         service_offering_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetServicePlanResult
    def get_service_plan_output(name: pulumi.Input[Optional[str]] = None,
                         service_broker_name: pulumi.Input[Optional[str]] = None,
                         service_offering_name: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOutputOptions] = None) -> Output[GetServicePlanResult]
    func GetServicePlan(ctx *Context, args *GetServicePlanArgs, opts ...InvokeOption) (*GetServicePlanResult, error)
    func GetServicePlanOutput(ctx *Context, args *GetServicePlanOutputArgs, opts ...InvokeOption) GetServicePlanResultOutput

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

    public static class GetServicePlan 
    {
        public static Task<GetServicePlanResult> InvokeAsync(GetServicePlanArgs args, InvokeOptions? opts = null)
        public static Output<GetServicePlanResult> Invoke(GetServicePlanInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetServicePlanResult> Invoke(GetServicePlanInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetServicePlanResult> getServicePlan(GetServicePlanArgs args, InvokeOptions options)
    public static Output<GetServicePlanResult> getServicePlan(GetServicePlanArgs args, InvokeOptions options)
    public static Output<GetServicePlanResult> getServicePlan(GetServicePlanArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: cloudfoundry:index/getServicePlan:getServicePlan
      arguments:
        # arguments dictionary
    data "cloudfoundry_get_service_plan" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The name of the service plan to look up
    ServiceOfferingName string
    The name of the service offering for whose plan to look up
    ServiceBrokerName string
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    Name string
    The name of the service plan to look up
    ServiceOfferingName string
    The name of the service offering for whose plan to look up
    ServiceBrokerName string
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    name string
    The name of the service plan to look up
    service_offering_name string
    The name of the service offering for whose plan to look up
    service_broker_name string
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    name String
    The name of the service plan to look up
    serviceOfferingName String
    The name of the service offering for whose plan to look up
    serviceBrokerName String
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    name string
    The name of the service plan to look up
    serviceOfferingName string
    The name of the service offering for whose plan to look up
    serviceBrokerName string
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    name str
    The name of the service plan to look up
    service_offering_name str
    The name of the service offering for whose plan to look up
    service_broker_name str
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    name String
    The name of the service plan to look up
    serviceOfferingName String
    The name of the service offering for whose plan to look up
    serviceBrokerName String
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.

    getServicePlan Result

    The following output properties are available:

    Annotations Dictionary<string, string>
    The annotations associated with Cloud Foundry resources.
    Available bool
    Whether or not the service plan is available
    BrokerCatalog GetServicePlanBrokerCatalog
    This object contains information obtained from the service broker catalog
    Costs List<GetServicePlanCost>
    The cost of the service plan as obtained from the service broker catalog
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Description string
    Description of the service plan
    Free bool
    Whether or not the service plan is free of charge
    Id string
    The GUID of the object.
    Labels Dictionary<string, string>
    The labels associated with Cloud Foundry resources.
    MaintenanceInfo GetServicePlanMaintenanceInfo
    Information about the version of this service plan
    Name string
    The name of the service plan to look up
    Schemas GetServicePlanSchemas
    Schema definitions for service instances and service bindings for the service plan
    ServiceOfferingId string
    The technical ID of the service offering
    ServiceOfferingName string
    The name of the service offering for whose plan to look up
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    VisibilityType string
    Denotes the visibility of the plan
    ServiceBrokerName string
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    Annotations map[string]string
    The annotations associated with Cloud Foundry resources.
    Available bool
    Whether or not the service plan is available
    BrokerCatalog GetServicePlanBrokerCatalog
    This object contains information obtained from the service broker catalog
    Costs []GetServicePlanCost
    The cost of the service plan as obtained from the service broker catalog
    CreatedAt string
    The date and time when the resource was created in RFC3339 format.
    Description string
    Description of the service plan
    Free bool
    Whether or not the service plan is free of charge
    Id string
    The GUID of the object.
    Labels map[string]string
    The labels associated with Cloud Foundry resources.
    MaintenanceInfo GetServicePlanMaintenanceInfo
    Information about the version of this service plan
    Name string
    The name of the service plan to look up
    Schemas GetServicePlanSchemas
    Schema definitions for service instances and service bindings for the service plan
    ServiceOfferingId string
    The technical ID of the service offering
    ServiceOfferingName string
    The name of the service offering for whose plan to look up
    UpdatedAt string
    The date and time when the resource was updated in RFC3339 format.
    VisibilityType string
    Denotes the visibility of the plan
    ServiceBrokerName string
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    annotations map(string)
    The annotations associated with Cloud Foundry resources.
    available bool
    Whether or not the service plan is available
    broker_catalog object
    This object contains information obtained from the service broker catalog
    costs list(object)
    The cost of the service plan as obtained from the service broker catalog
    created_at string
    The date and time when the resource was created in RFC3339 format.
    description string
    Description of the service plan
    free bool
    Whether or not the service plan is free of charge
    id string
    The GUID of the object.
    labels map(string)
    The labels associated with Cloud Foundry resources.
    maintenance_info object
    Information about the version of this service plan
    name string
    The name of the service plan to look up
    schemas object
    Schema definitions for service instances and service bindings for the service plan
    service_offering_id string
    The technical ID of the service offering
    service_offering_name string
    The name of the service offering for whose plan to look up
    updated_at string
    The date and time when the resource was updated in RFC3339 format.
    visibility_type string
    Denotes the visibility of the plan
    service_broker_name string
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    annotations Map<String,String>
    The annotations associated with Cloud Foundry resources.
    available Boolean
    Whether or not the service plan is available
    brokerCatalog GetServicePlanBrokerCatalog
    This object contains information obtained from the service broker catalog
    costs List<GetServicePlanCost>
    The cost of the service plan as obtained from the service broker catalog
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    description String
    Description of the service plan
    free Boolean
    Whether or not the service plan is free of charge
    id String
    The GUID of the object.
    labels Map<String,String>
    The labels associated with Cloud Foundry resources.
    maintenanceInfo GetServicePlanMaintenanceInfo
    Information about the version of this service plan
    name String
    The name of the service plan to look up
    schemas GetServicePlanSchemas
    Schema definitions for service instances and service bindings for the service plan
    serviceOfferingId String
    The technical ID of the service offering
    serviceOfferingName String
    The name of the service offering for whose plan to look up
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    visibilityType String
    Denotes the visibility of the plan
    serviceBrokerName String
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    annotations {[key: string]: string}
    The annotations associated with Cloud Foundry resources.
    available boolean
    Whether or not the service plan is available
    brokerCatalog GetServicePlanBrokerCatalog
    This object contains information obtained from the service broker catalog
    costs GetServicePlanCost[]
    The cost of the service plan as obtained from the service broker catalog
    createdAt string
    The date and time when the resource was created in RFC3339 format.
    description string
    Description of the service plan
    free boolean
    Whether or not the service plan is free of charge
    id string
    The GUID of the object.
    labels {[key: string]: string}
    The labels associated with Cloud Foundry resources.
    maintenanceInfo GetServicePlanMaintenanceInfo
    Information about the version of this service plan
    name string
    The name of the service plan to look up
    schemas GetServicePlanSchemas
    Schema definitions for service instances and service bindings for the service plan
    serviceOfferingId string
    The technical ID of the service offering
    serviceOfferingName string
    The name of the service offering for whose plan to look up
    updatedAt string
    The date and time when the resource was updated in RFC3339 format.
    visibilityType string
    Denotes the visibility of the plan
    serviceBrokerName string
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    annotations Mapping[str, str]
    The annotations associated with Cloud Foundry resources.
    available bool
    Whether or not the service plan is available
    broker_catalog GetServicePlanBrokerCatalog
    This object contains information obtained from the service broker catalog
    costs Sequence[GetServicePlanCost]
    The cost of the service plan as obtained from the service broker catalog
    created_at str
    The date and time when the resource was created in RFC3339 format.
    description str
    Description of the service plan
    free bool
    Whether or not the service plan is free of charge
    id str
    The GUID of the object.
    labels Mapping[str, str]
    The labels associated with Cloud Foundry resources.
    maintenance_info GetServicePlanMaintenanceInfo
    Information about the version of this service plan
    name str
    The name of the service plan to look up
    schemas GetServicePlanSchemas
    Schema definitions for service instances and service bindings for the service plan
    service_offering_id str
    The technical ID of the service offering
    service_offering_name str
    The name of the service offering for whose plan to look up
    updated_at str
    The date and time when the resource was updated in RFC3339 format.
    visibility_type str
    Denotes the visibility of the plan
    service_broker_name str
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.
    annotations Map<String>
    The annotations associated with Cloud Foundry resources.
    available Boolean
    Whether or not the service plan is available
    brokerCatalog Property Map
    This object contains information obtained from the service broker catalog
    costs List<Property Map>
    The cost of the service plan as obtained from the service broker catalog
    createdAt String
    The date and time when the resource was created in RFC3339 format.
    description String
    Description of the service plan
    free Boolean
    Whether or not the service plan is free of charge
    id String
    The GUID of the object.
    labels Map<String>
    The labels associated with Cloud Foundry resources.
    maintenanceInfo Property Map
    Information about the version of this service plan
    name String
    The name of the service plan to look up
    schemas Property Map
    Schema definitions for service instances and service bindings for the service plan
    serviceOfferingId String
    The technical ID of the service offering
    serviceOfferingName String
    The name of the service offering for whose plan to look up
    updatedAt String
    The date and time when the resource was updated in RFC3339 format.
    visibilityType String
    Denotes the visibility of the plan
    serviceBrokerName String
    The name of the service broker which offers the service. Use this to filter two equally named services from different brokers.

    Supporting Types

    GetServicePlanBrokerCatalog

    Bindable bool
    Specifies whether service instances of the service can be bound to applications
    Id string
    The identifier that the service broker provided for this service plan
    MaximumPollingDuration double
    The maximum number of seconds that Cloud Foundry will wait for an asynchronous service broker operation
    Metadata string
    Additional information provided by the service broker as specified by OSBAPI
    PlanUpdateable bool
    Whether the service plan supports upgrade/downgrade for service plans
    Bindable bool
    Specifies whether service instances of the service can be bound to applications
    Id string
    The identifier that the service broker provided for this service plan
    MaximumPollingDuration float64
    The maximum number of seconds that Cloud Foundry will wait for an asynchronous service broker operation
    Metadata string
    Additional information provided by the service broker as specified by OSBAPI
    PlanUpdateable bool
    Whether the service plan supports upgrade/downgrade for service plans
    bindable bool
    Specifies whether service instances of the service can be bound to applications
    id string
    The identifier that the service broker provided for this service plan
    maximum_polling_duration number
    The maximum number of seconds that Cloud Foundry will wait for an asynchronous service broker operation
    metadata string
    Additional information provided by the service broker as specified by OSBAPI
    plan_updateable bool
    Whether the service plan supports upgrade/downgrade for service plans
    bindable Boolean
    Specifies whether service instances of the service can be bound to applications
    id String
    The identifier that the service broker provided for this service plan
    maximumPollingDuration Double
    The maximum number of seconds that Cloud Foundry will wait for an asynchronous service broker operation
    metadata String
    Additional information provided by the service broker as specified by OSBAPI
    planUpdateable Boolean
    Whether the service plan supports upgrade/downgrade for service plans
    bindable boolean
    Specifies whether service instances of the service can be bound to applications
    id string
    The identifier that the service broker provided for this service plan
    maximumPollingDuration number
    The maximum number of seconds that Cloud Foundry will wait for an asynchronous service broker operation
    metadata string
    Additional information provided by the service broker as specified by OSBAPI
    planUpdateable boolean
    Whether the service plan supports upgrade/downgrade for service plans
    bindable bool
    Specifies whether service instances of the service can be bound to applications
    id str
    The identifier that the service broker provided for this service plan
    maximum_polling_duration float
    The maximum number of seconds that Cloud Foundry will wait for an asynchronous service broker operation
    metadata str
    Additional information provided by the service broker as specified by OSBAPI
    plan_updateable bool
    Whether the service plan supports upgrade/downgrade for service plans
    bindable Boolean
    Specifies whether service instances of the service can be bound to applications
    id String
    The identifier that the service broker provided for this service plan
    maximumPollingDuration Number
    The maximum number of seconds that Cloud Foundry will wait for an asynchronous service broker operation
    metadata String
    Additional information provided by the service broker as specified by OSBAPI
    planUpdateable Boolean
    Whether the service plan supports upgrade/downgrade for service plans

    GetServicePlanCost

    Amount double
    Pricing amount
    Currency string
    Currency code for the pricing amount, e.g. USD, GBP
    Unit string
    Display name for type of cost, e.g. Monthly, Hourly, Request, GB
    Amount float64
    Pricing amount
    Currency string
    Currency code for the pricing amount, e.g. USD, GBP
    Unit string
    Display name for type of cost, e.g. Monthly, Hourly, Request, GB
    amount number
    Pricing amount
    currency string
    Currency code for the pricing amount, e.g. USD, GBP
    unit string
    Display name for type of cost, e.g. Monthly, Hourly, Request, GB
    amount Double
    Pricing amount
    currency String
    Currency code for the pricing amount, e.g. USD, GBP
    unit String
    Display name for type of cost, e.g. Monthly, Hourly, Request, GB
    amount number
    Pricing amount
    currency string
    Currency code for the pricing amount, e.g. USD, GBP
    unit string
    Display name for type of cost, e.g. Monthly, Hourly, Request, GB
    amount float
    Pricing amount
    currency str
    Currency code for the pricing amount, e.g. USD, GBP
    unit str
    Display name for type of cost, e.g. Monthly, Hourly, Request, GB
    amount Number
    Pricing amount
    currency String
    Currency code for the pricing amount, e.g. USD, GBP
    unit String
    Display name for type of cost, e.g. Monthly, Hourly, Request, GB

    GetServicePlanMaintenanceInfo

    Description string
    A textual explanation associated with this version
    Version string
    The current semantic version of the service plan
    Description string
    A textual explanation associated with this version
    Version string
    The current semantic version of the service plan
    description string
    A textual explanation associated with this version
    version string
    The current semantic version of the service plan
    description String
    A textual explanation associated with this version
    version String
    The current semantic version of the service plan
    description string
    A textual explanation associated with this version
    version string
    The current semantic version of the service plan
    description str
    A textual explanation associated with this version
    version str
    The current semantic version of the service plan
    description String
    A textual explanation associated with this version
    version String
    The current semantic version of the service plan

    GetServicePlanSchemas

    GetServicePlanSchemasServiceBinding

    CreateParameters string
    Schema definition for the input parameters for service Binding creation
    CreateParameters string
    Schema definition for the input parameters for service Binding creation
    create_parameters string
    Schema definition for the input parameters for service Binding creation
    createParameters String
    Schema definition for the input parameters for service Binding creation
    createParameters string
    Schema definition for the input parameters for service Binding creation
    create_parameters str
    Schema definition for the input parameters for service Binding creation
    createParameters String
    Schema definition for the input parameters for service Binding creation

    GetServicePlanSchemasServiceInstance

    CreateParameters string
    Schema definition for the input parameters for service instance creation
    UpdateParameters string
    Schema definition for the input parameters for service instance update
    CreateParameters string
    Schema definition for the input parameters for service instance creation
    UpdateParameters string
    Schema definition for the input parameters for service instance update
    create_parameters string
    Schema definition for the input parameters for service instance creation
    update_parameters string
    Schema definition for the input parameters for service instance update
    createParameters String
    Schema definition for the input parameters for service instance creation
    updateParameters String
    Schema definition for the input parameters for service instance update
    createParameters string
    Schema definition for the input parameters for service instance creation
    updateParameters string
    Schema definition for the input parameters for service instance update
    create_parameters str
    Schema definition for the input parameters for service instance creation
    update_parameters str
    Schema definition for the input parameters for service instance update
    createParameters String
    Schema definition for the input parameters for service instance creation
    updateParameters String
    Schema definition for the input parameters for service instance update

    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