vault.RaftAutopilot
Explore with Pulumi AI
Autopilot enables automated workflows for managing Raft clusters. The current feature set includes 3 main features: Server Stabilization, Dead Server Cleanup and State API. These three features are introduced in Vault 1.7.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const autopilot = new vault.RaftAutopilot("autopilot", {
cleanupDeadServers: true,
deadServerLastContactThreshold: "24h0m0s",
lastContactThreshold: "10s",
maxTrailingLogs: 1000,
minQuorum: 3,
serverStabilizationTime: "10s",
});
import pulumi
import pulumi_vault as vault
autopilot = vault.RaftAutopilot("autopilot",
cleanup_dead_servers=True,
dead_server_last_contact_threshold="24h0m0s",
last_contact_threshold="10s",
max_trailing_logs=1000,
min_quorum=3,
server_stabilization_time="10s")
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.NewRaftAutopilot(ctx, "autopilot", &vault.RaftAutopilotArgs{
CleanupDeadServers: pulumi.Bool(true),
DeadServerLastContactThreshold: pulumi.String("24h0m0s"),
LastContactThreshold: pulumi.String("10s"),
MaxTrailingLogs: pulumi.Int(1000),
MinQuorum: pulumi.Int(3),
ServerStabilizationTime: pulumi.String("10s"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var autopilot = new Vault.RaftAutopilot("autopilot", new()
{
CleanupDeadServers = true,
DeadServerLastContactThreshold = "24h0m0s",
LastContactThreshold = "10s",
MaxTrailingLogs = 1000,
MinQuorum = 3,
ServerStabilizationTime = "10s",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.RaftAutopilot;
import com.pulumi.vault.RaftAutopilotArgs;
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 autopilot = new RaftAutopilot("autopilot", RaftAutopilotArgs.builder()
.cleanupDeadServers(true)
.deadServerLastContactThreshold("24h0m0s")
.lastContactThreshold("10s")
.maxTrailingLogs(1000)
.minQuorum(3)
.serverStabilizationTime("10s")
.build());
}
}
resources:
autopilot:
type: vault:RaftAutopilot
properties:
cleanupDeadServers: true
deadServerLastContactThreshold: 24h0m0s
lastContactThreshold: 10s
maxTrailingLogs: 1000
minQuorum: 3
serverStabilizationTime: 10s
Create RaftAutopilot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RaftAutopilot(name: string, args?: RaftAutopilotArgs, opts?: CustomResourceOptions);
@overload
def RaftAutopilot(resource_name: str,
args: Optional[RaftAutopilotArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def RaftAutopilot(resource_name: str,
opts: Optional[ResourceOptions] = None,
cleanup_dead_servers: Optional[bool] = None,
dead_server_last_contact_threshold: Optional[str] = None,
disable_upgrade_migration: Optional[bool] = None,
last_contact_threshold: Optional[str] = None,
max_trailing_logs: Optional[int] = None,
min_quorum: Optional[int] = None,
namespace: Optional[str] = None,
server_stabilization_time: Optional[str] = None)
func NewRaftAutopilot(ctx *Context, name string, args *RaftAutopilotArgs, opts ...ResourceOption) (*RaftAutopilot, error)
public RaftAutopilot(string name, RaftAutopilotArgs? args = null, CustomResourceOptions? opts = null)
public RaftAutopilot(String name, RaftAutopilotArgs args)
public RaftAutopilot(String name, RaftAutopilotArgs args, CustomResourceOptions options)
type: vault:RaftAutopilot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RaftAutopilotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RaftAutopilotArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RaftAutopilotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RaftAutopilotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RaftAutopilotArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var raftAutopilotResource = new Vault.RaftAutopilot("raftAutopilotResource", new()
{
CleanupDeadServers = false,
DeadServerLastContactThreshold = "string",
DisableUpgradeMigration = false,
LastContactThreshold = "string",
MaxTrailingLogs = 0,
MinQuorum = 0,
Namespace = "string",
ServerStabilizationTime = "string",
});
example, err := vault.NewRaftAutopilot(ctx, "raftAutopilotResource", &vault.RaftAutopilotArgs{
CleanupDeadServers: pulumi.Bool(false),
DeadServerLastContactThreshold: pulumi.String("string"),
DisableUpgradeMigration: pulumi.Bool(false),
LastContactThreshold: pulumi.String("string"),
MaxTrailingLogs: pulumi.Int(0),
MinQuorum: pulumi.Int(0),
Namespace: pulumi.String("string"),
ServerStabilizationTime: pulumi.String("string"),
})
var raftAutopilotResource = new RaftAutopilot("raftAutopilotResource", RaftAutopilotArgs.builder()
.cleanupDeadServers(false)
.deadServerLastContactThreshold("string")
.disableUpgradeMigration(false)
.lastContactThreshold("string")
.maxTrailingLogs(0)
.minQuorum(0)
.namespace("string")
.serverStabilizationTime("string")
.build());
raft_autopilot_resource = vault.RaftAutopilot("raftAutopilotResource",
cleanup_dead_servers=False,
dead_server_last_contact_threshold="string",
disable_upgrade_migration=False,
last_contact_threshold="string",
max_trailing_logs=0,
min_quorum=0,
namespace="string",
server_stabilization_time="string")
const raftAutopilotResource = new vault.RaftAutopilot("raftAutopilotResource", {
cleanupDeadServers: false,
deadServerLastContactThreshold: "string",
disableUpgradeMigration: false,
lastContactThreshold: "string",
maxTrailingLogs: 0,
minQuorum: 0,
namespace: "string",
serverStabilizationTime: "string",
});
type: vault:RaftAutopilot
properties:
cleanupDeadServers: false
deadServerLastContactThreshold: string
disableUpgradeMigration: false
lastContactThreshold: string
maxTrailingLogs: 0
minQuorum: 0
namespace: string
serverStabilizationTime: string
RaftAutopilot Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RaftAutopilot resource accepts the following input properties:
- Cleanup
Dead boolServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - Dead
Server stringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - Disable
Upgrade boolMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- Last
Contact stringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- Max
Trailing intLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- Min
Quorum int - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- Namespace 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. - Server
Stabilization stringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- Cleanup
Dead boolServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - Dead
Server stringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - Disable
Upgrade boolMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- Last
Contact stringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- Max
Trailing intLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- Min
Quorum int - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- Namespace 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. - Server
Stabilization stringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- cleanup
Dead BooleanServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - dead
Server StringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - disable
Upgrade BooleanMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- last
Contact StringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- max
Trailing IntegerLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- min
Quorum Integer - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- namespace 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. - server
Stabilization StringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- cleanup
Dead booleanServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - dead
Server stringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - disable
Upgrade booleanMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- last
Contact stringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- max
Trailing numberLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- min
Quorum number - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- namespace 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. - server
Stabilization stringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- cleanup_
dead_ boolservers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - dead_
server_ strlast_ contact_ threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - disable_
upgrade_ boolmigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- last_
contact_ strthreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- max_
trailing_ intlogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- min_
quorum int - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- namespace str
- 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. - server_
stabilization_ strtime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- cleanup
Dead BooleanServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - dead
Server StringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - disable
Upgrade BooleanMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- last
Contact StringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- max
Trailing NumberLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- min
Quorum Number - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- namespace 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. - server
Stabilization StringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
Outputs
All input properties are implicitly available as output properties. Additionally, the RaftAutopilot resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RaftAutopilot Resource
Get an existing RaftAutopilot resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RaftAutopilotState, opts?: CustomResourceOptions): RaftAutopilot
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cleanup_dead_servers: Optional[bool] = None,
dead_server_last_contact_threshold: Optional[str] = None,
disable_upgrade_migration: Optional[bool] = None,
last_contact_threshold: Optional[str] = None,
max_trailing_logs: Optional[int] = None,
min_quorum: Optional[int] = None,
namespace: Optional[str] = None,
server_stabilization_time: Optional[str] = None) -> RaftAutopilot
func GetRaftAutopilot(ctx *Context, name string, id IDInput, state *RaftAutopilotState, opts ...ResourceOption) (*RaftAutopilot, error)
public static RaftAutopilot Get(string name, Input<string> id, RaftAutopilotState? state, CustomResourceOptions? opts = null)
public static RaftAutopilot get(String name, Output<String> id, RaftAutopilotState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cleanup
Dead boolServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - Dead
Server stringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - Disable
Upgrade boolMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- Last
Contact stringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- Max
Trailing intLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- Min
Quorum int - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- Namespace 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. - Server
Stabilization stringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- Cleanup
Dead boolServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - Dead
Server stringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - Disable
Upgrade boolMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- Last
Contact stringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- Max
Trailing intLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- Min
Quorum int - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- Namespace 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. - Server
Stabilization stringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- cleanup
Dead BooleanServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - dead
Server StringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - disable
Upgrade BooleanMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- last
Contact StringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- max
Trailing IntegerLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- min
Quorum Integer - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- namespace 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. - server
Stabilization StringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- cleanup
Dead booleanServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - dead
Server stringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - disable
Upgrade booleanMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- last
Contact stringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- max
Trailing numberLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- min
Quorum number - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- namespace 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. - server
Stabilization stringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- cleanup_
dead_ boolservers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - dead_
server_ strlast_ contact_ threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - disable_
upgrade_ boolmigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- last_
contact_ strthreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- max_
trailing_ intlogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- min_
quorum int - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- namespace str
- 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. - server_
stabilization_ strtime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
- cleanup
Dead BooleanServers - Specifies whether to remove dead server nodes
periodically or when a new server joins. This requires that
min-quorum
is also set. - dead
Server StringLast Contact Threshold - Limit the amount of time a
server can go without leader contact before being considered failed. This only takes
effect when
cleanup_dead_servers
is set. - disable
Upgrade BooleanMigration - Disables automatically upgrading Vault using autopilot. (Enterprise-only)
- last
Contact StringThreshold - Limit the amount of time a server can go without leader contact before being considered unhealthy.
- max
Trailing NumberLogs - Maximum number of log entries in the Raft log that a server can be behind its leader before being considered unhealthy.
- min
Quorum Number - Minimum number of servers allowed in a cluster before autopilot can prune dead servers. This should at least be 3. Applicable only for voting nodes.
- namespace 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. - server
Stabilization StringTime - Minimum amount of time a server must be stable in the 'healthy' state before being added to the cluster.
Import
Raft Autopilot config can be imported using the ID, e.g.
$ pulumi import vault:index/raftAutopilot:RaftAutopilot autopilot sys/storage/raft/autopilot/configuration
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.