1. Packages
  2. Akeyless Provider
  3. API Docs
  4. getDynamicSecret
akeyless 1.9.0 published on Monday, Apr 14, 2025 by akeyless-community

akeyless.getDynamicSecret

Explore with Pulumi AI

akeyless 1.9.0 published on Monday, Apr 14, 2025 by akeyless-community

Dynamic Secret data source

Example Usage

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

const secret = akeyless.getDynamicSecret({
    path: "terraform/dynamic-secret",
});
Copy
import pulumi
import pulumi_akeyless as akeyless

secret = akeyless.get_dynamic_secret(path="terraform/dynamic-secret")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/akeyless/akeyless"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := akeyless.GetDynamicSecret(ctx, &akeyless.GetDynamicSecretArgs{
			Path: "terraform/dynamic-secret",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Akeyless = Pulumi.Akeyless;

return await Deployment.RunAsync(() => 
{
    var secret = Akeyless.GetDynamicSecret.Invoke(new()
    {
        Path = "terraform/dynamic-secret",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akeyless.AkeylessFunctions;
import com.pulumi.akeyless.inputs.GetDynamicSecretArgs;
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 secret = AkeylessFunctions.getDynamicSecret(GetDynamicSecretArgs.builder()
            .path("terraform/dynamic-secret")
            .build());

    }
}
Copy
variables:
  secret:
    fn::invoke:
      function: akeyless:getDynamicSecret
      arguments:
        path: terraform/dynamic-secret
Copy

Using getDynamicSecret

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 getDynamicSecret(args: GetDynamicSecretArgs, opts?: InvokeOptions): Promise<GetDynamicSecretResult>
function getDynamicSecretOutput(args: GetDynamicSecretOutputArgs, opts?: InvokeOptions): Output<GetDynamicSecretResult>
Copy
def get_dynamic_secret(id: Optional[str] = None,
                       path: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDynamicSecretResult
def get_dynamic_secret_output(id: Optional[pulumi.Input[str]] = None,
                       path: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDynamicSecretResult]
Copy
func GetDynamicSecret(ctx *Context, args *GetDynamicSecretArgs, opts ...InvokeOption) (*GetDynamicSecretResult, error)
func GetDynamicSecretOutput(ctx *Context, args *GetDynamicSecretOutputArgs, opts ...InvokeOption) GetDynamicSecretResultOutput
Copy

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

public static class GetDynamicSecret 
{
    public static Task<GetDynamicSecretResult> InvokeAsync(GetDynamicSecretArgs args, InvokeOptions? opts = null)
    public static Output<GetDynamicSecretResult> Invoke(GetDynamicSecretInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDynamicSecretResult> getDynamicSecret(GetDynamicSecretArgs args, InvokeOptions options)
public static Output<GetDynamicSecretResult> getDynamicSecret(GetDynamicSecretArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: akeyless:index/getDynamicSecret:getDynamicSecret
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Path This property is required. string
The path where the secret is stored. Defaults to the latest version.
Id string
The ID of this resource.
Path This property is required. string
The path where the secret is stored. Defaults to the latest version.
Id string
The ID of this resource.
path This property is required. String
The path where the secret is stored. Defaults to the latest version.
id String
The ID of this resource.
path This property is required. string
The path where the secret is stored. Defaults to the latest version.
id string
The ID of this resource.
path This property is required. str
The path where the secret is stored. Defaults to the latest version.
id str
The ID of this resource.
path This property is required. String
The path where the secret is stored. Defaults to the latest version.
id String
The ID of this resource.

getDynamicSecret Result

The following output properties are available:

Id string
The ID of this resource.
Path string
The path where the secret is stored. Defaults to the latest version.
Value string
The secret contents.
Id string
The ID of this resource.
Path string
The path where the secret is stored. Defaults to the latest version.
Value string
The secret contents.
id String
The ID of this resource.
path String
The path where the secret is stored. Defaults to the latest version.
value String
The secret contents.
id string
The ID of this resource.
path string
The path where the secret is stored. Defaults to the latest version.
value string
The secret contents.
id str
The ID of this resource.
path str
The path where the secret is stored. Defaults to the latest version.
value str
The secret contents.
id String
The ID of this resource.
path String
The path where the secret is stored. Defaults to the latest version.
value String
The secret contents.

Package Details

Repository
akeyless akeyless-community/terraform-provider-akeyless
License
Notes
This Pulumi package is based on the akeyless Terraform Provider.
akeyless 1.9.0 published on Monday, Apr 14, 2025 by akeyless-community