cloudfoundry.SpaceQuota
Explore with Pulumi AI
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:
- Allow
Paid boolService Plans - 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
- Total
Memory double - Maximum memory usage allowed
- Total
Routes double - Maximum routes allowed
- Total
Services double - Maximum services allowed
- Instance
Memory double - Maximum memory per application instance
- Name string
- The name you use to identify the quota or plan in Cloud Foundry
- Space
Quota stringId - The GUID of the quota
- Total
App doubleInstances - Maximum app instances allowed
- Total
App doubleTasks - Total
Route doublePorts - Maximum routes with reserved ports
- Total
Service doubleKeys
- Allow
Paid boolService Plans - 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
- Total
Memory float64 - Maximum memory usage allowed
- Total
Routes float64 - Maximum routes allowed
- Total
Services float64 - Maximum services allowed
- Instance
Memory float64 - Maximum memory per application instance
- Name string
- The name you use to identify the quota or plan in Cloud Foundry
- Space
Quota stringId - The GUID of the quota
- Total
App float64Instances - Maximum app instances allowed
- Total
App float64Tasks - Total
Route float64Ports - Maximum routes with reserved ports
- Total
Service float64Keys
- allow
Paid BooleanService Plans - 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
- total
Memory Double - Maximum memory usage allowed
- total
Routes Double - Maximum routes allowed
- total
Services Double - Maximum services allowed
- instance
Memory Double - Maximum memory per application instance
- name String
- The name you use to identify the quota or plan in Cloud Foundry
- space
Quota StringId - The GUID of the quota
- total
App DoubleInstances - Maximum app instances allowed
- total
App DoubleTasks - total
Route DoublePorts - Maximum routes with reserved ports
- total
Service DoubleKeys
- allow
Paid booleanService Plans - 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
- total
Memory number - Maximum memory usage allowed
- total
Routes number - Maximum routes allowed
- total
Services number - Maximum services allowed
- instance
Memory number - Maximum memory per application instance
- name string
- The name you use to identify the quota or plan in Cloud Foundry
- space
Quota stringId - The GUID of the quota
- total
App numberInstances - Maximum app instances allowed
- total
App numberTasks - total
Route numberPorts - Maximum routes with reserved ports
- total
Service numberKeys
- allow_
paid_ boolservice_ plans - 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_ strid - The GUID of the quota
- total_
app_ floatinstances - Maximum app instances allowed
- total_
app_ floattasks - total_
route_ floatports - Maximum routes with reserved ports
- total_
service_ floatkeys
- allow
Paid BooleanService Plans - 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
- total
Memory Number - Maximum memory usage allowed
- total
Routes Number - Maximum routes allowed
- total
Services Number - Maximum services allowed
- instance
Memory Number - Maximum memory per application instance
- name String
- The name you use to identify the quota or plan in Cloud Foundry
- space
Quota StringId - The GUID of the quota
- total
App NumberInstances - Maximum app instances allowed
- total
App NumberTasks - total
Route NumberPorts - Maximum routes with reserved ports
- total
Service NumberKeys
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.
- Allow
Paid boolService Plans - 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 double - Maximum memory per application instance
- Name string
- The name you use to identify the quota or plan in Cloud Foundry
- Org string
- Space
Quota stringId - The GUID of the quota
- Total
App doubleInstances - Maximum app instances allowed
- Total
App doubleTasks - Total
Memory double - Maximum memory usage allowed
- Total
Route doublePorts - Maximum routes with reserved ports
- Total
Routes double - Maximum routes allowed
- Total
Service doubleKeys - Total
Services double - Maximum services allowed
- Allow
Paid boolService Plans - 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 float64 - Maximum memory per application instance
- Name string
- The name you use to identify the quota or plan in Cloud Foundry
- Org string
- Space
Quota stringId - The GUID of the quota
- Total
App float64Instances - Maximum app instances allowed
- Total
App float64Tasks - Total
Memory float64 - Maximum memory usage allowed
- Total
Route float64Ports - Maximum routes with reserved ports
- Total
Routes float64 - Maximum routes allowed
- Total
Service float64Keys - Total
Services float64 - Maximum services allowed
- allow
Paid BooleanService Plans - 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 Double - Maximum memory per application instance
- name String
- The name you use to identify the quota or plan in Cloud Foundry
- org String
- space
Quota StringId - The GUID of the quota
- total
App DoubleInstances - Maximum app instances allowed
- total
App DoubleTasks - total
Memory Double - Maximum memory usage allowed
- total
Route DoublePorts - Maximum routes with reserved ports
- total
Routes Double - Maximum routes allowed
- total
Service DoubleKeys - total
Services Double - Maximum services allowed
- allow
Paid booleanService Plans - 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 number - Maximum memory per application instance
- name string
- The name you use to identify the quota or plan in Cloud Foundry
- org string
- space
Quota stringId - The GUID of the quota
- total
App numberInstances - Maximum app instances allowed
- total
App numberTasks - total
Memory number - Maximum memory usage allowed
- total
Route numberPorts - Maximum routes with reserved ports
- total
Routes number - Maximum routes allowed
- total
Service numberKeys - total
Services number - Maximum services allowed
- allow_
paid_ boolservice_ plans - 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_ strid - The GUID of the quota
- total_
app_ floatinstances - Maximum app instances allowed
- total_
app_ floattasks - total_
memory float - Maximum memory usage allowed
- total_
route_ floatports - Maximum routes with reserved ports
- total_
routes float - Maximum routes allowed
- total_
service_ floatkeys - total_
services float - Maximum services allowed
- allow
Paid BooleanService Plans - 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 Number - Maximum memory per application instance
- name String
- The name you use to identify the quota or plan in Cloud Foundry
- org String
- space
Quota StringId - The GUID of the quota
- total
App NumberInstances - Maximum app instances allowed
- total
App NumberTasks - total
Memory Number - Maximum memory usage allowed
- total
Route NumberPorts - Maximum routes with reserved ports
- total
Routes Number - Maximum routes allowed
- total
Service NumberKeys - total
Services 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.