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

cloudfoundry.OrgQuota

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 org quotas definitions.

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

    NOTE: Once created, an org quota is assigned to one or more orgs through the org resource

    Example Usage

    The following example creates a quota, and applies it to an Org.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const large = new cloudfoundry.OrgQuota("large", {
        allowPaidServicePlans: false,
        instanceMemory: 2048,
        totalMemory: 51200,
        totalAppInstances: 100,
        totalRoutes: 50,
        totalServices: 200,
        totalRoutePorts: 5,
    });
    const o1 = new cloudfoundry.Org("o1", {quota: large.orgQuotaId});
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    large = cloudfoundry.OrgQuota("large",
        allow_paid_service_plans=False,
        instance_memory=2048,
        total_memory=51200,
        total_app_instances=100,
        total_routes=50,
        total_services=200,
        total_route_ports=5)
    o1 = cloudfoundry.Org("o1", quota=large.org_quota_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 {
    		large, err := cloudfoundry.NewOrgQuota(ctx, "large", &cloudfoundry.OrgQuotaArgs{
    			AllowPaidServicePlans: pulumi.Bool(false),
    			InstanceMemory:        pulumi.Float64(2048),
    			TotalMemory:           pulumi.Float64(51200),
    			TotalAppInstances:     pulumi.Float64(100),
    			TotalRoutes:           pulumi.Float64(50),
    			TotalServices:         pulumi.Float64(200),
    			TotalRoutePorts:       pulumi.Float64(5),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudfoundry.NewOrg(ctx, "o1", &cloudfoundry.OrgArgs{
    			Quota: large.OrgQuotaId,
    		})
    		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 large = new Cloudfoundry.OrgQuota("large", new()
        {
            AllowPaidServicePlans = false,
            InstanceMemory = 2048,
            TotalMemory = 51200,
            TotalAppInstances = 100,
            TotalRoutes = 50,
            TotalServices = 200,
            TotalRoutePorts = 5,
        });
    
        var o1 = new Cloudfoundry.Org("o1", new()
        {
            Quota = large.OrgQuotaId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.OrgQuota;
    import com.pulumi.cloudfoundry.OrgQuotaArgs;
    import com.pulumi.cloudfoundry.Org;
    import com.pulumi.cloudfoundry.OrgArgs;
    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 large = new OrgQuota("large", OrgQuotaArgs.builder()
                .allowPaidServicePlans(false)
                .instanceMemory(2048)
                .totalMemory(51200)
                .totalAppInstances(100)
                .totalRoutes(50)
                .totalServices(200)
                .totalRoutePorts(5)
                .build());
    
            var o1 = new Org("o1", OrgArgs.builder()
                .quota(large.orgQuotaId())
                .build());
    
        }
    }
    
    resources:
      large:
        type: cloudfoundry:OrgQuota
        properties:
          allowPaidServicePlans: false
          instanceMemory: 2048
          totalMemory: 51200
          totalAppInstances: 100
          totalRoutes: 50
          totalServices: 200
          totalRoutePorts: 5
      o1:
        type: cloudfoundry:Org
        properties:
          quota: ${large.orgQuotaId}
    

    Create OrgQuota Resource

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

    Constructor syntax

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

    OrgQuota 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 OrgQuota 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.
    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
    OrgQuotaId string
    The GUID of the quota
    TotalAppInstances double
    Maximum app instances allowed
    TotalAppTasks double
    TotalPrivateDomains double
    Maximum number of private domains allowed to be created within the Org
    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.
    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
    OrgQuotaId string
    The GUID of the quota
    TotalAppInstances float64
    Maximum app instances allowed
    TotalAppTasks float64
    TotalPrivateDomains float64
    Maximum number of private domains allowed to be created within the Org
    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.
    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
    orgQuotaId String
    The GUID of the quota
    totalAppInstances Double
    Maximum app instances allowed
    totalAppTasks Double
    totalPrivateDomains Double
    Maximum number of private domains allowed to be created within the Org
    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.
    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
    orgQuotaId string
    The GUID of the quota
    totalAppInstances number
    Maximum app instances allowed
    totalAppTasks number
    totalPrivateDomains number
    Maximum number of private domains allowed to be created within the Org
    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.
    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
    org_quota_id str
    The GUID of the quota
    total_app_instances float
    Maximum app instances allowed
    total_app_tasks float
    total_private_domains float
    Maximum number of private domains allowed to be created within the Org
    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.
    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
    orgQuotaId String
    The GUID of the quota
    totalAppInstances Number
    Maximum app instances allowed
    totalAppTasks Number
    totalPrivateDomains Number
    Maximum number of private domains allowed to be created within the Org
    totalRoutePorts Number
    Maximum routes with reserved ports
    totalServiceKeys Number

    Outputs

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

    Get an existing OrgQuota 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?: OrgQuotaState, opts?: CustomResourceOptions): OrgQuota
    @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_quota_id: Optional[str] = None,
            total_app_instances: Optional[float] = None,
            total_app_tasks: Optional[float] = None,
            total_memory: Optional[float] = None,
            total_private_domains: 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) -> OrgQuota
    func GetOrgQuota(ctx *Context, name string, id IDInput, state *OrgQuotaState, opts ...ResourceOption) (*OrgQuota, error)
    public static OrgQuota Get(string name, Input<string> id, OrgQuotaState? state, CustomResourceOptions? opts = null)
    public static OrgQuota get(String name, Output<String> id, OrgQuotaState state, CustomResourceOptions options)
    resources:  _:    type: cloudfoundry:OrgQuota    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
    OrgQuotaId string
    The GUID of the quota
    TotalAppInstances double
    Maximum app instances allowed
    TotalAppTasks double
    TotalMemory double
    Maximum memory usage allowed
    TotalPrivateDomains double
    Maximum number of private domains allowed to be created within the Org
    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
    OrgQuotaId string
    The GUID of the quota
    TotalAppInstances float64
    Maximum app instances allowed
    TotalAppTasks float64
    TotalMemory float64
    Maximum memory usage allowed
    TotalPrivateDomains float64
    Maximum number of private domains allowed to be created within the Org
    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
    orgQuotaId String
    The GUID of the quota
    totalAppInstances Double
    Maximum app instances allowed
    totalAppTasks Double
    totalMemory Double
    Maximum memory usage allowed
    totalPrivateDomains Double
    Maximum number of private domains allowed to be created within the Org
    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
    orgQuotaId string
    The GUID of the quota
    totalAppInstances number
    Maximum app instances allowed
    totalAppTasks number
    totalMemory number
    Maximum memory usage allowed
    totalPrivateDomains number
    Maximum number of private domains allowed to be created within the Org
    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_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_private_domains float
    Maximum number of private domains allowed to be created within the Org
    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
    orgQuotaId String
    The GUID of the quota
    totalAppInstances Number
    Maximum app instances allowed
    totalAppTasks Number
    totalMemory Number
    Maximum memory usage allowed
    totalPrivateDomains Number
    Maximum number of private domains allowed to be created within the Org
    totalRoutePorts Number
    Maximum routes with reserved ports
    totalRoutes Number
    Maximum routes allowed
    totalServiceKeys Number
    totalServices Number
    Maximum services allowed

    Import

    A Quota can be imported using its guid, e.g.

    bash

    $ pulumi import cloudfoundry:index/orgQuota:OrgQuota 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