NomadSecretRole

class NomadSecretRole : KotlinCustomResource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const config = new vault.NomadSecretBackend("config", {
backend: "nomad",
description: "test description",
defaultLeaseTtlSeconds: 3600,
maxLeaseTtlSeconds: 7200,
address: "https://127.0.0.1:4646",
token: "ae20ceaa-...",
});
const test = new vault.NomadSecretRole("test", {
backend: config.backend,
role: "test",
type: "client",
policies: ["readonly"],
});
import pulumi
import pulumi_vault as vault
config = vault.NomadSecretBackend("config",
backend="nomad",
description="test description",
default_lease_ttl_seconds=3600,
max_lease_ttl_seconds=7200,
address="https://127.0.0.1:4646",
token="ae20ceaa-...")
test = vault.NomadSecretRole("test",
backend=config.backend,
role="test",
type="client",
policies=["readonly"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var config = new Vault.NomadSecretBackend("config", new()
{
Backend = "nomad",
Description = "test description",
DefaultLeaseTtlSeconds = 3600,
MaxLeaseTtlSeconds = 7200,
Address = "https://127.0.0.1:4646",
Token = "ae20ceaa-...",
});
var test = new Vault.NomadSecretRole("test", new()
{
Backend = config.Backend,
Role = "test",
Type = "client",
Policies = new[]
{
"readonly",
},
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
config, err := vault.NewNomadSecretBackend(ctx, "config", &vault.NomadSecretBackendArgs{
Backend: pulumi.String("nomad"),
Description: pulumi.String("test description"),
DefaultLeaseTtlSeconds: pulumi.Int(3600),
MaxLeaseTtlSeconds: pulumi.Int(7200),
Address: pulumi.String("https://127.0.0.1:4646"),
Token: pulumi.String("ae20ceaa-..."),
})
if err != nil {
return err
}
_, err = vault.NewNomadSecretRole(ctx, "test", &vault.NomadSecretRoleArgs{
Backend: config.Backend,
Role: pulumi.String("test"),
Type: pulumi.String("client"),
Policies: pulumi.StringArray{
pulumi.String("readonly"),
},
})
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.NomadSecretBackend;
import com.pulumi.vault.NomadSecretBackendArgs;
import com.pulumi.vault.NomadSecretRole;
import com.pulumi.vault.NomadSecretRoleArgs;
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 config = new NomadSecretBackend("config", NomadSecretBackendArgs.builder()
.backend("nomad")
.description("test description")
.defaultLeaseTtlSeconds(3600)
.maxLeaseTtlSeconds(7200)
.address("https://127.0.0.1:4646")
.token("ae20ceaa-...")
.build());
var test = new NomadSecretRole("test", NomadSecretRoleArgs.builder()
.backend(config.backend())
.role("test")
.type("client")
.policies("readonly")
.build());
}
}
resources:
config:
type: vault:NomadSecretBackend
properties:
backend: nomad
description: test description
defaultLeaseTtlSeconds: '3600'
maxLeaseTtlSeconds: '7200'
address: https://127.0.0.1:4646
token: ae20ceaa-...
test:
type: vault:NomadSecretRole
properties:
backend: ${config.backend}
role: test
type: client
policies:
- readonly

Import

Nomad secret role can be imported using the backend, e.g.

$ pulumi import vault:index/nomadSecretRole:NomadSecretRole bob nomad/role/bob

Properties

Link copied to clipboard
val backend: Output<String>

The unique path this backend should be mounted at.

Link copied to clipboard
val global: Output<Boolean>

Specifies if the generated token should be global. Defaults to false.

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

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 policies: Output<List<String>>

List of policies attached to the generated token. This setting is only used when type is 'client'.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val role: Output<String>

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

Link copied to clipboard
val type: Output<String>

Specifies the type of token to create when using this role. Valid settings are 'client' and 'management'. Defaults to 'client'.

Link copied to clipboard
val urn: Output<String>