published on Monday, Nov 23, 2026 by Pulumi Labs
published on Monday, Nov 23, 2026 by Pulumi Labs
A vault: a store of credentials that sessions use without the secrets appearing in an agent’s configuration. Add credentials to it with the VaultCredential resource, and make it available to the sessions an automation starts with target.vaultIds.
Deleting a vault also deletes all of its credentials.
This resource uses the beta Agents API.
Create Vault Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Vault(name: string, args?: VaultArgs, opts?: CustomResourceOptions);@overload
def Vault(resource_name: str,
args: Optional[VaultArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Vault(resource_name: str,
opts: Optional[ResourceOptions] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None)func NewVault(ctx *Context, name string, args *VaultArgs, opts ...ResourceOption) (*Vault, error)public Vault(string name, VaultArgs? args = null, CustomResourceOptions? opts = null)type: openai:Vault
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "openai_vault" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args VaultArgs
- 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 VaultArgs
- 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 VaultArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VaultArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VaultArgs
- 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 vaultResource = new Openai.Vault("vaultResource", new()
{
Metadata =
{
{ "string", "string" },
},
Name = "string",
});
example, err := openai.NewVault(ctx, "vaultResource", &openai.VaultArgs{
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
resource "openai_vault" "vaultResource" {
lifecycle {
create_before_destroy = true
}
metadata = {
"string" = "string"
}
name = "string"
}
var vaultResource = new Vault("vaultResource", VaultArgs.builder()
.metadata(Map.of("string", "string"))
.name("string")
.build());
vault_resource = openai.Vault("vaultResource",
metadata={
"string": "string",
},
name="string")
const vaultResource = new openai.Vault("vaultResource", {
metadata: {
string: "string",
},
name: "string",
});
type: openai:Vault
properties:
metadata:
string: string
name: string
Vault 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 Vault resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Vault resource produces the following output properties:
- created_
at number - When the vault was created, as a Unix timestamp in seconds.
- id string
- The provider-assigned unique ID for this managed resource.
- created_
at int - When the vault was created, as a Unix timestamp in seconds.
- id str
- The provider-assigned unique ID for this managed resource.
Look up Existing Vault Resource
Get an existing Vault 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>, opts?: CustomResourceOptions): Vault@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None) -> Vaultfunc GetVault(ctx *Context, name string, id IDInput, state *VaultState, opts ...ResourceOption) (*Vault, error)public static Vault Get(string name, Input<string> id, CustomResourceOptions? opts = null)public static Vault get(String name, Output<String> id, CustomResourceOptions options)resources: existingVault: type: openai:Vault get: id: ${id}import {
to = openai_vault.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state VaultState
- Pass nil. This resource has no state arguments.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Package Details
- Repository
- openai pulumi-labs/pulumi-openai
- License
- Apache-2.0
published on Monday, Nov 23, 2026 by Pulumi Labs