import * as pulumi from "@pulumi/pulumi"; /** * ## Example Usage * * ### Local Storage * ```typescript * 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, * }); * ``` * * ### AWS S3 * ```typescript * 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("awsAccessKeyId"); * const awsSecretAccessKey = config.requireObject("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, * }); * ``` * * ### Azure BLOB * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const config = new pulumi.Config(); * const azureAccountName = config.requireObject("azureAccountName"); * const azureAccountKey = config.requireObject("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 * * Raft Snapshot Agent Configurations can be imported using the `name`, e.g. * * ```sh * $ pulumi import vault:index/raftSnapshotAgentConfig:RaftSnapshotAgentConfig local local * ``` */ export declare class RaftSnapshotAgentConfig extends pulumi.CustomResource { /** * Get an existing RaftSnapshotAgentConfig resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: RaftSnapshotAgentConfigState, opts?: pulumi.CustomResourceOptions): RaftSnapshotAgentConfig; /** * Returns true if the given object is an instance of RaftSnapshotAgentConfig. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is RaftSnapshotAgentConfig; /** * AWS access key ID. */ readonly awsAccessKeyId: pulumi.Output; /** * S3 bucket to write snapshots to. */ readonly awsS3Bucket: pulumi.Output; /** * Disable TLS for the S3 endpoint. This should only be used for testing purposes. */ readonly awsS3DisableTls: pulumi.Output; /** * Use KMS to encrypt bucket contents. */ readonly awsS3EnableKms: pulumi.Output; /** * AWS endpoint. This is typically only set when using a non-AWS S3 implementation like Minio. */ readonly awsS3Endpoint: pulumi.Output; /** * Use the endpoint/bucket URL style instead of bucket.endpoint. */ readonly awsS3ForcePathStyle: pulumi.Output; /** * Use named KMS key, when aws_s3_enable_kms=true */ readonly awsS3KmsKey: pulumi.Output; /** * AWS region bucket is in. */ readonly awsS3Region: pulumi.Output; /** * Use AES256 to encrypt bucket contents. */ readonly awsS3ServerSideEncryption: pulumi.Output; /** * AWS secret access key. */ readonly awsSecretAccessKey: pulumi.Output; /** * AWS session token. */ readonly awsSessionToken: pulumi.Output; /** * Azure account key. */ readonly azureAccountKey: pulumi.Output; /** * Azure account name. */ readonly azureAccountName: pulumi.Output; /** * Azure blob environment. */ readonly azureBlobEnvironment: pulumi.Output; /** * Azure container name to write snapshots to. */ readonly azureContainerName: pulumi.Output; /** * Azure blob storage endpoint. This is typically only set when using a non-Azure implementation like Azurite. */ readonly azureEndpoint: pulumi.Output; /** * Within the directory or bucket * prefix given by `pathPrefix`, the file or object name of snapshot files * will start with this string. */ readonly filePrefix: pulumi.Output; /** * Disable TLS for the GCS endpoint. */ readonly googleDisableTls: pulumi.Output; /** * GCS endpoint. This is typically only set when using a non-Google GCS implementation like fake-gcs-server. */ readonly googleEndpoint: pulumi.Output; /** * GCS bucket to write snapshots to. */ readonly googleGcsBucket: pulumi.Output; /** * Google service account key in JSON format. */ readonly googleServiceAccountKey: pulumi.Output; /** * `` - Time (in seconds) between snapshots. */ readonly intervalSeconds: pulumi.Output; /** * The maximum space, in bytes, to use for snapshots. */ readonly localMaxSpace: pulumi.Output; /** * `` – Name of the configuration to modify. */ readonly name: pulumi.Output; /** * 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](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ readonly namespace: pulumi.Output; /** * `` - For `storageType = "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. */ readonly pathPrefix: pulumi.Output; /** * 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. */ readonly retain: pulumi.Output; /** * `` - One of "local", "azure-blob", "aws-s3", * or "google-gcs". The remaining parameters described below are all specific to * the selected `storageType` and prefixed accordingly. */ readonly storageType: pulumi.Output; /** * Create a RaftSnapshotAgentConfig resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RaftSnapshotAgentConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RaftSnapshotAgentConfig resources. */ export interface RaftSnapshotAgentConfigState { /** * AWS access key ID. */ awsAccessKeyId?: pulumi.Input; /** * S3 bucket to write snapshots to. */ awsS3Bucket?: pulumi.Input; /** * Disable TLS for the S3 endpoint. This should only be used for testing purposes. */ awsS3DisableTls?: pulumi.Input; /** * Use KMS to encrypt bucket contents. */ awsS3EnableKms?: pulumi.Input; /** * AWS endpoint. This is typically only set when using a non-AWS S3 implementation like Minio. */ awsS3Endpoint?: pulumi.Input; /** * Use the endpoint/bucket URL style instead of bucket.endpoint. */ awsS3ForcePathStyle?: pulumi.Input; /** * Use named KMS key, when aws_s3_enable_kms=true */ awsS3KmsKey?: pulumi.Input; /** * AWS region bucket is in. */ awsS3Region?: pulumi.Input; /** * Use AES256 to encrypt bucket contents. */ awsS3ServerSideEncryption?: pulumi.Input; /** * AWS secret access key. */ awsSecretAccessKey?: pulumi.Input; /** * AWS session token. */ awsSessionToken?: pulumi.Input; /** * Azure account key. */ azureAccountKey?: pulumi.Input; /** * Azure account name. */ azureAccountName?: pulumi.Input; /** * Azure blob environment. */ azureBlobEnvironment?: pulumi.Input; /** * Azure container name to write snapshots to. */ azureContainerName?: pulumi.Input; /** * Azure blob storage endpoint. This is typically only set when using a non-Azure implementation like Azurite. */ azureEndpoint?: pulumi.Input; /** * Within the directory or bucket * prefix given by `pathPrefix`, the file or object name of snapshot files * will start with this string. */ filePrefix?: pulumi.Input; /** * Disable TLS for the GCS endpoint. */ googleDisableTls?: pulumi.Input; /** * GCS endpoint. This is typically only set when using a non-Google GCS implementation like fake-gcs-server. */ googleEndpoint?: pulumi.Input; /** * GCS bucket to write snapshots to. */ googleGcsBucket?: pulumi.Input; /** * Google service account key in JSON format. */ googleServiceAccountKey?: pulumi.Input; /** * `` - Time (in seconds) between snapshots. */ intervalSeconds?: pulumi.Input; /** * The maximum space, in bytes, to use for snapshots. */ localMaxSpace?: pulumi.Input; /** * `` – Name of the configuration to modify. */ name?: pulumi.Input; /** * 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](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ namespace?: pulumi.Input; /** * `` - For `storageType = "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. */ pathPrefix?: pulumi.Input; /** * 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. */ retain?: pulumi.Input; /** * `` - One of "local", "azure-blob", "aws-s3", * or "google-gcs". The remaining parameters described below are all specific to * the selected `storageType` and prefixed accordingly. */ storageType?: pulumi.Input; } /** * The set of arguments for constructing a RaftSnapshotAgentConfig resource. */ export interface RaftSnapshotAgentConfigArgs { /** * AWS access key ID. */ awsAccessKeyId?: pulumi.Input; /** * S3 bucket to write snapshots to. */ awsS3Bucket?: pulumi.Input; /** * Disable TLS for the S3 endpoint. This should only be used for testing purposes. */ awsS3DisableTls?: pulumi.Input; /** * Use KMS to encrypt bucket contents. */ awsS3EnableKms?: pulumi.Input; /** * AWS endpoint. This is typically only set when using a non-AWS S3 implementation like Minio. */ awsS3Endpoint?: pulumi.Input; /** * Use the endpoint/bucket URL style instead of bucket.endpoint. */ awsS3ForcePathStyle?: pulumi.Input; /** * Use named KMS key, when aws_s3_enable_kms=true */ awsS3KmsKey?: pulumi.Input; /** * AWS region bucket is in. */ awsS3Region?: pulumi.Input; /** * Use AES256 to encrypt bucket contents. */ awsS3ServerSideEncryption?: pulumi.Input; /** * AWS secret access key. */ awsSecretAccessKey?: pulumi.Input; /** * AWS session token. */ awsSessionToken?: pulumi.Input; /** * Azure account key. */ azureAccountKey?: pulumi.Input; /** * Azure account name. */ azureAccountName?: pulumi.Input; /** * Azure blob environment. */ azureBlobEnvironment?: pulumi.Input; /** * Azure container name to write snapshots to. */ azureContainerName?: pulumi.Input; /** * Azure blob storage endpoint. This is typically only set when using a non-Azure implementation like Azurite. */ azureEndpoint?: pulumi.Input; /** * Within the directory or bucket * prefix given by `pathPrefix`, the file or object name of snapshot files * will start with this string. */ filePrefix?: pulumi.Input; /** * Disable TLS for the GCS endpoint. */ googleDisableTls?: pulumi.Input; /** * GCS endpoint. This is typically only set when using a non-Google GCS implementation like fake-gcs-server. */ googleEndpoint?: pulumi.Input; /** * GCS bucket to write snapshots to. */ googleGcsBucket?: pulumi.Input; /** * Google service account key in JSON format. */ googleServiceAccountKey?: pulumi.Input; /** * `` - Time (in seconds) between snapshots. */ intervalSeconds: pulumi.Input; /** * The maximum space, in bytes, to use for snapshots. */ localMaxSpace?: pulumi.Input; /** * `` – Name of the configuration to modify. */ name?: pulumi.Input; /** * 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](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ namespace?: pulumi.Input; /** * `` - For `storageType = "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. */ pathPrefix: pulumi.Input; /** * 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. */ retain?: pulumi.Input; /** * `` - One of "local", "azure-blob", "aws-s3", * or "google-gcs". The remaining parameters described below are all specific to * the selected `storageType` and prefixed accordingly. */ storageType: pulumi.Input; }