bitwarden.ItemSecureNote
Explore with Pulumi AI
Manages a secure note item.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bitwarden from "@pulumi/bitwarden";
const terraform = bitwarden.getOrganization({
search: "Terraform",
});
const engineering = bitwarden.getOrgCollection({
search: "Engineering",
});
const databases = bitwarden.getFolder({
search: "Databases",
});
const example = new bitwarden.ItemSecureNote("example", {
notes: `[global]
secret = "<something sensitive>"
`,
folderId: databases.then(databases => databases.id),
organizationId: terraform.then(terraform => terraform.id),
collectionIds: [engineering.then(engineering => engineering.id)],
fields: [{
name: "category",
text: "SystemA",
}],
});
import pulumi
import pulumi_bitwarden as bitwarden
terraform = bitwarden.get_organization(search="Terraform")
engineering = bitwarden.get_org_collection(search="Engineering")
databases = bitwarden.get_folder(search="Databases")
example = bitwarden.ItemSecureNote("example",
notes="""[global]
secret = "<something sensitive>"
""",
folder_id=databases.id,
organization_id=terraform.id,
collection_ids=[engineering.id],
fields=[{
"name": "category",
"text": "SystemA",
}])
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
}
engineering, err := bitwarden.LookupOrgCollection(ctx, &bitwarden.LookupOrgCollectionArgs{
Search: pulumi.StringRef("Engineering"),
}, nil)
if err != nil {
return err
}
databases, err := bitwarden.LookupFolder(ctx, &bitwarden.LookupFolderArgs{
Search: pulumi.StringRef("Databases"),
}, nil)
if err != nil {
return err
}
_, err = bitwarden.NewItemSecureNote(ctx, "example", &bitwarden.ItemSecureNoteArgs{
Notes: pulumi.String("[global]\nsecret = \"<something sensitive>\"\n"),
FolderId: pulumi.String(databases.Id),
OrganizationId: pulumi.String(terraform.Id),
CollectionIds: pulumi.StringArray{
pulumi.String(engineering.Id),
},
Fields: bitwarden.ItemSecureNoteFieldArray{
&bitwarden.ItemSecureNoteFieldArgs{
Name: pulumi.String("category"),
Text: pulumi.String("SystemA"),
},
},
})
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 engineering = Bitwarden.GetOrgCollection.Invoke(new()
{
Search = "Engineering",
});
var databases = Bitwarden.GetFolder.Invoke(new()
{
Search = "Databases",
});
var example = new Bitwarden.ItemSecureNote("example", new()
{
Notes = @"[global]
secret = ""<something sensitive>""
",
FolderId = databases.Apply(getFolderResult => getFolderResult.Id),
OrganizationId = terraform.Apply(getOrganizationResult => getOrganizationResult.Id),
CollectionIds = new[]
{
engineering.Apply(getOrgCollectionResult => getOrgCollectionResult.Id),
},
Fields = new[]
{
new Bitwarden.Inputs.ItemSecureNoteFieldArgs
{
Name = "category",
Text = "SystemA",
},
},
});
});
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.GetOrgCollectionArgs;
import com.pulumi.bitwarden.inputs.GetFolderArgs;
import com.pulumi.bitwarden.ItemSecureNote;
import com.pulumi.bitwarden.ItemSecureNoteArgs;
import com.pulumi.bitwarden.inputs.ItemSecureNoteFieldArgs;
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 engineering = BitwardenFunctions.getOrgCollection(GetOrgCollectionArgs.builder()
.search("Engineering")
.build());
final var databases = BitwardenFunctions.getFolder(GetFolderArgs.builder()
.search("Databases")
.build());
var example = new ItemSecureNote("example", ItemSecureNoteArgs.builder()
.notes("""
[global]
secret = "<something sensitive>"
""")
.folderId(databases.applyValue(getFolderResult -> getFolderResult.id()))
.organizationId(terraform.applyValue(getOrganizationResult -> getOrganizationResult.id()))
.collectionIds(engineering.applyValue(getOrgCollectionResult -> getOrgCollectionResult.id()))
.fields(ItemSecureNoteFieldArgs.builder()
.name("category")
.text("SystemA")
.build())
.build());
}
}
resources:
example:
type: bitwarden:ItemSecureNote
properties:
notes: |
[global]
secret = "<something sensitive>"
folderId: ${databases.id}
organizationId: ${terraform.id}
collectionIds:
- ${engineering.id}
fields:
- name: category
text: SystemA
variables:
terraform:
fn::invoke:
function: bitwarden:getOrganization
arguments:
search: Terraform
engineering:
fn::invoke:
function: bitwarden:getOrgCollection
arguments:
search: Engineering
databases:
fn::invoke:
function: bitwarden:getFolder
arguments:
search: Databases
Create ItemSecureNote Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ItemSecureNote(name: string, args?: ItemSecureNoteArgs, opts?: CustomResourceOptions);
@overload
def ItemSecureNote(resource_name: str,
args: Optional[ItemSecureNoteArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ItemSecureNote(resource_name: str,
opts: Optional[ResourceOptions] = None,
collection_ids: Optional[Sequence[str]] = None,
favorite: Optional[bool] = None,
fields: Optional[Sequence[ItemSecureNoteFieldArgs]] = None,
folder_id: Optional[str] = None,
item_secure_note_id: Optional[str] = None,
name: Optional[str] = None,
notes: Optional[str] = None,
organization_id: Optional[str] = None,
reprompt: Optional[bool] = None)
func NewItemSecureNote(ctx *Context, name string, args *ItemSecureNoteArgs, opts ...ResourceOption) (*ItemSecureNote, error)
public ItemSecureNote(string name, ItemSecureNoteArgs? args = null, CustomResourceOptions? opts = null)
public ItemSecureNote(String name, ItemSecureNoteArgs args)
public ItemSecureNote(String name, ItemSecureNoteArgs args, CustomResourceOptions options)
type: bitwarden:ItemSecureNote
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 ItemSecureNoteArgs
- 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 ItemSecureNoteArgs
- 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 ItemSecureNoteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ItemSecureNoteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ItemSecureNoteArgs
- 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 itemSecureNoteResource = new Bitwarden.ItemSecureNote("itemSecureNoteResource", new()
{
CollectionIds = new[]
{
"string",
},
Favorite = false,
Fields = new[]
{
new Bitwarden.Inputs.ItemSecureNoteFieldArgs
{
Name = "string",
Boolean = false,
Hidden = "string",
Linked = "string",
Text = "string",
},
},
FolderId = "string",
ItemSecureNoteId = "string",
Name = "string",
Notes = "string",
OrganizationId = "string",
Reprompt = false,
});
example, err := bitwarden.NewItemSecureNote(ctx, "itemSecureNoteResource", &bitwarden.ItemSecureNoteArgs{
CollectionIds: pulumi.StringArray{
pulumi.String("string"),
},
Favorite: pulumi.Bool(false),
Fields: bitwarden.ItemSecureNoteFieldArray{
&bitwarden.ItemSecureNoteFieldArgs{
Name: pulumi.String("string"),
Boolean: pulumi.Bool(false),
Hidden: pulumi.String("string"),
Linked: pulumi.String("string"),
Text: pulumi.String("string"),
},
},
FolderId: pulumi.String("string"),
ItemSecureNoteId: pulumi.String("string"),
Name: pulumi.String("string"),
Notes: pulumi.String("string"),
OrganizationId: pulumi.String("string"),
Reprompt: pulumi.Bool(false),
})
var itemSecureNoteResource = new ItemSecureNote("itemSecureNoteResource", ItemSecureNoteArgs.builder()
.collectionIds("string")
.favorite(false)
.fields(ItemSecureNoteFieldArgs.builder()
.name("string")
.boolean_(false)
.hidden("string")
.linked("string")
.text("string")
.build())
.folderId("string")
.itemSecureNoteId("string")
.name("string")
.notes("string")
.organizationId("string")
.reprompt(false)
.build());
item_secure_note_resource = bitwarden.ItemSecureNote("itemSecureNoteResource",
collection_ids=["string"],
favorite=False,
fields=[{
"name": "string",
"boolean": False,
"hidden": "string",
"linked": "string",
"text": "string",
}],
folder_id="string",
item_secure_note_id="string",
name="string",
notes="string",
organization_id="string",
reprompt=False)
const itemSecureNoteResource = new bitwarden.ItemSecureNote("itemSecureNoteResource", {
collectionIds: ["string"],
favorite: false,
fields: [{
name: "string",
boolean: false,
hidden: "string",
linked: "string",
text: "string",
}],
folderId: "string",
itemSecureNoteId: "string",
name: "string",
notes: "string",
organizationId: "string",
reprompt: false,
});
type: bitwarden:ItemSecureNote
properties:
collectionIds:
- string
favorite: false
fields:
- boolean: false
hidden: string
linked: string
name: string
text: string
folderId: string
itemSecureNoteId: string
name: string
notes: string
organizationId: string
reprompt: false
ItemSecureNote 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 ItemSecureNote resource accepts the following input properties:
- Collection
Ids List<string> - Identifier of the collections the item belongs to.
- Favorite bool
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- Fields
List<Item
Secure Note Field> - Extra fields.
- Folder
Id string - Identifier of the folder.
- Item
Secure stringNote Id - Identifier.
- Name string
- Name.
- Notes string
- Notes.
- Organization
Id string - Identifier of the organization.
- Reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- Collection
Ids []string - Identifier of the collections the item belongs to.
- Favorite bool
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- Fields
[]Item
Secure Note Field Args - Extra fields.
- Folder
Id string - Identifier of the folder.
- Item
Secure stringNote Id - Identifier.
- Name string
- Name.
- Notes string
- Notes.
- Organization
Id string - Identifier of the organization.
- Reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- collection
Ids List<String> - Identifier of the collections the item belongs to.
- favorite Boolean
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- fields
List<Item
Secure Note Field> - Extra fields.
- folder
Id String - Identifier of the folder.
- item
Secure StringNote Id - Identifier.
- name String
- Name.
- notes String
- Notes.
- organization
Id String - Identifier of the organization.
- reprompt Boolean
- Require master password 're-prompt' when displaying secret in the UI.
- collection
Ids string[] - Identifier of the collections the item belongs to.
- favorite boolean
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- fields
Item
Secure Note Field[] - Extra fields.
- folder
Id string - Identifier of the folder.
- item
Secure stringNote Id - Identifier.
- name string
- Name.
- notes string
- Notes.
- organization
Id string - Identifier of the organization.
- reprompt boolean
- Require master password 're-prompt' when displaying secret in the UI.
- collection_
ids Sequence[str] - Identifier of the collections the item belongs to.
- favorite bool
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- fields
Sequence[Item
Secure Note Field Args] - Extra fields.
- folder_
id str - Identifier of the folder.
- item_
secure_ strnote_ id - Identifier.
- name str
- Name.
- notes str
- Notes.
- organization_
id str - Identifier of the organization.
- reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- collection
Ids List<String> - Identifier of the collections the item belongs to.
- favorite Boolean
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- fields List<Property Map>
- Extra fields.
- folder
Id String - Identifier of the folder.
- item
Secure StringNote Id - Identifier.
- name String
- Name.
- notes String
- Notes.
- organization
Id String - Identifier of the organization.
- reprompt Boolean
- Require master password 're-prompt' when displaying secret in the UI.
Outputs
All input properties are implicitly available as output properties. Additionally, the ItemSecureNote resource produces the following output properties:
- Attachments
List<Item
Secure Note Attachment> - List of item attachments.
- Creation
Date string - Date the item was created.
- Deleted
Date string - Date the item was deleted.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revision
Date string - Last time the item was updated.
- Attachments
[]Item
Secure Note Attachment - List of item attachments.
- Creation
Date string - Date the item was created.
- Deleted
Date string - Date the item was deleted.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revision
Date string - Last time the item was updated.
- attachments
List<Item
Secure Note Attachment> - List of item attachments.
- creation
Date String - Date the item was created.
- deleted
Date String - Date the item was deleted.
- id String
- The provider-assigned unique ID for this managed resource.
- revision
Date String - Last time the item was updated.
- attachments
Item
Secure Note Attachment[] - List of item attachments.
- creation
Date string - Date the item was created.
- deleted
Date string - Date the item was deleted.
- id string
- The provider-assigned unique ID for this managed resource.
- revision
Date string - Last time the item was updated.
- attachments
Sequence[Item
Secure Note Attachment] - List of item attachments.
- creation_
date str - Date the item was created.
- deleted_
date str - Date the item was deleted.
- id str
- The provider-assigned unique ID for this managed resource.
- revision_
date str - Last time the item was updated.
- attachments List<Property Map>
- List of item attachments.
- creation
Date String - Date the item was created.
- deleted
Date String - Date the item was deleted.
- id String
- The provider-assigned unique ID for this managed resource.
- revision
Date String - Last time the item was updated.
Look up Existing ItemSecureNote Resource
Get an existing ItemSecureNote 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?: ItemSecureNoteState, opts?: CustomResourceOptions): ItemSecureNote
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
attachments: Optional[Sequence[ItemSecureNoteAttachmentArgs]] = None,
collection_ids: Optional[Sequence[str]] = None,
creation_date: Optional[str] = None,
deleted_date: Optional[str] = None,
favorite: Optional[bool] = None,
fields: Optional[Sequence[ItemSecureNoteFieldArgs]] = None,
folder_id: Optional[str] = None,
item_secure_note_id: Optional[str] = None,
name: Optional[str] = None,
notes: Optional[str] = None,
organization_id: Optional[str] = None,
reprompt: Optional[bool] = None,
revision_date: Optional[str] = None) -> ItemSecureNote
func GetItemSecureNote(ctx *Context, name string, id IDInput, state *ItemSecureNoteState, opts ...ResourceOption) (*ItemSecureNote, error)
public static ItemSecureNote Get(string name, Input<string> id, ItemSecureNoteState? state, CustomResourceOptions? opts = null)
public static ItemSecureNote get(String name, Output<String> id, ItemSecureNoteState state, CustomResourceOptions options)
resources: _: type: bitwarden:ItemSecureNote 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.
- Attachments
List<Item
Secure Note Attachment> - List of item attachments.
- Collection
Ids List<string> - Identifier of the collections the item belongs to.
- Creation
Date string - Date the item was created.
- Deleted
Date string - Date the item was deleted.
- Favorite bool
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- Fields
List<Item
Secure Note Field> - Extra fields.
- Folder
Id string - Identifier of the folder.
- Item
Secure stringNote Id - Identifier.
- Name string
- Name.
- Notes string
- Notes.
- Organization
Id string - Identifier of the organization.
- Reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- Revision
Date string - Last time the item was updated.
- Attachments
[]Item
Secure Note Attachment Args - List of item attachments.
- Collection
Ids []string - Identifier of the collections the item belongs to.
- Creation
Date string - Date the item was created.
- Deleted
Date string - Date the item was deleted.
- Favorite bool
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- Fields
[]Item
Secure Note Field Args - Extra fields.
- Folder
Id string - Identifier of the folder.
- Item
Secure stringNote Id - Identifier.
- Name string
- Name.
- Notes string
- Notes.
- Organization
Id string - Identifier of the organization.
- Reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- Revision
Date string - Last time the item was updated.
- attachments
List<Item
Secure Note Attachment> - List of item attachments.
- collection
Ids List<String> - Identifier of the collections the item belongs to.
- creation
Date String - Date the item was created.
- deleted
Date String - Date the item was deleted.
- favorite Boolean
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- fields
List<Item
Secure Note Field> - Extra fields.
- folder
Id String - Identifier of the folder.
- item
Secure StringNote Id - Identifier.
- name String
- Name.
- notes String
- Notes.
- organization
Id String - Identifier of the organization.
- reprompt Boolean
- Require master password 're-prompt' when displaying secret in the UI.
- revision
Date String - Last time the item was updated.
- attachments
Item
Secure Note Attachment[] - List of item attachments.
- collection
Ids string[] - Identifier of the collections the item belongs to.
- creation
Date string - Date the item was created.
- deleted
Date string - Date the item was deleted.
- favorite boolean
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- fields
Item
Secure Note Field[] - Extra fields.
- folder
Id string - Identifier of the folder.
- item
Secure stringNote Id - Identifier.
- name string
- Name.
- notes string
- Notes.
- organization
Id string - Identifier of the organization.
- reprompt boolean
- Require master password 're-prompt' when displaying secret in the UI.
- revision
Date string - Last time the item was updated.
- attachments
Sequence[Item
Secure Note Attachment Args] - List of item attachments.
- collection_
ids Sequence[str] - Identifier of the collections the item belongs to.
- creation_
date str - Date the item was created.
- deleted_
date str - Date the item was deleted.
- favorite bool
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- fields
Sequence[Item
Secure Note Field Args] - Extra fields.
- folder_
id str - Identifier of the folder.
- item_
secure_ strnote_ id - Identifier.
- name str
- Name.
- notes str
- Notes.
- organization_
id str - Identifier of the organization.
- reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- revision_
date str - Last time the item was updated.
- attachments List<Property Map>
- List of item attachments.
- collection
Ids List<String> - Identifier of the collections the item belongs to.
- creation
Date String - Date the item was created.
- deleted
Date String - Date the item was deleted.
- favorite Boolean
- Mark as a Favorite to have item appear at the top of your Vault in the UI.
- fields List<Property Map>
- Extra fields.
- folder
Id String - Identifier of the folder.
- item
Secure StringNote Id - Identifier.
- name String
- Name.
- notes String
- Notes.
- organization
Id String - Identifier of the organization.
- reprompt Boolean
- Require master password 're-prompt' when displaying secret in the UI.
- revision
Date String - Last time the item was updated.
Supporting Types
ItemSecureNoteAttachment, ItemSecureNoteAttachmentArgs
ItemSecureNoteField, ItemSecureNoteFieldArgs
Import
$ pulumi import bitwarden:index/itemSecureNote:ItemSecureNote example <secure_note_item_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.