cloudfoundry.SpaceUsers
Explore with Pulumi AI
Provides a Cloud Foundry resource for managing Cloud Foundry space members.
NOTE: This resource requires the provider to be authenticated with an account granted at least with
OrgManager
permission. NOTE: Only modify users managed in the resource, and ignore any existing other users provisioned elsewhere if not usingforce
attribute.
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 su1 = new cloudfoundry.SpaceUsers("su1", {
space: "space-id",
managers: [
data.cloudfoundry_user.tl.id,
"username",
],
developers: [
data.cloudfoundry_user.tl.id,
data.cloudfoundry_user.dev1.id,
data.cloudfoundry_user.dev2.id,
"username",
],
auditors: [
data.cloudfoundry_user.adr.id,
data.cloudfoundry_user.dev3.id,
"username",
],
});
import pulumi
import pulumi_cloudfoundry as cloudfoundry
su1 = cloudfoundry.SpaceUsers("su1",
space="space-id",
managers=[
data["cloudfoundry_user"]["tl"]["id"],
"username",
],
developers=[
data["cloudfoundry_user"]["tl"]["id"],
data["cloudfoundry_user"]["dev1"]["id"],
data["cloudfoundry_user"]["dev2"]["id"],
"username",
],
auditors=[
data["cloudfoundry_user"]["adr"]["id"],
data["cloudfoundry_user"]["dev3"]["id"],
"username",
])
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.NewSpaceUsers(ctx, "su1", &cloudfoundry.SpaceUsersArgs{
Space: pulumi.String("space-id"),
Managers: pulumi.StringArray{
data.Cloudfoundry_user.Tl.Id,
pulumi.String("username"),
},
Developers: pulumi.StringArray{
data.Cloudfoundry_user.Tl.Id,
data.Cloudfoundry_user.Dev1.Id,
data.Cloudfoundry_user.Dev2.Id,
pulumi.String("username"),
},
Auditors: pulumi.StringArray{
data.Cloudfoundry_user.Adr.Id,
data.Cloudfoundry_user.Dev3.Id,
pulumi.String("username"),
},
})
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 su1 = new Cloudfoundry.SpaceUsers("su1", new()
{
Space = "space-id",
Managers = new[]
{
data.Cloudfoundry_user.Tl.Id,
"username",
},
Developers = new[]
{
data.Cloudfoundry_user.Tl.Id,
data.Cloudfoundry_user.Dev1.Id,
data.Cloudfoundry_user.Dev2.Id,
"username",
},
Auditors = new[]
{
data.Cloudfoundry_user.Adr.Id,
data.Cloudfoundry_user.Dev3.Id,
"username",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudfoundry.SpaceUsers;
import com.pulumi.cloudfoundry.SpaceUsersArgs;
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 su1 = new SpaceUsers("su1", SpaceUsersArgs.builder()
.space("space-id")
.managers(
data.cloudfoundry_user().tl().id(),
"username")
.developers(
data.cloudfoundry_user().tl().id(),
data.cloudfoundry_user().dev1().id(),
data.cloudfoundry_user().dev2().id(),
"username")
.auditors(
data.cloudfoundry_user().adr().id(),
data.cloudfoundry_user().dev3().id(),
"username")
.build());
}
}
resources:
su1:
type: cloudfoundry:SpaceUsers
properties:
space: space-id
managers:
- ${data.cloudfoundry_user.tl.id}
- username
developers:
- ${data.cloudfoundry_user.tl.id}
- ${data.cloudfoundry_user.dev1.id}
- ${data.cloudfoundry_user.dev2.id}
- username
auditors:
- ${data.cloudfoundry_user.adr.id}
- ${data.cloudfoundry_user.dev3.id}
- username
Create SpaceUsers Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SpaceUsers(name: string, args: SpaceUsersArgs, opts?: CustomResourceOptions);
@overload
def SpaceUsers(resource_name: str,
args: SpaceUsersArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SpaceUsers(resource_name: str,
opts: Optional[ResourceOptions] = None,
space: Optional[str] = None,
auditors: Optional[Sequence[str]] = None,
developers: Optional[Sequence[str]] = None,
force: Optional[bool] = None,
managers: Optional[Sequence[str]] = None,
space_users_id: Optional[str] = None)
func NewSpaceUsers(ctx *Context, name string, args SpaceUsersArgs, opts ...ResourceOption) (*SpaceUsers, error)
public SpaceUsers(string name, SpaceUsersArgs args, CustomResourceOptions? opts = null)
public SpaceUsers(String name, SpaceUsersArgs args)
public SpaceUsers(String name, SpaceUsersArgs args, CustomResourceOptions options)
type: cloudfoundry:SpaceUsers
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 SpaceUsersArgs
- 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 SpaceUsersArgs
- 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 SpaceUsersArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SpaceUsersArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SpaceUsersArgs
- 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 spaceUsersResource = new Cloudfoundry.SpaceUsers("spaceUsersResource", new()
{
Space = "string",
Auditors = new[]
{
"string",
},
Developers = new[]
{
"string",
},
Force = false,
Managers = new[]
{
"string",
},
SpaceUsersId = "string",
});
example, err := cloudfoundry.NewSpaceUsers(ctx, "spaceUsersResource", &cloudfoundry.SpaceUsersArgs{
Space: pulumi.String("string"),
Auditors: pulumi.StringArray{
pulumi.String("string"),
},
Developers: pulumi.StringArray{
pulumi.String("string"),
},
Force: pulumi.Bool(false),
Managers: pulumi.StringArray{
pulumi.String("string"),
},
SpaceUsersId: pulumi.String("string"),
})
var spaceUsersResource = new SpaceUsers("spaceUsersResource", SpaceUsersArgs.builder()
.space("string")
.auditors("string")
.developers("string")
.force(false)
.managers("string")
.spaceUsersId("string")
.build());
space_users_resource = cloudfoundry.SpaceUsers("spaceUsersResource",
space="string",
auditors=["string"],
developers=["string"],
force=False,
managers=["string"],
space_users_id="string")
const spaceUsersResource = new cloudfoundry.SpaceUsers("spaceUsersResource", {
space: "string",
auditors: ["string"],
developers: ["string"],
force: false,
managers: ["string"],
spaceUsersId: "string",
});
type: cloudfoundry:SpaceUsers
properties:
auditors:
- string
developers:
- string
force: false
managers:
- string
space: string
spaceUsersId: string
SpaceUsers 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 SpaceUsers resource accepts the following input properties:
- Space string
- Space associated guid.
- Auditors List<string>
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- Developers List<string>
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- Force bool
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- Managers List<string>
- List of users to assign SpaceManager role to. Defaults to empty list.
- Space
Users stringId
- Space string
- Space associated guid.
- Auditors []string
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- Developers []string
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- Force bool
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- Managers []string
- List of users to assign SpaceManager role to. Defaults to empty list.
- Space
Users stringId
- space String
- Space associated guid.
- auditors List<String>
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- developers List<String>
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- force Boolean
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- managers List<String>
- List of users to assign SpaceManager role to. Defaults to empty list.
- space
Users StringId
- space string
- Space associated guid.
- auditors string[]
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- developers string[]
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- force boolean
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- managers string[]
- List of users to assign SpaceManager role to. Defaults to empty list.
- space
Users stringId
- space str
- Space associated guid.
- auditors Sequence[str]
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- developers Sequence[str]
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- force bool
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- managers Sequence[str]
- List of users to assign SpaceManager role to. Defaults to empty list.
- space_
users_ strid
- space String
- Space associated guid.
- auditors List<String>
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- developers List<String>
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- force Boolean
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- managers List<String>
- List of users to assign SpaceManager role to. Defaults to empty list.
- space
Users StringId
Outputs
All input properties are implicitly available as output properties. Additionally, the SpaceUsers 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 SpaceUsers Resource
Get an existing SpaceUsers 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?: SpaceUsersState, opts?: CustomResourceOptions): SpaceUsers
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auditors: Optional[Sequence[str]] = None,
developers: Optional[Sequence[str]] = None,
force: Optional[bool] = None,
managers: Optional[Sequence[str]] = None,
space: Optional[str] = None,
space_users_id: Optional[str] = None) -> SpaceUsers
func GetSpaceUsers(ctx *Context, name string, id IDInput, state *SpaceUsersState, opts ...ResourceOption) (*SpaceUsers, error)
public static SpaceUsers Get(string name, Input<string> id, SpaceUsersState? state, CustomResourceOptions? opts = null)
public static SpaceUsers get(String name, Output<String> id, SpaceUsersState state, CustomResourceOptions options)
resources: _: type: cloudfoundry:SpaceUsers 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.
- Auditors List<string>
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- Developers List<string>
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- Force bool
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- Managers List<string>
- List of users to assign SpaceManager role to. Defaults to empty list.
- Space string
- Space associated guid.
- Space
Users stringId
- Auditors []string
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- Developers []string
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- Force bool
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- Managers []string
- List of users to assign SpaceManager role to. Defaults to empty list.
- Space string
- Space associated guid.
- Space
Users stringId
- auditors List<String>
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- developers List<String>
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- force Boolean
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- managers List<String>
- List of users to assign SpaceManager role to. Defaults to empty list.
- space String
- Space associated guid.
- space
Users StringId
- auditors string[]
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- developers string[]
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- force boolean
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- managers string[]
- List of users to assign SpaceManager role to. Defaults to empty list.
- space string
- Space associated guid.
- space
Users stringId
- auditors Sequence[str]
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- developers Sequence[str]
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- force bool
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- managers Sequence[str]
- List of users to assign SpaceManager role to. Defaults to empty list.
- space str
- Space associated guid.
- space_
users_ strid
- auditors List<String>
- List of users to assign SpaceAuditor role to. Defaults to empty list.
- developers List<String>
- List of users to assign SpaceDeveloper role to. Defaults to empty list.
- force Boolean
Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).
NOTE: User can be either an uua guid or a username as cloud foundry treat them both as valid identifier
- managers List<String>
- List of users to assign SpaceManager role to. Defaults to empty list.
- space String
- Space associated guid.
- space
Users StringId
Import
An existing Users list can be imported using its space guid, e.g.
bash
$ pulumi import cloudfoundry:index/spaceUsers:SpaceUsers su1 space-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.