SecretBackendStaticRoleArgs

data class SecretBackendStaticRoleArgs(val backend: Output<String>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val rotationPeriod: Output<Int>? = null, val username: Output<String>? = null) : ConvertibleToJava<SecretBackendStaticRoleArgs>

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const aws = new vault.aws.SecretBackend("aws", {
path: "my-aws",
description: "Obtain AWS credentials.",
});
const role = new vault.aws.SecretBackendStaticRole("role", {
backend: aws.path,
name: "test",
username: "my-test-user",
rotationPeriod: 3600,
});
import pulumi
import pulumi_vault as vault
aws = vault.aws.SecretBackend("aws",
path="my-aws",
description="Obtain AWS credentials.")
role = vault.aws.SecretBackendStaticRole("role",
backend=aws.path,
name="test",
username="my-test-user",
rotation_period=3600)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var aws = new Vault.Aws.SecretBackend("aws", new()
{
Path = "my-aws",
Description = "Obtain AWS credentials.",
});
var role = new Vault.Aws.SecretBackendStaticRole("role", new()
{
Backend = aws.Path,
Name = "test",
Username = "my-test-user",
RotationPeriod = 3600,
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/aws"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
aws, err := aws.NewSecretBackend(ctx, "aws", &aws.SecretBackendArgs{
Path: pulumi.String("my-aws"),
Description: pulumi.String("Obtain AWS credentials."),
})
if err != nil {
return err
}
_, err = aws.NewSecretBackendStaticRole(ctx, "role", &aws.SecretBackendStaticRoleArgs{
Backend: aws.Path,
Name: pulumi.String("test"),
Username: pulumi.String("my-test-user"),
RotationPeriod: pulumi.Int(3600),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.aws.SecretBackend;
import com.pulumi.vault.aws.SecretBackendArgs;
import com.pulumi.vault.aws.SecretBackendStaticRole;
import com.pulumi.vault.aws.SecretBackendStaticRoleArgs;
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) {
var aws = new SecretBackend("aws", SecretBackendArgs.builder()
.path("my-aws")
.description("Obtain AWS credentials.")
.build());
var role = new SecretBackendStaticRole("role", SecretBackendStaticRoleArgs.builder()
.backend(aws.path())
.name("test")
.username("my-test-user")
.rotationPeriod("3600")
.build());
}
}
resources:
aws:
type: vault:aws:SecretBackend
properties:
path: my-aws
description: Obtain AWS credentials.
role:
type: vault:aws:SecretBackendStaticRole
properties:
backend: ${aws.path}
name: test
username: my-test-user
rotationPeriod: '3600'

Import

AWS secret backend static role can be imported using the full path to the role of the form: <mount_path>/static-roles/<role_name> e.g.

$ pulumi import vault:aws/secretBackendStaticRole:SecretBackendStaticRole role aws/static-roles/example-role

Constructors

Link copied to clipboard
constructor(backend: Output<String>? = null, name: Output<String>? = null, namespace: Output<String>? = null, rotationPeriod: Output<Int>? = null, username: Output<String>? = null)

Properties

Link copied to clipboard
val backend: Output<String>? = null

The unique path this backend should be mounted at. Must not begin or end with a /. Defaults to aws

Link copied to clipboard
val name: Output<String>? = null

The name to identify this role within the backend. Must be unique within the backend.

Link copied to clipboard
val namespace: Output<String>? = null

The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.

Link copied to clipboard
val rotationPeriod: Output<Int>? = null

How often Vault should rotate the password of the user entry.

Link copied to clipboard
val username: Output<String>? = null

The username of the existing AWS IAM to manage password rotation for.

Functions

Link copied to clipboard
open override fun toJava(): SecretBackendStaticRoleArgs