Backend

class Backend : KotlinCustomResource

Example Usage

Vault-1.9 And Above

You can setup the Azure secrets engine with Workload Identity Federation (WIF) for a secret-less configuration:

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const azure = new vault.azure.Backend("azure", {
subscriptionId: "11111111-2222-3333-4444-111111111111",
tenantId: "11111111-2222-3333-4444-222222222222",
clientId: "11111111-2222-3333-4444-333333333333",
identityTokenAudience: "<TOKEN_AUDIENCE>",
identityTokenTtl: "<TOKEN_TTL>",
rotationSchedule: "0 * * * SAT",
rotationWindow: 3600,
});
import pulumi
import pulumi_vault as vault
azure = vault.azure.Backend("azure",
subscription_id="11111111-2222-3333-4444-111111111111",
tenant_id="11111111-2222-3333-4444-222222222222",
client_id="11111111-2222-3333-4444-333333333333",
identity_token_audience="<TOKEN_AUDIENCE>",
identity_token_ttl="<TOKEN_TTL>",
rotation_schedule="0 * * * SAT",
rotation_window=3600)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var azure = new Vault.Azure.Backend("azure", new()
{
SubscriptionId = "11111111-2222-3333-4444-111111111111",
TenantId = "11111111-2222-3333-4444-222222222222",
ClientId = "11111111-2222-3333-4444-333333333333",
IdentityTokenAudience = "<TOKEN_AUDIENCE>",
IdentityTokenTtl = "<TOKEN_TTL>",
RotationSchedule = "0 * * * SAT",
RotationWindow = 3600,
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/azure"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azure.NewBackend(ctx, "azure", &azure.BackendArgs{
SubscriptionId: pulumi.String("11111111-2222-3333-4444-111111111111"),
TenantId: pulumi.String("11111111-2222-3333-4444-222222222222"),
ClientId: pulumi.String("11111111-2222-3333-4444-333333333333"),
IdentityTokenAudience: pulumi.String("<TOKEN_AUDIENCE>"),
IdentityTokenTtl: pulumi.Int("<TOKEN_TTL>"),
RotationSchedule: pulumi.String("0 * * * SAT"),
RotationWindow: 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.azure.Backend;
import com.pulumi.vault.azure.BackendArgs;
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 azure = new Backend("azure", BackendArgs.builder()
.subscriptionId("11111111-2222-3333-4444-111111111111")
.tenantId("11111111-2222-3333-4444-222222222222")
.clientId("11111111-2222-3333-4444-333333333333")
.identityTokenAudience("<TOKEN_AUDIENCE>")
.identityTokenTtl("<TOKEN_TTL>")
.rotationSchedule("0 * * * SAT")
.rotationWindow(3600)
.build());
}
}
resources:
azure:
type: vault:azure:Backend
properties:
subscriptionId: 11111111-2222-3333-4444-111111111111
tenantId: 11111111-2222-3333-4444-222222222222
clientId: 11111111-2222-3333-4444-333333333333
identityTokenAudience: <TOKEN_AUDIENCE>
identityTokenTtl: <TOKEN_TTL>
rotationSchedule: 0 * * * SAT
rotationWindow: 3600
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const azure = new vault.azure.Backend("azure", {
useMicrosoftGraphApi: true,
subscriptionId: "11111111-2222-3333-4444-111111111111",
tenantId: "11111111-2222-3333-4444-222222222222",
clientId: "11111111-2222-3333-4444-333333333333",
clientSecret: "12345678901234567890",
environment: "AzurePublicCloud",
rotationSchedule: "0 * * * SAT",
rotationWindow: 3600,
});
import pulumi
import pulumi_vault as vault
azure = vault.azure.Backend("azure",
use_microsoft_graph_api=True,
subscription_id="11111111-2222-3333-4444-111111111111",
tenant_id="11111111-2222-3333-4444-222222222222",
client_id="11111111-2222-3333-4444-333333333333",
client_secret="12345678901234567890",
environment="AzurePublicCloud",
rotation_schedule="0 * * * SAT",
rotation_window=3600)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var azure = new Vault.Azure.Backend("azure", new()
{
UseMicrosoftGraphApi = true,
SubscriptionId = "11111111-2222-3333-4444-111111111111",
TenantId = "11111111-2222-3333-4444-222222222222",
ClientId = "11111111-2222-3333-4444-333333333333",
ClientSecret = "12345678901234567890",
Environment = "AzurePublicCloud",
RotationSchedule = "0 * * * SAT",
RotationWindow = 3600,
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/azure"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azure.NewBackend(ctx, "azure", &azure.BackendArgs{
UseMicrosoftGraphApi: pulumi.Bool(true),
SubscriptionId: pulumi.String("11111111-2222-3333-4444-111111111111"),
TenantId: pulumi.String("11111111-2222-3333-4444-222222222222"),
ClientId: pulumi.String("11111111-2222-3333-4444-333333333333"),
ClientSecret: pulumi.String("12345678901234567890"),
Environment: pulumi.String("AzurePublicCloud"),
RotationSchedule: pulumi.String("0 * * * SAT"),
RotationWindow: 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.azure.Backend;
import com.pulumi.vault.azure.BackendArgs;
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 azure = new Backend("azure", BackendArgs.builder()
.useMicrosoftGraphApi(true)
.subscriptionId("11111111-2222-3333-4444-111111111111")
.tenantId("11111111-2222-3333-4444-222222222222")
.clientId("11111111-2222-3333-4444-333333333333")
.clientSecret("12345678901234567890")
.environment("AzurePublicCloud")
.rotationSchedule("0 * * * SAT")
.rotationWindow(3600)
.build());
}
}
resources:
azure:
type: vault:azure:Backend
properties:
useMicrosoftGraphApi: true
subscriptionId: 11111111-2222-3333-4444-111111111111
tenantId: 11111111-2222-3333-4444-222222222222
clientId: 11111111-2222-3333-4444-333333333333
clientSecret: '12345678901234567890'
environment: AzurePublicCloud
rotationSchedule: 0 * * * SAT
rotationWindow: 3600

Vault-1.8 And Below

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const azure = new vault.azure.Backend("azure", {
useMicrosoftGraphApi: false,
subscriptionId: "11111111-2222-3333-4444-111111111111",
tenantId: "11111111-2222-3333-4444-222222222222",
clientId: "11111111-2222-3333-4444-333333333333",
clientSecret: "12345678901234567890",
environment: "AzurePublicCloud",
});
import pulumi
import pulumi_vault as vault
azure = vault.azure.Backend("azure",
use_microsoft_graph_api=False,
subscription_id="11111111-2222-3333-4444-111111111111",
tenant_id="11111111-2222-3333-4444-222222222222",
client_id="11111111-2222-3333-4444-333333333333",
client_secret="12345678901234567890",
environment="AzurePublicCloud")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var azure = new Vault.Azure.Backend("azure", new()
{
UseMicrosoftGraphApi = false,
SubscriptionId = "11111111-2222-3333-4444-111111111111",
TenantId = "11111111-2222-3333-4444-222222222222",
ClientId = "11111111-2222-3333-4444-333333333333",
ClientSecret = "12345678901234567890",
Environment = "AzurePublicCloud",
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/azure"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azure.NewBackend(ctx, "azure", &azure.BackendArgs{
UseMicrosoftGraphApi: pulumi.Bool(false),
SubscriptionId: pulumi.String("11111111-2222-3333-4444-111111111111"),
TenantId: pulumi.String("11111111-2222-3333-4444-222222222222"),
ClientId: pulumi.String("11111111-2222-3333-4444-333333333333"),
ClientSecret: pulumi.String("12345678901234567890"),
Environment: pulumi.String("AzurePublicCloud"),
})
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.azure.Backend;
import com.pulumi.vault.azure.BackendArgs;
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 azure = new Backend("azure", BackendArgs.builder()
.useMicrosoftGraphApi(false)
.subscriptionId("11111111-2222-3333-4444-111111111111")
.tenantId("11111111-2222-3333-4444-222222222222")
.clientId("11111111-2222-3333-4444-333333333333")
.clientSecret("12345678901234567890")
.environment("AzurePublicCloud")
.build());
}
}
resources:
azure:
type: vault:azure:Backend
properties:
useMicrosoftGraphApi: false
subscriptionId: 11111111-2222-3333-4444-111111111111
tenantId: 11111111-2222-3333-4444-222222222222
clientId: 11111111-2222-3333-4444-333333333333
clientSecret: '12345678901234567890'
environment: AzurePublicCloud

Properties

Link copied to clipboard
val clientId: Output<String>?

The OAuth2 client id to connect to Azure.

Link copied to clipboard
val clientSecret: Output<String>?

The OAuth2 client secret to connect to Azure.

Link copied to clipboard
val description: Output<String>?

Human-friendly description of the mount for the backend.

Link copied to clipboard

Cancels all upcoming rotations of the root credential until unset. Requires Vault Enterprise 1.19+. Available only for Vault Enterprise

Link copied to clipboard
val disableRemount: Output<Boolean>?

If set, opts out of mount migration on path updates. See here for more info on Mount Migration

Link copied to clipboard
val environment: Output<String>?

The Azure environment.

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

The audience claim value. Requires Vault 1.17+. Available only for Vault Enterprise

Link copied to clipboard
val identityTokenKey: Output<String>?

The key to use for signing identity tokens. Requires Vault 1.17+. Available only for Vault Enterprise

Link copied to clipboard
val identityTokenTtl: Output<Int>

The TTL of generated identity tokens in seconds. Requires Vault 1.17+. Available only for Vault Enterprise

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 path: Output<String>?

The unique path this backend should be mounted at. Defaults to azure.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rotationPeriod: Output<Int>?

The amount of time in seconds Vault should wait before rotating the root credential. A zero value tells Vault not to rotate the root credential. The minimum rotation period is 10 seconds. Requires Vault Enterprise 1.19+. Available only for Vault Enterprise

Link copied to clipboard
val rotationSchedule: Output<String>?

The schedule, in cron-style time format, defining the schedule on which Vault should rotate the root token. Requires Vault Enterprise 1.19+. Available only for Vault Enterprise

Link copied to clipboard
val rotationWindow: Output<Int>?

The maximum amount of time in seconds allowed to complete a rotation when a scheduled token rotation occurs. The default rotation window is unbound and the minimum allowable window is 3600. Requires Vault Enterprise 1.19+. Available only for Vault Enterprise

Link copied to clipboard
val subscriptionId: Output<String>

The subscription id for the Azure Active Directory.

Link copied to clipboard
val tenantId: Output<String>

The tenant id for the Azure Active Directory.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Use the Microsoft Graph API. Should be set to true on vault-1.10+