RaftSnapshotAgentConfigArgs

data class RaftSnapshotAgentConfigArgs(val awsAccessKeyId: Output<String>? = null, val awsS3Bucket: Output<String>? = null, val awsS3DisableTls: Output<Boolean>? = null, val awsS3EnableKms: Output<Boolean>? = null, val awsS3Endpoint: Output<String>? = null, val awsS3ForcePathStyle: Output<Boolean>? = null, val awsS3KmsKey: Output<String>? = null, val awsS3Region: Output<String>? = null, val awsS3ServerSideEncryption: Output<Boolean>? = null, val awsSecretAccessKey: Output<String>? = null, val awsSessionToken: Output<String>? = null, val azureAccountKey: Output<String>? = null, val azureAccountName: Output<String>? = null, val azureBlobEnvironment: Output<String>? = null, val azureContainerName: Output<String>? = null, val azureEndpoint: Output<String>? = null, val filePrefix: Output<String>? = null, val googleDisableTls: Output<Boolean>? = null, val googleEndpoint: Output<String>? = null, val googleGcsBucket: Output<String>? = null, val googleServiceAccountKey: Output<String>? = null, val intervalSeconds: Output<Int>? = null, val localMaxSpace: Output<Int>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val pathPrefix: Output<String>? = null, val retain: Output<Int>? = null, val storageType: Output<String>? = null) : ConvertibleToJava<RaftSnapshotAgentConfigArgs>

Example Usage

Local Storage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const localBackups = new vault.RaftSnapshotAgentConfig("local_backups", {
name: "local",
intervalSeconds: 86400,
retain: 7,
pathPrefix: "/opt/vault/snapshots/",
storageType: "local",
localMaxSpace: 10000000,
});
import pulumi
import pulumi_vault as vault
local_backups = vault.RaftSnapshotAgentConfig("local_backups",
name="local",
interval_seconds=86400,
retain=7,
path_prefix="/opt/vault/snapshots/",
storage_type="local",
local_max_space=10000000)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var localBackups = new Vault.RaftSnapshotAgentConfig("local_backups", new()
{
Name = "local",
IntervalSeconds = 86400,
Retain = 7,
PathPrefix = "/opt/vault/snapshots/",
StorageType = "local",
LocalMaxSpace = 10000000,
});
});
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 {
_, err := vault.NewRaftSnapshotAgentConfig(ctx, "local_backups", &vault.RaftSnapshotAgentConfigArgs{
Name: pulumi.String("local"),
IntervalSeconds: pulumi.Int(86400),
Retain: pulumi.Int(7),
PathPrefix: pulumi.String("/opt/vault/snapshots/"),
StorageType: pulumi.String("local"),
LocalMaxSpace: pulumi.Int(10000000),
})
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.RaftSnapshotAgentConfig;
import com.pulumi.vault.RaftSnapshotAgentConfigArgs;
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 localBackups = new RaftSnapshotAgentConfig("localBackups", RaftSnapshotAgentConfigArgs.builder()
.name("local")
.intervalSeconds(86400)
.retain(7)
.pathPrefix("/opt/vault/snapshots/")
.storageType("local")
.localMaxSpace(10000000)
.build());
}
}
resources:
localBackups:
type: vault:RaftSnapshotAgentConfig
name: local_backups
properties:
name: local
intervalSeconds: 86400 # 24h
retain: 7
pathPrefix: /opt/vault/snapshots/
storageType: local
localMaxSpace: 1e+07

AWS S3

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as vault from "@pulumi/vault";
const config = new pulumi.Config();
const awsAccessKeyId = config.requireObject<any>("awsAccessKeyId");
const awsSecretAccessKey = config.requireObject<any>("awsSecretAccessKey");
const current = aws.getRegion({});
const s3Backups = new vault.RaftSnapshotAgentConfig("s3_backups", {
name: "s3",
intervalSeconds: 86400,
retain: 7,
pathPrefix: "/path/in/bucket",
storageType: "aws-s3",
awsS3Bucket: "my-bucket",
awsS3Region: current.then(current => current.name),
awsAccessKeyId: awsAccessKeyId,
awsSecretAccessKey: awsSecretAccessKey,
awsS3EnableKms: true,
});
import pulumi
import pulumi_aws as aws
import pulumi_vault as vault
config = pulumi.Config()
aws_access_key_id = config.require_object("awsAccessKeyId")
aws_secret_access_key = config.require_object("awsSecretAccessKey")
current = aws.get_region()
s3_backups = vault.RaftSnapshotAgentConfig("s3_backups",
name="s3",
interval_seconds=86400,
retain=7,
path_prefix="/path/in/bucket",
storage_type="aws-s3",
aws_s3_bucket="my-bucket",
aws_s3_region=current.name,
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key,
aws_s3_enable_kms=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var awsAccessKeyId = config.RequireObject<dynamic>("awsAccessKeyId");
var awsSecretAccessKey = config.RequireObject<dynamic>("awsSecretAccessKey");
var current = Aws.GetRegion.Invoke();
var s3Backups = new Vault.RaftSnapshotAgentConfig("s3_backups", new()
{
Name = "s3",
IntervalSeconds = 86400,
Retain = 7,
PathPrefix = "/path/in/bucket",
StorageType = "aws-s3",
AwsS3Bucket = "my-bucket",
AwsS3Region = current.Apply(getRegionResult => getRegionResult.Name),
AwsAccessKeyId = awsAccessKeyId,
AwsSecretAccessKey = awsSecretAccessKey,
AwsS3EnableKms = true,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
awsAccessKeyId := cfg.RequireObject("awsAccessKeyId")
awsSecretAccessKey := cfg.RequireObject("awsSecretAccessKey")
current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
if err != nil {
return err
}
_, err = vault.NewRaftSnapshotAgentConfig(ctx, "s3_backups", &vault.RaftSnapshotAgentConfigArgs{
Name: pulumi.String("s3"),
IntervalSeconds: pulumi.Int(86400),
Retain: pulumi.Int(7),
PathPrefix: pulumi.String("/path/in/bucket"),
StorageType: pulumi.String("aws-s3"),
AwsS3Bucket: pulumi.String("my-bucket"),
AwsS3Region: pulumi.String(current.Name),
AwsAccessKeyId: pulumi.Any(awsAccessKeyId),
AwsSecretAccessKey: pulumi.Any(awsSecretAccessKey),
AwsS3EnableKms: pulumi.Bool(true),
})
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.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetRegionArgs;
import com.pulumi.vault.RaftSnapshotAgentConfig;
import com.pulumi.vault.RaftSnapshotAgentConfigArgs;
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 config = ctx.config();
final var awsAccessKeyId = config.get("awsAccessKeyId");
final var awsSecretAccessKey = config.get("awsSecretAccessKey");
final var current = AwsFunctions.getRegion(GetRegionArgs.builder()
.build());
var s3Backups = new RaftSnapshotAgentConfig("s3Backups", RaftSnapshotAgentConfigArgs.builder()
.name("s3")
.intervalSeconds(86400)
.retain(7)
.pathPrefix("/path/in/bucket")
.storageType("aws-s3")
.awsS3Bucket("my-bucket")
.awsS3Region(current.name())
.awsAccessKeyId(awsAccessKeyId)
.awsSecretAccessKey(awsSecretAccessKey)
.awsS3EnableKms(true)
.build());
}
}
configuration:
awsAccessKeyId:
type: dynamic
awsSecretAccessKey:
type: dynamic
resources:
s3Backups:
type: vault:RaftSnapshotAgentConfig
name: s3_backups
properties:
name: s3
intervalSeconds: 86400 # 24h
retain: 7
pathPrefix: /path/in/bucket
storageType: aws-s3
awsS3Bucket: my-bucket
awsS3Region: ${current.name}
awsAccessKeyId: ${awsAccessKeyId}
awsSecretAccessKey: ${awsSecretAccessKey}
awsS3EnableKms: true
variables:
current:
fn::invoke:
function: aws:getRegion
arguments: {}

Azure BLOB

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const config = new pulumi.Config();
const azureAccountName = config.requireObject<any>("azureAccountName");
const azureAccountKey = config.requireObject<any>("azureAccountKey");
const azureBackups = new vault.RaftSnapshotAgentConfig("azure_backups", {
name: "azure_backup",
intervalSeconds: 86400,
retain: 7,
pathPrefix: "/",
storageType: "azure-blob",
azureContainerName: "vault-blob",
azureAccountName: azureAccountName,
azureAccountKey: azureAccountKey,
});
import pulumi
import pulumi_vault as vault
config = pulumi.Config()
azure_account_name = config.require_object("azureAccountName")
azure_account_key = config.require_object("azureAccountKey")
azure_backups = vault.RaftSnapshotAgentConfig("azure_backups",
name="azure_backup",
interval_seconds=86400,
retain=7,
path_prefix="/",
storage_type="azure-blob",
azure_container_name="vault-blob",
azure_account_name=azure_account_name,
azure_account_key=azure_account_key)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var azureAccountName = config.RequireObject<dynamic>("azureAccountName");
var azureAccountKey = config.RequireObject<dynamic>("azureAccountKey");
var azureBackups = new Vault.RaftSnapshotAgentConfig("azure_backups", new()
{
Name = "azure_backup",
IntervalSeconds = 86400,
Retain = 7,
PathPrefix = "/",
StorageType = "azure-blob",
AzureContainerName = "vault-blob",
AzureAccountName = azureAccountName,
AzureAccountKey = azureAccountKey,
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
azureAccountName := cfg.RequireObject("azureAccountName")
azureAccountKey := cfg.RequireObject("azureAccountKey")
_, err := vault.NewRaftSnapshotAgentConfig(ctx, "azure_backups", &vault.RaftSnapshotAgentConfigArgs{
Name: pulumi.String("azure_backup"),
IntervalSeconds: pulumi.Int(86400),
Retain: pulumi.Int(7),
PathPrefix: pulumi.String("/"),
StorageType: pulumi.String("azure-blob"),
AzureContainerName: pulumi.String("vault-blob"),
AzureAccountName: pulumi.Any(azureAccountName),
AzureAccountKey: pulumi.Any(azureAccountKey),
})
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.RaftSnapshotAgentConfig;
import com.pulumi.vault.RaftSnapshotAgentConfigArgs;
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 config = ctx.config();
final var azureAccountName = config.get("azureAccountName");
final var azureAccountKey = config.get("azureAccountKey");
var azureBackups = new RaftSnapshotAgentConfig("azureBackups", RaftSnapshotAgentConfigArgs.builder()
.name("azure_backup")
.intervalSeconds(86400)
.retain(7)
.pathPrefix("/")
.storageType("azure-blob")
.azureContainerName("vault-blob")
.azureAccountName(azureAccountName)
.azureAccountKey(azureAccountKey)
.build());
}
}
configuration:
azureAccountName:
type: dynamic
azureAccountKey:
type: dynamic
resources:
azureBackups:
type: vault:RaftSnapshotAgentConfig
name: azure_backups
properties:
name: azure_backup
intervalSeconds: 86400 # 24h
retain: 7
pathPrefix: /
storageType: azure-blob
azureContainerName: vault-blob
azureAccountName: ${azureAccountName}
azureAccountKey: ${azureAccountKey}

Import

Raft Snapshot Agent Configurations can be imported using the name, e.g.

$ pulumi import vault:index/raftSnapshotAgentConfig:RaftSnapshotAgentConfig local local

Constructors

Link copied to clipboard
constructor(awsAccessKeyId: Output<String>? = null, awsS3Bucket: Output<String>? = null, awsS3DisableTls: Output<Boolean>? = null, awsS3EnableKms: Output<Boolean>? = null, awsS3Endpoint: Output<String>? = null, awsS3ForcePathStyle: Output<Boolean>? = null, awsS3KmsKey: Output<String>? = null, awsS3Region: Output<String>? = null, awsS3ServerSideEncryption: Output<Boolean>? = null, awsSecretAccessKey: Output<String>? = null, awsSessionToken: Output<String>? = null, azureAccountKey: Output<String>? = null, azureAccountName: Output<String>? = null, azureBlobEnvironment: Output<String>? = null, azureContainerName: Output<String>? = null, azureEndpoint: Output<String>? = null, filePrefix: Output<String>? = null, googleDisableTls: Output<Boolean>? = null, googleEndpoint: Output<String>? = null, googleGcsBucket: Output<String>? = null, googleServiceAccountKey: Output<String>? = null, intervalSeconds: Output<Int>? = null, localMaxSpace: Output<Int>? = null, name: Output<String>? = null, namespace: Output<String>? = null, pathPrefix: Output<String>? = null, retain: Output<Int>? = null, storageType: Output<String>? = null)

Properties

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

AWS access key ID.

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

S3 bucket to write snapshots to.

Link copied to clipboard
val awsS3DisableTls: Output<Boolean>? = null

Disable TLS for the S3 endpoint. This should only be used for testing purposes.

Link copied to clipboard
val awsS3EnableKms: Output<Boolean>? = null

Use KMS to encrypt bucket contents.

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

AWS endpoint. This is typically only set when using a non-AWS S3 implementation like Minio.

Link copied to clipboard
val awsS3ForcePathStyle: Output<Boolean>? = null

Use the endpoint/bucket URL style instead of bucket.endpoint.

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

Use named KMS key, when aws_s3_enable_kms=true

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

AWS region bucket is in.

Link copied to clipboard
val awsS3ServerSideEncryption: Output<Boolean>? = null

Use AES256 to encrypt bucket contents.

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

AWS secret access key.

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

AWS session token.

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

Azure account key.

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

Azure account name.

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

Azure blob environment.

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

Azure container name to write snapshots to.

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

Azure blob storage endpoint. This is typically only set when using a non-Azure implementation like Azurite.

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

Within the directory or bucket prefix given by path_prefix, the file or object name of snapshot files will start with this string.

Link copied to clipboard
val googleDisableTls: Output<Boolean>? = null

Disable TLS for the GCS endpoint.

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

GCS endpoint. This is typically only set when using a non-Google GCS implementation like fake-gcs-server.

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

GCS bucket to write snapshots to.

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

Google service account key in JSON format.

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

<required> - Time (in seconds) between snapshots.

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

The maximum space, in bytes, to use for snapshots.

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

<required> – Name of the configuration to modify.

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 pathPrefix: Output<String>? = null

<required> - For storage_type = "local", the directory to write the snapshots in. For cloud storage types, the bucket prefix to use. Types azure-s3 and google-gcs require a trailing / (slash). Types local and aws-s3 the trailing / is optional.

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

How many snapshots are to be kept; when writing a snapshot, if there are more snapshots already stored than this number, the oldest ones will be deleted.

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

<required> - One of "local", "azure-blob", "aws-s3", or "google-gcs". The remaining parameters described below are all specific to the selected storage_type and prefixed accordingly.

Functions

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