1. Packages
  2. Cloudfoundry Provider
  3. API Docs
  4. SpaceQuota
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

cloudfoundry.SpaceQuota

Explore with Pulumi AI

cloudfoundry logo
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

    Provides a Cloud Foundry resource to manage space quotas definitions.

    NOTE: This resource requires the provider to be authenticated with an account granted admin permissions.

    Example Usage

    The following example creates a space quota that can be then applied to one or more space.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const _10g = new cloudfoundry.SpaceQuota("10g", {
        allowPaidServicePlans: false,
        instanceMemory: 512,
        totalMemory: 10240,
        totalAppInstances: 10,
        totalRoutes: 5,
        totalServices: 20,
        org: cloudfoundry_org.myorg.id,
    });
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    _10g = cloudfoundry.SpaceQuota("10g",
        allow_paid_service_plans=False,
        instance_memory=512,
        total_memory=10240,
        total_app_instances=10,
        total_routes=5,
        total_services=20,
        org=cloudfoundry_org["myorg"]["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.NewSpaceQuota(ctx, "10g", &cloudfoundry.SpaceQuotaArgs{
    			AllowPaidServicePlans: pulumi.Bool(false),
    			InstanceMemory:        pulumi.Float64(512),
    			TotalMemory:           pulumi.Float64(10240),
    			TotalAppInstances:     pulumi.Float64(10),
    			TotalRoutes:           pulumi.Float64(5),
    			TotalServices:         pulumi.Float64(20),
    			Org:                   pulumi.Any(cloudfoundry_org.Myorg.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 _10g = new Cloudfoundry.SpaceQuota("10g", new()
        {
            AllowPaidServicePlans = false,
            InstanceMemory = 512,
            TotalMemory = 10240,
            TotalAppInstances = 10,
            TotalRoutes = 5,
            TotalServices = 20,
            Org = cloudfoundry_org.Myorg.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.SpaceQuota;
    import com.pulumi.cloudfoundry.SpaceQuotaArgs;
    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 _10g = new SpaceQuota("10g", SpaceQuotaArgs.builder()
                .allowPaidServicePlans(false)
                .instanceMemory(512)
                .totalMemory(10240)
                .totalAppInstances(10)
                .totalRoutes(5)
                .totalServices(20)
                .org(cloudfoundry_org.myorg().id())
                .build());
    
        }
    }
    
    resources:
      10g:
        type: cloudfoundry:SpaceQuota
        properties:
          allowPaidServicePlans: false
          instanceMemory: 512
          totalMemory: 10240
          totalAppInstances: 10
          totalRoutes: 5
          totalServices: 20
          org: ${cloudfoundry_org.myorg.id}
    

    Create SpaceQuota Resource

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

    Constructor syntax

    new SpaceQuota(name: string, args: SpaceQuotaArgs, opts?: CustomResourceOptions);
    @overload
    def SpaceQuota(resource_name: str,
                   args: SpaceQuotaArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SpaceQuota(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   allow_paid_service_plans: Optional[bool] = None,
                   org: Optional[str] = None,
                   total_memory: Optional[float] = None,
                   total_routes: Optional[float] = None,
                   total_services: Optional[float] = None,
                   instance_memory: Optional[float] = None,
                   name: Optional[str] = None,
                   space_quota_id: Optional[str] = None,
                   total_app_instances: Optional[float] = None,
                   total_app_tasks: Optional[float] = None,
                   total_route_ports: Optional[float] = None,
                   total_service_keys: Optional[float] = None)
    func NewSpaceQuota(ctx *Context, name string, args SpaceQuotaArgs, opts ...ResourceOption) (*SpaceQuota, error)
    public SpaceQuota(string name, SpaceQuotaArgs args, CustomResourceOptions? opts = null)
    public SpaceQuota(String name, SpaceQuotaArgs args)
    public SpaceQuota(String name, SpaceQuotaArgs args, CustomResourceOptions options)
    
    type: cloudfoundry:SpaceQuota
    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 SpaceQuotaArgs
    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 SpaceQuotaArgs
    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 SpaceQuotaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SpaceQuotaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SpaceQuotaArgs
    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 spaceQuotaResource = new Cloudfoundry.SpaceQuota("spaceQuotaResource", new()
    {
        AllowPaidServicePlans = false,
        Org = "string",
        TotalMemory = 0,
        TotalRoutes = 0,
        TotalServices = 0,
        InstanceMemory = 0,
        Name = "string",
        SpaceQuotaId = "string",
        TotalAppInstances = 0,
        TotalAppTasks = 0,
        TotalRoutePorts = 0,
        TotalServiceKeys = 0,
    });
    
    example, err := cloudfoundry.NewSpaceQuota(ctx, "spaceQuotaResource", &cloudfoundry.SpaceQuotaArgs{
    	AllowPaidServicePlans: pulumi.Bool(false),
    	Org:                   pulumi.String("string"),
    	TotalMemory:           pulumi.Float64(0),
    	TotalRoutes:           pulumi.Float64(0),
    	TotalServices:         pulumi.Float64(0),
    	InstanceMemory:        pulumi.Float64(0),
    	Name:                  pulumi.String("string"),
    	SpaceQuotaId:          pulumi.String("string"),
    	TotalAppInstances:     pulumi.Float64(0),
    	TotalAppTasks:         pulumi.Float64(0),
    	TotalRoutePorts:       pulumi.Float64(0),
    	TotalServiceKeys:      pulumi.Float64(0),
    })
    
    var spaceQuotaResource = new SpaceQuota("spaceQuotaResource", SpaceQuotaArgs.builder()
        .allowPaidServicePlans(false)
        .org("string")
        .totalMemory(0)
        .totalRoutes(0)
        .totalServices(0)
        .instanceMemory(0)
        .name("string")
        .spaceQuotaId("string")
        .totalAppInstances(0)
        .totalAppTasks(0)
        .totalRoutePorts(0)
        .totalServiceKeys(0)
        .build());
    
    space_quota_resource = cloudfoundry.SpaceQuota("spaceQuotaResource",
        allow_paid_service_plans=False,
        org="string",
        total_memory=0,
        total_routes=0,
        total_services=0,
        instance_memory=0,
        name="string",
        space_quota_id="string",
        total_app_instances=0,
        total_app_tasks=0,
        total_route_ports=0,
        total_service_keys=0)
    
    const spaceQuotaResource = new cloudfoundry.SpaceQuota("spaceQuotaResource", {
        allowPaidServicePlans: false,
        org: "string",
        totalMemory: 0,
        totalRoutes: 0,
        totalServices: 0,
        instanceMemory: 0,
        name: "string",
        spaceQuotaId: "string",
        totalAppInstances: 0,
        totalAppTasks: 0,
        totalRoutePorts: 0,
        totalServiceKeys: 0,
    });
    
    type: cloudfoundry:SpaceQuota
    properties:
        allowPaidServicePlans: false
        instanceMemory: 0
        name: string
        org: string
        spaceQuotaId: string
        totalAppInstances: 0
        totalAppTasks: 0
        totalMemory: 0
        totalRoutePorts: 0
        totalRoutes: 0
        totalServiceKeys: 0
        totalServices: 0
    

    SpaceQuota 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 SpaceQuota resource accepts the following input properties:

    AllowPaidServicePlans bool
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    Org string
    TotalMemory double
    Maximum memory usage allowed
    TotalRoutes double
    Maximum routes allowed
    TotalServices double
    Maximum services allowed
    InstanceMemory double
    Maximum memory per application instance
    Name string
    The name you use to identify the quota or plan in Cloud Foundry
    SpaceQuotaId string
    The GUID of the quota
    TotalAppInstances double
    Maximum app instances allowed
    TotalAppTasks double
    TotalRoutePorts double
    Maximum routes with reserved ports
    TotalServiceKeys double
    AllowPaidServicePlans bool
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    Org string
    TotalMemory float64
    Maximum memory usage allowed
    TotalRoutes float64
    Maximum routes allowed
    TotalServices float64
    Maximum services allowed
    InstanceMemory float64
    Maximum memory per application instance
    Name string
    The name you use to identify the quota or plan in Cloud Foundry
    SpaceQuotaId string
    The GUID of the quota
    TotalAppInstances float64
    Maximum app instances allowed
    TotalAppTasks float64
    TotalRoutePorts float64
    Maximum routes with reserved ports
    TotalServiceKeys float64
    allowPaidServicePlans Boolean
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    org String
    totalMemory Double
    Maximum memory usage allowed
    totalRoutes Double
    Maximum routes allowed
    totalServices Double
    Maximum services allowed
    instanceMemory Double
    Maximum memory per application instance
    name String
    The name you use to identify the quota or plan in Cloud Foundry
    spaceQuotaId String
    The GUID of the quota
    totalAppInstances Double
    Maximum app instances allowed
    totalAppTasks Double
    totalRoutePorts Double
    Maximum routes with reserved ports
    totalServiceKeys Double
    allowPaidServicePlans boolean
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    org string
    totalMemory number
    Maximum memory usage allowed
    totalRoutes number
    Maximum routes allowed
    totalServices number
    Maximum services allowed
    instanceMemory number
    Maximum memory per application instance
    name string
    The name you use to identify the quota or plan in Cloud Foundry
    spaceQuotaId string
    The GUID of the quota
    totalAppInstances number
    Maximum app instances allowed
    totalAppTasks number
    totalRoutePorts number
    Maximum routes with reserved ports
    totalServiceKeys number
    allow_paid_service_plans bool
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    org str
    total_memory float
    Maximum memory usage allowed
    total_routes float
    Maximum routes allowed
    total_services float
    Maximum services allowed
    instance_memory float
    Maximum memory per application instance
    name str
    The name you use to identify the quota or plan in Cloud Foundry
    space_quota_id str
    The GUID of the quota
    total_app_instances float
    Maximum app instances allowed
    total_app_tasks float
    total_route_ports float
    Maximum routes with reserved ports
    total_service_keys float
    allowPaidServicePlans Boolean
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    org String
    totalMemory Number
    Maximum memory usage allowed
    totalRoutes Number
    Maximum routes allowed
    totalServices Number
    Maximum services allowed
    instanceMemory Number
    Maximum memory per application instance
    name String
    The name you use to identify the quota or plan in Cloud Foundry
    spaceQuotaId String
    The GUID of the quota
    totalAppInstances Number
    Maximum app instances allowed
    totalAppTasks Number
    totalRoutePorts Number
    Maximum routes with reserved ports
    totalServiceKeys Number

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SpaceQuota 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 SpaceQuota Resource

    Get an existing SpaceQuota 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?: SpaceQuotaState, opts?: CustomResourceOptions): SpaceQuota
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_paid_service_plans: Optional[bool] = None,
            instance_memory: Optional[float] = None,
            name: Optional[str] = None,
            org: Optional[str] = None,
            space_quota_id: Optional[str] = None,
            total_app_instances: Optional[float] = None,
            total_app_tasks: Optional[float] = None,
            total_memory: Optional[float] = None,
            total_route_ports: Optional[float] = None,
            total_routes: Optional[float] = None,
            total_service_keys: Optional[float] = None,
            total_services: Optional[float] = None) -> SpaceQuota
    func GetSpaceQuota(ctx *Context, name string, id IDInput, state *SpaceQuotaState, opts ...ResourceOption) (*SpaceQuota, error)
    public static SpaceQuota Get(string name, Input<string> id, SpaceQuotaState? state, CustomResourceOptions? opts = null)
    public static SpaceQuota get(String name, Output<String> id, SpaceQuotaState state, CustomResourceOptions options)
    resources:  _:    type: cloudfoundry:SpaceQuota    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.
    The following state arguments are supported:
    AllowPaidServicePlans bool
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    InstanceMemory double
    Maximum memory per application instance
    Name string
    The name you use to identify the quota or plan in Cloud Foundry
    Org string
    SpaceQuotaId string
    The GUID of the quota
    TotalAppInstances double
    Maximum app instances allowed
    TotalAppTasks double
    TotalMemory double
    Maximum memory usage allowed
    TotalRoutePorts double
    Maximum routes with reserved ports
    TotalRoutes double
    Maximum routes allowed
    TotalServiceKeys double
    TotalServices double
    Maximum services allowed
    AllowPaidServicePlans bool
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    InstanceMemory float64
    Maximum memory per application instance
    Name string
    The name you use to identify the quota or plan in Cloud Foundry
    Org string
    SpaceQuotaId string
    The GUID of the quota
    TotalAppInstances float64
    Maximum app instances allowed
    TotalAppTasks float64
    TotalMemory float64
    Maximum memory usage allowed
    TotalRoutePorts float64
    Maximum routes with reserved ports
    TotalRoutes float64
    Maximum routes allowed
    TotalServiceKeys float64
    TotalServices float64
    Maximum services allowed
    allowPaidServicePlans Boolean
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    instanceMemory Double
    Maximum memory per application instance
    name String
    The name you use to identify the quota or plan in Cloud Foundry
    org String
    spaceQuotaId String
    The GUID of the quota
    totalAppInstances Double
    Maximum app instances allowed
    totalAppTasks Double
    totalMemory Double
    Maximum memory usage allowed
    totalRoutePorts Double
    Maximum routes with reserved ports
    totalRoutes Double
    Maximum routes allowed
    totalServiceKeys Double
    totalServices Double
    Maximum services allowed
    allowPaidServicePlans boolean
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    instanceMemory number
    Maximum memory per application instance
    name string
    The name you use to identify the quota or plan in Cloud Foundry
    org string
    spaceQuotaId string
    The GUID of the quota
    totalAppInstances number
    Maximum app instances allowed
    totalAppTasks number
    totalMemory number
    Maximum memory usage allowed
    totalRoutePorts number
    Maximum routes with reserved ports
    totalRoutes number
    Maximum routes allowed
    totalServiceKeys number
    totalServices number
    Maximum services allowed
    allow_paid_service_plans bool
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    instance_memory float
    Maximum memory per application instance
    name str
    The name you use to identify the quota or plan in Cloud Foundry
    org str
    space_quota_id str
    The GUID of the quota
    total_app_instances float
    Maximum app instances allowed
    total_app_tasks float
    total_memory float
    Maximum memory usage allowed
    total_route_ports float
    Maximum routes with reserved ports
    total_routes float
    Maximum routes allowed
    total_service_keys float
    total_services float
    Maximum services allowed
    allowPaidServicePlans Boolean
    Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.
    instanceMemory Number
    Maximum memory per application instance
    name String
    The name you use to identify the quota or plan in Cloud Foundry
    org String
    spaceQuotaId String
    The GUID of the quota
    totalAppInstances Number
    Maximum app instances allowed
    totalAppTasks Number
    totalMemory Number
    Maximum memory usage allowed
    totalRoutePorts Number
    Maximum routes with reserved ports
    totalRoutes Number
    Maximum routes allowed
    totalServiceKeys Number
    totalServices Number
    Maximum services allowed

    Import

    An existing space Quota can be imported using its guid, e.g.

    bash

    $ pulumi import cloudfoundry:index/spaceQuota:SpaceQuota 10g 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.
    cloudfoundry logo
    cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community