bitwarden.OrgCollection
Explore with Pulumi AI
Manages an organization collection.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bitwarden from "@pulumi/bitwarden";
const terraform = bitwarden.getOrganization({
search: "Terraform",
});
const john = terraform.then(terraform => bitwarden.getOrgMember({
email: "john@example.com",
organizationId: terraform.id,
}));
const johnsGroup = terraform.then(terraform => bitwarden.getOrgGroup({
organizationId: terraform.id,
filterName: "John's Group",
}));
const infrastructure = new bitwarden.OrgCollection("infrastructure", {organizationId: terraform.then(terraform => terraform.id)});
const generated = new bitwarden.OrgCollection("generated", {
organizationId: terraform.then(terraform => terraform.id),
members: [{
id: john.then(john => john.id),
hidePasswords: false,
readOnly: false,
manage: true,
}],
memberGroups: [{
id: johnsGroup.then(johnsGroup => johnsGroup.id),
hidePasswords: false,
readOnly: false,
manage: true,
}],
});
import pulumi
import pulumi_bitwarden as bitwarden
terraform = bitwarden.get_organization(search="Terraform")
john = bitwarden.get_org_member(email="john@example.com",
organization_id=terraform.id)
johns_group = bitwarden.get_org_group(organization_id=terraform.id,
filter_name="John's Group")
infrastructure = bitwarden.OrgCollection("infrastructure", organization_id=terraform.id)
generated = bitwarden.OrgCollection("generated",
organization_id=terraform.id,
members=[{
"id": john.id,
"hide_passwords": False,
"read_only": False,
"manage": True,
}],
member_groups=[{
"id": johns_group.id,
"hide_passwords": False,
"read_only": False,
"manage": True,
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitwarden/bitwarden"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
terraform, err := bitwarden.GetOrganization(ctx, &bitwarden.GetOrganizationArgs{
Search: pulumi.StringRef("Terraform"),
}, nil)
if err != nil {
return err
}
john, err := bitwarden.GetOrgMember(ctx, &bitwarden.GetOrgMemberArgs{
Email: pulumi.StringRef("john@example.com"),
OrganizationId: terraform.Id,
}, nil)
if err != nil {
return err
}
johnsGroup, err := bitwarden.GetOrgGroup(ctx, &bitwarden.GetOrgGroupArgs{
OrganizationId: terraform.Id,
FilterName: pulumi.StringRef("John's Group"),
}, nil)
if err != nil {
return err
}
_, err = bitwarden.NewOrgCollection(ctx, "infrastructure", &bitwarden.OrgCollectionArgs{
OrganizationId: pulumi.String(terraform.Id),
})
if err != nil {
return err
}
_, err = bitwarden.NewOrgCollection(ctx, "generated", &bitwarden.OrgCollectionArgs{
OrganizationId: pulumi.String(terraform.Id),
Members: bitwarden.OrgCollectionMemberArray{
&bitwarden.OrgCollectionMemberArgs{
Id: pulumi.String(john.Id),
HidePasswords: pulumi.Bool(false),
ReadOnly: pulumi.Bool(false),
Manage: pulumi.Bool(true),
},
},
MemberGroups: bitwarden.OrgCollectionMemberGroupArray{
&bitwarden.OrgCollectionMemberGroupArgs{
Id: pulumi.String(johnsGroup.Id),
HidePasswords: pulumi.Bool(false),
ReadOnly: pulumi.Bool(false),
Manage: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bitwarden = Pulumi.Bitwarden;
return await Deployment.RunAsync(() =>
{
var terraform = Bitwarden.GetOrganization.Invoke(new()
{
Search = "Terraform",
});
var john = Bitwarden.GetOrgMember.Invoke(new()
{
Email = "john@example.com",
OrganizationId = terraform.Apply(getOrganizationResult => getOrganizationResult.Id),
});
var johnsGroup = Bitwarden.GetOrgGroup.Invoke(new()
{
OrganizationId = terraform.Apply(getOrganizationResult => getOrganizationResult.Id),
FilterName = "John's Group",
});
var infrastructure = new Bitwarden.OrgCollection("infrastructure", new()
{
OrganizationId = terraform.Apply(getOrganizationResult => getOrganizationResult.Id),
});
var generated = new Bitwarden.OrgCollection("generated", new()
{
OrganizationId = terraform.Apply(getOrganizationResult => getOrganizationResult.Id),
Members = new[]
{
new Bitwarden.Inputs.OrgCollectionMemberArgs
{
Id = john.Apply(getOrgMemberResult => getOrgMemberResult.Id),
HidePasswords = false,
ReadOnly = false,
Manage = true,
},
},
MemberGroups = new[]
{
new Bitwarden.Inputs.OrgCollectionMemberGroupArgs
{
Id = johnsGroup.Apply(getOrgGroupResult => getOrgGroupResult.Id),
HidePasswords = false,
ReadOnly = false,
Manage = true,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.bitwarden.BitwardenFunctions;
import com.pulumi.bitwarden.inputs.GetOrganizationArgs;
import com.pulumi.bitwarden.inputs.GetOrgMemberArgs;
import com.pulumi.bitwarden.inputs.GetOrgGroupArgs;
import com.pulumi.bitwarden.OrgCollection;
import com.pulumi.bitwarden.OrgCollectionArgs;
import com.pulumi.bitwarden.inputs.OrgCollectionMemberArgs;
import com.pulumi.bitwarden.inputs.OrgCollectionMemberGroupArgs;
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) {
final var terraform = BitwardenFunctions.getOrganization(GetOrganizationArgs.builder()
.search("Terraform")
.build());
final var john = BitwardenFunctions.getOrgMember(GetOrgMemberArgs.builder()
.email("john@example.com")
.organizationId(terraform.applyValue(getOrganizationResult -> getOrganizationResult.id()))
.build());
final var johnsGroup = BitwardenFunctions.getOrgGroup(GetOrgGroupArgs.builder()
.organizationId(terraform.applyValue(getOrganizationResult -> getOrganizationResult.id()))
.filterName("John's Group")
.build());
var infrastructure = new OrgCollection("infrastructure", OrgCollectionArgs.builder()
.organizationId(terraform.applyValue(getOrganizationResult -> getOrganizationResult.id()))
.build());
var generated = new OrgCollection("generated", OrgCollectionArgs.builder()
.organizationId(terraform.applyValue(getOrganizationResult -> getOrganizationResult.id()))
.members(OrgCollectionMemberArgs.builder()
.id(john.applyValue(getOrgMemberResult -> getOrgMemberResult.id()))
.hidePasswords(false)
.readOnly(false)
.manage(true)
.build())
.memberGroups(OrgCollectionMemberGroupArgs.builder()
.id(johnsGroup.applyValue(getOrgGroupResult -> getOrgGroupResult.id()))
.hidePasswords(false)
.readOnly(false)
.manage(true)
.build())
.build());
}
}
resources:
infrastructure:
type: bitwarden:OrgCollection
properties:
organizationId: ${terraform.id}
generated:
type: bitwarden:OrgCollection
properties:
organizationId: ${terraform.id}
members:
- id: ${john.id}
hidePasswords: false
readOnly: false
manage: true
memberGroups:
- id: ${johnsGroup.id}
hidePasswords: false
readOnly: false
manage: true
variables:
terraform:
fn::invoke:
function: bitwarden:getOrganization
arguments:
search: Terraform
john:
fn::invoke:
function: bitwarden:getOrgMember
arguments:
email: john@example.com
organizationId: ${terraform.id}
johnsGroup:
fn::invoke:
function: bitwarden:getOrgGroup
arguments:
organizationId: ${terraform.id}
filterName: John's Group
Create OrgCollection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OrgCollection(name: string, args: OrgCollectionArgs, opts?: CustomResourceOptions);
@overload
def OrgCollection(resource_name: str,
args: OrgCollectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OrgCollection(resource_name: str,
opts: Optional[ResourceOptions] = None,
organization_id: Optional[str] = None,
member_groups: Optional[Sequence[OrgCollectionMemberGroupArgs]] = None,
members: Optional[Sequence[OrgCollectionMemberArgs]] = None,
name: Optional[str] = None,
org_collection_id: Optional[str] = None)
func NewOrgCollection(ctx *Context, name string, args OrgCollectionArgs, opts ...ResourceOption) (*OrgCollection, error)
public OrgCollection(string name, OrgCollectionArgs args, CustomResourceOptions? opts = null)
public OrgCollection(String name, OrgCollectionArgs args)
public OrgCollection(String name, OrgCollectionArgs args, CustomResourceOptions options)
type: bitwarden:OrgCollection
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 OrgCollectionArgs
- 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 OrgCollectionArgs
- 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 OrgCollectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrgCollectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrgCollectionArgs
- 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 orgCollectionResource = new Bitwarden.OrgCollection("orgCollectionResource", new()
{
OrganizationId = "string",
MemberGroups = new[]
{
new Bitwarden.Inputs.OrgCollectionMemberGroupArgs
{
Id = "string",
HidePasswords = false,
Manage = false,
ReadOnly = false,
},
},
Members = new[]
{
new Bitwarden.Inputs.OrgCollectionMemberArgs
{
Id = "string",
HidePasswords = false,
Manage = false,
ReadOnly = false,
},
},
Name = "string",
OrgCollectionId = "string",
});
example, err := bitwarden.NewOrgCollection(ctx, "orgCollectionResource", &bitwarden.OrgCollectionArgs{
OrganizationId: pulumi.String("string"),
MemberGroups: bitwarden.OrgCollectionMemberGroupArray{
&bitwarden.OrgCollectionMemberGroupArgs{
Id: pulumi.String("string"),
HidePasswords: pulumi.Bool(false),
Manage: pulumi.Bool(false),
ReadOnly: pulumi.Bool(false),
},
},
Members: bitwarden.OrgCollectionMemberArray{
&bitwarden.OrgCollectionMemberArgs{
Id: pulumi.String("string"),
HidePasswords: pulumi.Bool(false),
Manage: pulumi.Bool(false),
ReadOnly: pulumi.Bool(false),
},
},
Name: pulumi.String("string"),
OrgCollectionId: pulumi.String("string"),
})
var orgCollectionResource = new OrgCollection("orgCollectionResource", OrgCollectionArgs.builder()
.organizationId("string")
.memberGroups(OrgCollectionMemberGroupArgs.builder()
.id("string")
.hidePasswords(false)
.manage(false)
.readOnly(false)
.build())
.members(OrgCollectionMemberArgs.builder()
.id("string")
.hidePasswords(false)
.manage(false)
.readOnly(false)
.build())
.name("string")
.orgCollectionId("string")
.build());
org_collection_resource = bitwarden.OrgCollection("orgCollectionResource",
organization_id="string",
member_groups=[{
"id": "string",
"hide_passwords": False,
"manage": False,
"read_only": False,
}],
members=[{
"id": "string",
"hide_passwords": False,
"manage": False,
"read_only": False,
}],
name="string",
org_collection_id="string")
const orgCollectionResource = new bitwarden.OrgCollection("orgCollectionResource", {
organizationId: "string",
memberGroups: [{
id: "string",
hidePasswords: false,
manage: false,
readOnly: false,
}],
members: [{
id: "string",
hidePasswords: false,
manage: false,
readOnly: false,
}],
name: "string",
orgCollectionId: "string",
});
type: bitwarden:OrgCollection
properties:
memberGroups:
- hidePasswords: false
id: string
manage: false
readOnly: false
members:
- hidePasswords: false
id: string
manage: false
readOnly: false
name: string
orgCollectionId: string
organizationId: string
OrgCollection 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 OrgCollection resource accepts the following input properties:
- Organization
Id string - Identifier of the organization.
- Member
Groups List<OrgCollection Member Group> - [Experimental] Member Groups of a collection.
- Members
List<Org
Collection Member> - [Experimental] Member (Users) of a collection.
- Name string
- Name.
- Org
Collection stringId - Identifier.
- Organization
Id string - Identifier of the organization.
- Member
Groups []OrgCollection Member Group Args - [Experimental] Member Groups of a collection.
- Members
[]Org
Collection Member Args - [Experimental] Member (Users) of a collection.
- Name string
- Name.
- Org
Collection stringId - Identifier.
- organization
Id String - Identifier of the organization.
- member
Groups List<OrgCollection Member Group> - [Experimental] Member Groups of a collection.
- members
List<Org
Collection Member> - [Experimental] Member (Users) of a collection.
- name String
- Name.
- org
Collection StringId - Identifier.
- organization
Id string - Identifier of the organization.
- member
Groups OrgCollection Member Group[] - [Experimental] Member Groups of a collection.
- members
Org
Collection Member[] - [Experimental] Member (Users) of a collection.
- name string
- Name.
- org
Collection stringId - Identifier.
- organization_
id str - Identifier of the organization.
- member_
groups Sequence[OrgCollection Member Group Args] - [Experimental] Member Groups of a collection.
- members
Sequence[Org
Collection Member Args] - [Experimental] Member (Users) of a collection.
- name str
- Name.
- org_
collection_ strid - Identifier.
- organization
Id String - Identifier of the organization.
- member
Groups List<Property Map> - [Experimental] Member Groups of a collection.
- members List<Property Map>
- [Experimental] Member (Users) of a collection.
- name String
- Name.
- org
Collection StringId - Identifier.
Outputs
All input properties are implicitly available as output properties. Additionally, the OrgCollection 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 OrgCollection Resource
Get an existing OrgCollection 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?: OrgCollectionState, opts?: CustomResourceOptions): OrgCollection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
member_groups: Optional[Sequence[OrgCollectionMemberGroupArgs]] = None,
members: Optional[Sequence[OrgCollectionMemberArgs]] = None,
name: Optional[str] = None,
org_collection_id: Optional[str] = None,
organization_id: Optional[str] = None) -> OrgCollection
func GetOrgCollection(ctx *Context, name string, id IDInput, state *OrgCollectionState, opts ...ResourceOption) (*OrgCollection, error)
public static OrgCollection Get(string name, Input<string> id, OrgCollectionState? state, CustomResourceOptions? opts = null)
public static OrgCollection get(String name, Output<String> id, OrgCollectionState state, CustomResourceOptions options)
resources: _: type: bitwarden:OrgCollection 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.
- Member
Groups List<OrgCollection Member Group> - [Experimental] Member Groups of a collection.
- Members
List<Org
Collection Member> - [Experimental] Member (Users) of a collection.
- Name string
- Name.
- Org
Collection stringId - Identifier.
- Organization
Id string - Identifier of the organization.
- Member
Groups []OrgCollection Member Group Args - [Experimental] Member Groups of a collection.
- Members
[]Org
Collection Member Args - [Experimental] Member (Users) of a collection.
- Name string
- Name.
- Org
Collection stringId - Identifier.
- Organization
Id string - Identifier of the organization.
- member
Groups List<OrgCollection Member Group> - [Experimental] Member Groups of a collection.
- members
List<Org
Collection Member> - [Experimental] Member (Users) of a collection.
- name String
- Name.
- org
Collection StringId - Identifier.
- organization
Id String - Identifier of the organization.
- member
Groups OrgCollection Member Group[] - [Experimental] Member Groups of a collection.
- members
Org
Collection Member[] - [Experimental] Member (Users) of a collection.
- name string
- Name.
- org
Collection stringId - Identifier.
- organization
Id string - Identifier of the organization.
- member_
groups Sequence[OrgCollection Member Group Args] - [Experimental] Member Groups of a collection.
- members
Sequence[Org
Collection Member Args] - [Experimental] Member (Users) of a collection.
- name str
- Name.
- org_
collection_ strid - Identifier.
- organization_
id str - Identifier of the organization.
- member
Groups List<Property Map> - [Experimental] Member Groups of a collection.
- members List<Property Map>
- [Experimental] Member (Users) of a collection.
- name String
- Name.
- org
Collection StringId - Identifier.
- organization
Id String - Identifier of the organization.
Supporting Types
OrgCollectionMember, OrgCollectionMemberArgs
- Id string
- [Experimental] Unique Identifier (UUID) of the user or group member.
- Hide
Passwords bool - [Experimental] Hide passwords.
- Manage bool
- [Experimental] Can manage the collection.
- Read
Only bool - [Experimental] Read/Write permissions.
- Id string
- [Experimental] Unique Identifier (UUID) of the user or group member.
- Hide
Passwords bool - [Experimental] Hide passwords.
- Manage bool
- [Experimental] Can manage the collection.
- Read
Only bool - [Experimental] Read/Write permissions.
- id String
- [Experimental] Unique Identifier (UUID) of the user or group member.
- hide
Passwords Boolean - [Experimental] Hide passwords.
- manage Boolean
- [Experimental] Can manage the collection.
- read
Only Boolean - [Experimental] Read/Write permissions.
- id string
- [Experimental] Unique Identifier (UUID) of the user or group member.
- hide
Passwords boolean - [Experimental] Hide passwords.
- manage boolean
- [Experimental] Can manage the collection.
- read
Only boolean - [Experimental] Read/Write permissions.
- id str
- [Experimental] Unique Identifier (UUID) of the user or group member.
- hide_
passwords bool - [Experimental] Hide passwords.
- manage bool
- [Experimental] Can manage the collection.
- read_
only bool - [Experimental] Read/Write permissions.
- id String
- [Experimental] Unique Identifier (UUID) of the user or group member.
- hide
Passwords Boolean - [Experimental] Hide passwords.
- manage Boolean
- [Experimental] Can manage the collection.
- read
Only Boolean - [Experimental] Read/Write permissions.
OrgCollectionMemberGroup, OrgCollectionMemberGroupArgs
- Id string
- [Experimental] Unique Identifier (UUID) of the user or group member.
- Hide
Passwords bool - [Experimental] Hide passwords.
- Manage bool
- [Experimental] Can manage the collection.
- Read
Only bool - [Experimental] Read/Write permissions.
- Id string
- [Experimental] Unique Identifier (UUID) of the user or group member.
- Hide
Passwords bool - [Experimental] Hide passwords.
- Manage bool
- [Experimental] Can manage the collection.
- Read
Only bool - [Experimental] Read/Write permissions.
- id String
- [Experimental] Unique Identifier (UUID) of the user or group member.
- hide
Passwords Boolean - [Experimental] Hide passwords.
- manage Boolean
- [Experimental] Can manage the collection.
- read
Only Boolean - [Experimental] Read/Write permissions.
- id string
- [Experimental] Unique Identifier (UUID) of the user or group member.
- hide
Passwords boolean - [Experimental] Hide passwords.
- manage boolean
- [Experimental] Can manage the collection.
- read
Only boolean - [Experimental] Read/Write permissions.
- id str
- [Experimental] Unique Identifier (UUID) of the user or group member.
- hide_
passwords bool - [Experimental] Hide passwords.
- manage bool
- [Experimental] Can manage the collection.
- read_
only bool - [Experimental] Read/Write permissions.
- id String
- [Experimental] Unique Identifier (UUID) of the user or group member.
- hide
Passwords Boolean - [Experimental] Hide passwords.
- manage Boolean
- [Experimental] Can manage the collection.
- read
Only Boolean - [Experimental] Read/Write permissions.
Import
The pulumi import
command can be used, for example:
$ pulumi import bitwarden:index/orgCollection:OrgCollection example <organization_id>/<collection_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bitwarden maxlaverse/terraform-provider-bitwarden
- License
- Notes
- This Pulumi package is based on the
bitwarden
Terraform Provider.