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

vault.transit.getDecrypt

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 decrypt ciphertext using a Vault Transit key.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";

const test = vault.transit.getDecrypt({
    backend: "transit",
    key: "test",
    ciphertext: "vault:v1:S3GtnJ5GUNCWV+/pdL9+g1Feu/nzAv+RlmTmE91Tu0rBkeIU8MEb2nSspC/1IQ==",
});
Copy
import pulumi
import pulumi_vault as vault

test = vault.transit.get_decrypt(backend="transit",
    key="test",
    ciphertext="vault:v1:S3GtnJ5GUNCWV+/pdL9+g1Feu/nzAv+RlmTmE91Tu0rBkeIU8MEb2nSspC/1IQ==")
Copy
package main

import (
	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/transit"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := transit.GetDecrypt(ctx, &transit.GetDecryptArgs{
			Backend:    "transit",
			Key:        "test",
			Ciphertext: "vault:v1:S3GtnJ5GUNCWV+/pdL9+g1Feu/nzAv+RlmTmE91Tu0rBkeIU8MEb2nSspC/1IQ==",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;

return await Deployment.RunAsync(() => 
{
    var test = Vault.Transit.GetDecrypt.Invoke(new()
    {
        Backend = "transit",
        Key = "test",
        Ciphertext = "vault:v1:S3GtnJ5GUNCWV+/pdL9+g1Feu/nzAv+RlmTmE91Tu0rBkeIU8MEb2nSspC/1IQ==",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.transit.TransitFunctions;
import com.pulumi.vault.transit.inputs.GetDecryptArgs;
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 test = TransitFunctions.getDecrypt(GetDecryptArgs.builder()
            .backend("transit")
            .key("test")
            .ciphertext("vault:v1:S3GtnJ5GUNCWV+/pdL9+g1Feu/nzAv+RlmTmE91Tu0rBkeIU8MEb2nSspC/1IQ==")
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: vault:transit:getDecrypt
      arguments:
        backend: transit
        key: test
        ciphertext: vault:v1:S3GtnJ5GUNCWV+/pdL9+g1Feu/nzAv+RlmTmE91Tu0rBkeIU8MEb2nSspC/1IQ==
Copy

Using getDecrypt

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 getDecrypt(args: GetDecryptArgs, opts?: InvokeOptions): Promise<GetDecryptResult>
function getDecryptOutput(args: GetDecryptOutputArgs, opts?: InvokeOptions): Output<GetDecryptResult>
Copy
def get_decrypt(backend: Optional[str] = None,
                ciphertext: Optional[str] = None,
                context: Optional[str] = None,
                key: Optional[str] = None,
                namespace: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetDecryptResult
def get_decrypt_output(backend: Optional[pulumi.Input[str]] = None,
                ciphertext: Optional[pulumi.Input[str]] = None,
                context: Optional[pulumi.Input[str]] = None,
                key: Optional[pulumi.Input[str]] = None,
                namespace: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetDecryptResult]
Copy
func GetDecrypt(ctx *Context, args *GetDecryptArgs, opts ...InvokeOption) (*GetDecryptResult, error)
func GetDecryptOutput(ctx *Context, args *GetDecryptOutputArgs, opts ...InvokeOption) GetDecryptResultOutput
Copy

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

public static class GetDecrypt 
{
    public static Task<GetDecryptResult> InvokeAsync(GetDecryptArgs args, InvokeOptions? opts = null)
    public static Output<GetDecryptResult> Invoke(GetDecryptInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDecryptResult> getDecrypt(GetDecryptArgs args, InvokeOptions options)
public static Output<GetDecryptResult> getDecrypt(GetDecryptArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vault:transit/getDecrypt:getDecrypt
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Backend This property is required. string
Ciphertext This property is required. string
Key This property is required. string
Context string
Namespace Changes to this property will trigger replacement. string
Backend This property is required. string
Ciphertext This property is required. string
Key This property is required. string
Context string
Namespace Changes to this property will trigger replacement. string
backend This property is required. String
ciphertext This property is required. String
key This property is required. String
context String
namespace Changes to this property will trigger replacement. String
backend This property is required. string
ciphertext This property is required. string
key This property is required. string
context string
namespace Changes to this property will trigger replacement. string
backend This property is required. str
ciphertext This property is required. str
key This property is required. str
context str
namespace Changes to this property will trigger replacement. str
backend This property is required. String
ciphertext This property is required. String
key This property is required. String
context String
namespace Changes to this property will trigger replacement. String

getDecrypt Result

The following output properties are available:

Backend string
Ciphertext string
Id string
The provider-assigned unique ID for this managed resource.
Key string
Plaintext string
Decrypted plaintext returned from Vault
Context string
Namespace string
Backend string
Ciphertext string
Id string
The provider-assigned unique ID for this managed resource.
Key string
Plaintext string
Decrypted plaintext returned from Vault
Context string
Namespace string
backend String
ciphertext String
id String
The provider-assigned unique ID for this managed resource.
key String
plaintext String
Decrypted plaintext returned from Vault
context String
namespace String
backend string
ciphertext string
id string
The provider-assigned unique ID for this managed resource.
key string
plaintext string
Decrypted plaintext returned from Vault
context string
namespace string
backend str
ciphertext str
id str
The provider-assigned unique ID for this managed resource.
key str
plaintext str
Decrypted plaintext returned from Vault
context str
namespace str
backend String
ciphertext String
id String
The provider-assigned unique ID for this managed resource.
key String
plaintext String
Decrypted plaintext returned from Vault
context String
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