cloudfoundry.Org
Explore with Pulumi AI
Provides a Cloud Foundry resource for managing Cloud Foundry organizations, assigning quota definitions, and members.
NOTE: This resource requires the provider to be authenticated with an account granted admin permissions. NOTE: Only modify users managed in the resource, and ignore any existing other users provisioned elsewhere
Example Usage
The following example creates an org with a specific org-wide quota.
import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";
const o1 = new cloudfoundry.Org("o1", {quota: cloudfoundry_quota.runaway.id});
import pulumi
import pulumi_cloudfoundry as cloudfoundry
o1 = cloudfoundry.Org("o1", quota=cloudfoundry_quota["runaway"]["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.NewOrg(ctx, "o1", &cloudfoundry.OrgArgs{
Quota: pulumi.Any(cloudfoundry_quota.Runaway.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 o1 = new Cloudfoundry.Org("o1", new()
{
Quota = cloudfoundry_quota.Runaway.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 o1 = new Org("o1", OrgArgs.builder()
.quota(cloudfoundry_quota.runaway().id())
.build());
}
}
resources:
o1:
type: cloudfoundry:Org
properties:
quota: ${cloudfoundry_quota.runaway.id}
Create Org Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Org(name: string, args?: OrgArgs, opts?: CustomResourceOptions);
@overload
def Org(resource_name: str,
args: Optional[OrgArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Org(resource_name: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
auditors: Optional[Sequence[str]] = None,
billing_managers: Optional[Sequence[str]] = None,
delete_recursive_allowed: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
managers: Optional[Sequence[str]] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
quota: Optional[str] = None)
func NewOrg(ctx *Context, name string, args *OrgArgs, opts ...ResourceOption) (*Org, error)
public Org(string name, OrgArgs? args = null, CustomResourceOptions? opts = null)
type: cloudfoundry:Org
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 OrgArgs
- 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 OrgArgs
- 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 OrgArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrgArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrgArgs
- 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 orgResource = new Cloudfoundry.Org("orgResource", new()
{
Annotations =
{
{ "string", "string" },
},
DeleteRecursiveAllowed = false,
Labels =
{
{ "string", "string" },
},
Name = "string",
OrgId = "string",
Quota = "string",
});
example, err := cloudfoundry.NewOrg(ctx, "orgResource", &cloudfoundry.OrgArgs{
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
DeleteRecursiveAllowed: pulumi.Bool(false),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
OrgId: pulumi.String("string"),
Quota: pulumi.String("string"),
})
var orgResource = new Org("orgResource", OrgArgs.builder()
.annotations(Map.of("string", "string"))
.deleteRecursiveAllowed(false)
.labels(Map.of("string", "string"))
.name("string")
.orgId("string")
.quota("string")
.build());
org_resource = cloudfoundry.Org("orgResource",
annotations={
"string": "string",
},
delete_recursive_allowed=False,
labels={
"string": "string",
},
name="string",
org_id="string",
quota="string")
const orgResource = new cloudfoundry.Org("orgResource", {
annotations: {
string: "string",
},
deleteRecursiveAllowed: false,
labels: {
string: "string",
},
name: "string",
orgId: "string",
quota: "string",
});
type: cloudfoundry:Org
properties:
annotations:
string: string
deleteRecursiveAllowed: false
labels:
string: string
name: string
orgId: string
quota: string
Org 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 Org resource accepts the following input properties:
- Annotations Dictionary<string, string>
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- Auditors List<string>
- Billing
Managers List<string> - Delete
Recursive boolAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - Labels Dictionary<string, string>
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- Managers List<string>
- Name string
- The name of the Org in Cloud Foundry
- Org
Id string - The GUID of the organization
- Quota string
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- Annotations map[string]string
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- Auditors []string
- Billing
Managers []string - Delete
Recursive boolAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - Labels map[string]string
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- Managers []string
- Name string
- The name of the Org in Cloud Foundry
- Org
Id string - The GUID of the organization
- Quota string
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- annotations Map<String,String>
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- auditors List<String>
- billing
Managers List<String> - delete
Recursive BooleanAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - labels Map<String,String>
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- managers List<String>
- name String
- The name of the Org in Cloud Foundry
- org
Id String - The GUID of the organization
- quota String
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- annotations {[key: string]: string}
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- auditors string[]
- billing
Managers string[] - delete
Recursive booleanAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - labels {[key: string]: string}
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- managers string[]
- name string
- The name of the Org in Cloud Foundry
- org
Id string - The GUID of the organization
- quota string
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- annotations Mapping[str, str]
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- auditors Sequence[str]
- billing_
managers Sequence[str] - delete_
recursive_ boolallowed - Allow recursive delete of spaces within the organization. Default:
true
. - labels Mapping[str, str]
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- managers Sequence[str]
- name str
- The name of the Org in Cloud Foundry
- org_
id str - The GUID of the organization
- quota str
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- annotations Map<String>
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- auditors List<String>
- billing
Managers List<String> - delete
Recursive BooleanAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - labels Map<String>
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- managers List<String>
- name String
- The name of the Org in Cloud Foundry
- org
Id String - The GUID of the organization
- quota String
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
Outputs
All input properties are implicitly available as output properties. Additionally, the Org 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 Org Resource
Get an existing Org 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?: OrgState, opts?: CustomResourceOptions): Org
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
auditors: Optional[Sequence[str]] = None,
billing_managers: Optional[Sequence[str]] = None,
delete_recursive_allowed: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
managers: Optional[Sequence[str]] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
quota: Optional[str] = None) -> Org
func GetOrg(ctx *Context, name string, id IDInput, state *OrgState, opts ...ResourceOption) (*Org, error)
public static Org Get(string name, Input<string> id, OrgState? state, CustomResourceOptions? opts = null)
public static Org get(String name, Output<String> id, OrgState state, CustomResourceOptions options)
resources: _: type: cloudfoundry:Org 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.
- Annotations Dictionary<string, string>
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- Auditors List<string>
- Billing
Managers List<string> - Delete
Recursive boolAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - Labels Dictionary<string, string>
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- Managers List<string>
- Name string
- The name of the Org in Cloud Foundry
- Org
Id string - The GUID of the organization
- Quota string
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- Annotations map[string]string
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- Auditors []string
- Billing
Managers []string - Delete
Recursive boolAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - Labels map[string]string
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- Managers []string
- Name string
- The name of the Org in Cloud Foundry
- Org
Id string - The GUID of the organization
- Quota string
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- annotations Map<String,String>
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- auditors List<String>
- billing
Managers List<String> - delete
Recursive BooleanAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - labels Map<String,String>
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- managers List<String>
- name String
- The name of the Org in Cloud Foundry
- org
Id String - The GUID of the organization
- quota String
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- annotations {[key: string]: string}
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- auditors string[]
- billing
Managers string[] - delete
Recursive booleanAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - labels {[key: string]: string}
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- managers string[]
- name string
- The name of the Org in Cloud Foundry
- org
Id string - The GUID of the organization
- quota string
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- annotations Mapping[str, str]
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- auditors Sequence[str]
- billing_
managers Sequence[str] - delete_
recursive_ boolallowed - Allow recursive delete of spaces within the organization. Default:
true
. - labels Mapping[str, str]
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- managers Sequence[str]
- name str
- The name of the Org in Cloud Foundry
- org_
id str - The GUID of the organization
- quota str
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
- annotations Map<String>
- Add annotations as described here. Works only on cloud foundry with api >= v3.63.
- auditors List<String>
- billing
Managers List<String> - delete
Recursive BooleanAllowed - Allow recursive delete of spaces within the organization. Default:
true
. - labels Map<String>
- Add labels as described here. Works only on cloud foundry with api >= v3.63.
- managers List<String>
- name String
- The name of the Org in Cloud Foundry
- org
Id String - The GUID of the organization
- quota String
- The ID of quota or plan to be given to this Org. By default, no quota is assigned to the org.
Import
An existing Organization can be imported using its guid, e.g.
bash
$ pulumi import cloudfoundry:index/org:Org o1 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.