1. Packages
  2. HashiCorp Vault Provider
  3. API Docs
  4. transit
  5. getEncrypt
HashiCorp Vault v6.6.0 published on Thursday, Mar 13, 2025 by Pulumi

vault.transit.getEncrypt

Explore with Pulumi AI

HashiCorp Vault v6.6.0 published on Thursday, Mar 13, 2025 by Pulumi

This is a data source which can be used to encrypt plaintext using a Vault Transit key.

Using getEncrypt

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getEncrypt(args: GetEncryptArgs, opts?: InvokeOptions): Promise<GetEncryptResult>
function getEncryptOutput(args: GetEncryptOutputArgs, opts?: InvokeOptions): Output<GetEncryptResult>
Copy
def get_encrypt(backend: Optional[str] = None,
                context: Optional[str] = None,
                key: Optional[str] = None,
                key_version: Optional[int] = None,
                namespace: Optional[str] = None,
                plaintext: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetEncryptResult
def get_encrypt_output(backend: Optional[pulumi.Input[str]] = None,
                context: Optional[pulumi.Input[str]] = None,
                key: Optional[pulumi.Input[str]] = None,
                key_version: Optional[pulumi.Input[int]] = None,
                namespace: Optional[pulumi.Input[str]] = None,
                plaintext: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetEncryptResult]
Copy
func GetEncrypt(ctx *Context, args *GetEncryptArgs, opts ...InvokeOption) (*GetEncryptResult, error)
func GetEncryptOutput(ctx *Context, args *GetEncryptOutputArgs, opts ...InvokeOption) GetEncryptResultOutput
Copy

> Note: This function is named GetEncrypt in the Go SDK.

public static class GetEncrypt 
{
    public static Task<GetEncryptResult> InvokeAsync(GetEncryptArgs args, InvokeOptions? opts = null)
    public static Output<GetEncryptResult> Invoke(GetEncryptInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEncryptResult> getEncrypt(GetEncryptArgs args, InvokeOptions options)
public static Output<GetEncryptResult> getEncrypt(GetEncryptArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vault:transit/getEncrypt:getEncrypt
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Backend This property is required. string
Key This property is required. string
Plaintext This property is required. string
Context string
KeyVersion int
Namespace Changes to this property will trigger replacement. string
Backend This property is required. string
Key This property is required. string
Plaintext This property is required. string
Context string
KeyVersion int
Namespace Changes to this property will trigger replacement. string
backend This property is required. String
key This property is required. String
plaintext This property is required. String
context String
keyVersion Integer
namespace Changes to this property will trigger replacement. String
backend This property is required. string
key This property is required. string
plaintext This property is required. string
context string
keyVersion number
namespace Changes to this property will trigger replacement. string
backend This property is required. str
key This property is required. str
plaintext This property is required. str
context str
key_version int
namespace Changes to this property will trigger replacement. str
backend This property is required. String
key This property is required. String
plaintext This property is required. String
context String
keyVersion Number
namespace Changes to this property will trigger replacement. String

getEncrypt Result

The following output properties are available:

Backend string
Ciphertext string
Encrypted ciphertext returned from Vault
Id string
The provider-assigned unique ID for this managed resource.
Key string
Plaintext string
Context string
KeyVersion int
Namespace string
Backend string
Ciphertext string
Encrypted ciphertext returned from Vault
Id string
The provider-assigned unique ID for this managed resource.
Key string
Plaintext string
Context string
KeyVersion int
Namespace string
backend String
ciphertext String
Encrypted ciphertext returned from Vault
id String
The provider-assigned unique ID for this managed resource.
key String
plaintext String
context String
keyVersion Integer
namespace String
backend string
ciphertext string
Encrypted ciphertext returned from Vault
id string
The provider-assigned unique ID for this managed resource.
key string
plaintext string
context string
keyVersion number
namespace string
backend str
ciphertext str
Encrypted ciphertext returned from Vault
id str
The provider-assigned unique ID for this managed resource.
key str
plaintext str
context str
key_version int
namespace str
backend String
ciphertext String
Encrypted ciphertext returned from Vault
id String
The provider-assigned unique ID for this managed resource.
key String
plaintext String
context String
keyVersion Number
namespace String

Package Details

Repository
Vault pulumi/pulumi-vault
License
Apache-2.0
Notes
This Pulumi package is based on the vault Terraform Provider.
HashiCorp Vault v6.6.0 published on Thursday, Mar 13, 2025 by Pulumi