Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

AutopilotConfig

Provides access to the Autopilot Configuration of Consul to automatically manage Consul servers.

It includes to automatically cleanup dead servers, monitor the status of the Raft cluster and stable server introduction.

Example Usage

using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Consul.AutopilotConfig("config", new Consul.AutopilotConfigArgs
        {
            CleanupDeadServers = false,
            LastContactThreshold = "1s",
            MaxTrailingLogs = 500,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-consul/sdk/v2/go/consul"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := consul.NewAutopilotConfig(ctx, "config", &consul.AutopilotConfigArgs{
            CleanupDeadServers:   pulumi.Bool(false),
            LastContactThreshold: pulumi.String("1s"),
            MaxTrailingLogs:      pulumi.Int(500),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_consul as consul

config = consul.AutopilotConfig("config",
    cleanup_dead_servers=False,
    last_contact_threshold="1s",
    max_trailing_logs=500)
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const config = new consul.AutopilotConfig("config", {
    cleanupDeadServers: false,
    lastContactThreshold: "1s",
    maxTrailingLogs: 500,
});

Create a AutopilotConfig Resource

new AutopilotConfig(name: string, args?: AutopilotConfigArgs, opts?: CustomResourceOptions);
def AutopilotConfig(resource_name: str, opts: Optional[ResourceOptions] = None, cleanup_dead_servers: Optional[bool] = None, datacenter: Optional[str] = None, disable_upgrade_migration: Optional[bool] = None, last_contact_threshold: Optional[str] = None, max_trailing_logs: Optional[int] = None, redundancy_zone_tag: Optional[str] = None, server_stabilization_time: Optional[str] = None, upgrade_version_tag: Optional[str] = None)
func NewAutopilotConfig(ctx *Context, name string, args *AutopilotConfigArgs, opts ...ResourceOption) (*AutopilotConfig, error)
public AutopilotConfig(string name, AutopilotConfigArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AutopilotConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AutopilotConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AutopilotConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AutopilotConfig Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AutopilotConfig resource accepts the following input properties:

CleanupDeadServers bool

Whether to remove failing servers when a replacement comes online. Defaults to true.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

DisableUpgradeMigration bool

Whether to disable upgrade migrations. Defaults to false.

LastContactThreshold string

The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

MaxTrailingLogs int

The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

RedundancyZoneTag string

The redundancy zone tag to use. Consul will try to keep one voting server by zone to take advantage of isolated failure domains. Defaults to an empty string.

ServerStabilizationTime string

The period to wait for a server to be healthy and stable before being promoted to a full, voting member. Defaults to "10s".

UpgradeVersionTag string

The tag to override the version information used during a migration. Defaults to an empty string.

CleanupDeadServers bool

Whether to remove failing servers when a replacement comes online. Defaults to true.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

DisableUpgradeMigration bool

Whether to disable upgrade migrations. Defaults to false.

LastContactThreshold string

The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

MaxTrailingLogs int

The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

RedundancyZoneTag string

The redundancy zone tag to use. Consul will try to keep one voting server by zone to take advantage of isolated failure domains. Defaults to an empty string.

ServerStabilizationTime string

The period to wait for a server to be healthy and stable before being promoted to a full, voting member. Defaults to "10s".

UpgradeVersionTag string

The tag to override the version information used during a migration. Defaults to an empty string.

cleanupDeadServers boolean

Whether to remove failing servers when a replacement comes online. Defaults to true.

datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

disableUpgradeMigration boolean

Whether to disable upgrade migrations. Defaults to false.

lastContactThreshold string

The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

maxTrailingLogs number

The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

redundancyZoneTag string

The redundancy zone tag to use. Consul will try to keep one voting server by zone to take advantage of isolated failure domains. Defaults to an empty string.

serverStabilizationTime string

The period to wait for a server to be healthy and stable before being promoted to a full, voting member. Defaults to "10s".

upgradeVersionTag string

The tag to override the version information used during a migration. Defaults to an empty string.

cleanup_dead_servers bool

Whether to remove failing servers when a replacement comes online. Defaults to true.

datacenter str

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

disable_upgrade_migration bool

Whether to disable upgrade migrations. Defaults to false.

last_contact_threshold str

The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

max_trailing_logs int

The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

redundancy_zone_tag str

The redundancy zone tag to use. Consul will try to keep one voting server by zone to take advantage of isolated failure domains. Defaults to an empty string.

server_stabilization_time str

The period to wait for a server to be healthy and stable before being promoted to a full, voting member. Defaults to "10s".

upgrade_version_tag str

The tag to override the version information used during a migration. Defaults to an empty string.

Outputs

All input properties are implicitly available as output properties. Additionally, the AutopilotConfig 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing AutopilotConfig Resource

Get an existing AutopilotConfig 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?: AutopilotConfigState, opts?: CustomResourceOptions): AutopilotConfig
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, cleanup_dead_servers: Optional[bool] = None, datacenter: Optional[str] = None, disable_upgrade_migration: Optional[bool] = None, last_contact_threshold: Optional[str] = None, max_trailing_logs: Optional[int] = None, redundancy_zone_tag: Optional[str] = None, server_stabilization_time: Optional[str] = None, upgrade_version_tag: Optional[str] = None) -> AutopilotConfig
func GetAutopilotConfig(ctx *Context, name string, id IDInput, state *AutopilotConfigState, opts ...ResourceOption) (*AutopilotConfig, error)
public static AutopilotConfig Get(string name, Input<string> id, AutopilotConfigState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CleanupDeadServers bool

Whether to remove failing servers when a replacement comes online. Defaults to true.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

DisableUpgradeMigration bool

Whether to disable upgrade migrations. Defaults to false.

LastContactThreshold string

The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

MaxTrailingLogs int

The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

RedundancyZoneTag string

The redundancy zone tag to use. Consul will try to keep one voting server by zone to take advantage of isolated failure domains. Defaults to an empty string.

ServerStabilizationTime string

The period to wait for a server to be healthy and stable before being promoted to a full, voting member. Defaults to "10s".

UpgradeVersionTag string

The tag to override the version information used during a migration. Defaults to an empty string.

CleanupDeadServers bool

Whether to remove failing servers when a replacement comes online. Defaults to true.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

DisableUpgradeMigration bool

Whether to disable upgrade migrations. Defaults to false.

LastContactThreshold string

The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

MaxTrailingLogs int

The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

RedundancyZoneTag string

The redundancy zone tag to use. Consul will try to keep one voting server by zone to take advantage of isolated failure domains. Defaults to an empty string.

ServerStabilizationTime string

The period to wait for a server to be healthy and stable before being promoted to a full, voting member. Defaults to "10s".

UpgradeVersionTag string

The tag to override the version information used during a migration. Defaults to an empty string.

cleanupDeadServers boolean

Whether to remove failing servers when a replacement comes online. Defaults to true.

datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

disableUpgradeMigration boolean

Whether to disable upgrade migrations. Defaults to false.

lastContactThreshold string

The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

maxTrailingLogs number

The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

redundancyZoneTag string

The redundancy zone tag to use. Consul will try to keep one voting server by zone to take advantage of isolated failure domains. Defaults to an empty string.

serverStabilizationTime string

The period to wait for a server to be healthy and stable before being promoted to a full, voting member. Defaults to "10s".

upgradeVersionTag string

The tag to override the version information used during a migration. Defaults to an empty string.

cleanup_dead_servers bool

Whether to remove failing servers when a replacement comes online. Defaults to true.

datacenter str

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

disable_upgrade_migration bool

Whether to disable upgrade migrations. Defaults to false.

last_contact_threshold str

The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

max_trailing_logs int

The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

redundancy_zone_tag str

The redundancy zone tag to use. Consul will try to keep one voting server by zone to take advantage of isolated failure domains. Defaults to an empty string.

server_stabilization_time str

The period to wait for a server to be healthy and stable before being promoted to a full, voting member. Defaults to "10s".

upgrade_version_tag str

The tag to override the version information used during a migration. Defaults to an empty string.

Package Details

Repository
https://github.com/pulumi/pulumi-consul
License
Apache-2.0
Notes
This Pulumi package is based on the consul Terraform Provider.