consul.AutopilotConfig
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
const config = new consul.AutopilotConfig("config", {
cleanupDeadServers: false,
lastContactThreshold: "1s",
maxTrailingLogs: 500,
});
import pulumi
import pulumi_consul as consul
config = consul.AutopilotConfig("config",
cleanup_dead_servers=False,
last_contact_threshold="1s",
max_trailing_logs=500)
package main
import (
"github.com/pulumi/pulumi-consul/sdk/v3/go/consul"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Consul = Pulumi.Consul;
return await Deployment.RunAsync(() =>
{
var config = new Consul.AutopilotConfig("config", new()
{
CleanupDeadServers = false,
LastContactThreshold = "1s",
MaxTrailingLogs = 500,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.consul.AutopilotConfig;
import com.pulumi.consul.AutopilotConfigArgs;
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 config = new AutopilotConfig("config", AutopilotConfigArgs.builder()
.cleanupDeadServers(false)
.lastContactThreshold("1s")
.maxTrailingLogs(500)
.build());
}
}
resources:
config:
type: consul:AutopilotConfig
properties:
cleanupDeadServers: false
lastContactThreshold: 1s
maxTrailingLogs: 500
Create AutopilotConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AutopilotConfig(name: string, args?: AutopilotConfigArgs, opts?: CustomResourceOptions);
@overload
def AutopilotConfig(resource_name: str,
args: Optional[AutopilotConfigArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
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)
public AutopilotConfig(String name, AutopilotConfigArgs args)
public AutopilotConfig(String name, AutopilotConfigArgs args, CustomResourceOptions options)
type: consul:AutopilotConfig
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 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.
- args AutopilotConfigArgs
- 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 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.
- name String
- The unique name of the resource.
- args AutopilotConfigArgs
- 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 autopilotConfigResource = new Consul.AutopilotConfig("autopilotConfigResource", new()
{
CleanupDeadServers = false,
Datacenter = "string",
DisableUpgradeMigration = false,
LastContactThreshold = "string",
MaxTrailingLogs = 0,
RedundancyZoneTag = "string",
ServerStabilizationTime = "string",
UpgradeVersionTag = "string",
});
example, err := consul.NewAutopilotConfig(ctx, "autopilotConfigResource", &consul.AutopilotConfigArgs{
CleanupDeadServers: pulumi.Bool(false),
Datacenter: pulumi.String("string"),
DisableUpgradeMigration: pulumi.Bool(false),
LastContactThreshold: pulumi.String("string"),
MaxTrailingLogs: pulumi.Int(0),
RedundancyZoneTag: pulumi.String("string"),
ServerStabilizationTime: pulumi.String("string"),
UpgradeVersionTag: pulumi.String("string"),
})
var autopilotConfigResource = new AutopilotConfig("autopilotConfigResource", AutopilotConfigArgs.builder()
.cleanupDeadServers(false)
.datacenter("string")
.disableUpgradeMigration(false)
.lastContactThreshold("string")
.maxTrailingLogs(0)
.redundancyZoneTag("string")
.serverStabilizationTime("string")
.upgradeVersionTag("string")
.build());
autopilot_config_resource = consul.AutopilotConfig("autopilotConfigResource",
cleanup_dead_servers=False,
datacenter="string",
disable_upgrade_migration=False,
last_contact_threshold="string",
max_trailing_logs=0,
redundancy_zone_tag="string",
server_stabilization_time="string",
upgrade_version_tag="string")
const autopilotConfigResource = new consul.AutopilotConfig("autopilotConfigResource", {
cleanupDeadServers: false,
datacenter: "string",
disableUpgradeMigration: false,
lastContactThreshold: "string",
maxTrailingLogs: 0,
redundancyZoneTag: "string",
serverStabilizationTime: "string",
upgradeVersionTag: "string",
});
type: consul:AutopilotConfig
properties:
cleanupDeadServers: false
datacenter: string
disableUpgradeMigration: false
lastContactThreshold: string
maxTrailingLogs: 0
redundancyZoneTag: string
serverStabilizationTime: string
upgradeVersionTag: string
AutopilotConfig 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 AutopilotConfig resource accepts the following input properties:
- Cleanup
Dead boolServers - 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.
- Disable
Upgrade boolMigration - Whether to disable upgrade migrations. Defaults to false.
- Last
Contact stringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - Max
Trailing intLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- Redundancy
Zone stringTag - 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 stringTime - 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 stringTag - The tag to override the version information used during a migration. Defaults to an empty string.
- Cleanup
Dead boolServers - 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.
- Disable
Upgrade boolMigration - Whether to disable upgrade migrations. Defaults to false.
- Last
Contact stringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - Max
Trailing intLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- Redundancy
Zone stringTag - 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 stringTime - 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 stringTag - The tag to override the version information used during a migration. Defaults to an empty string.
- cleanup
Dead BooleanServers - 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.
- disable
Upgrade BooleanMigration - Whether to disable upgrade migrations. Defaults to false.
- last
Contact StringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - max
Trailing IntegerLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- redundancy
Zone StringTag - 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 StringTime - 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 StringTag - The tag to override the version information used during a migration. Defaults to an empty string.
- cleanup
Dead booleanServers - 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.
- disable
Upgrade booleanMigration - Whether to disable upgrade migrations. Defaults to false.
- last
Contact stringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - max
Trailing numberLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- redundancy
Zone stringTag - 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 stringTime - 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 stringTag - The tag to override the version information used during a migration. Defaults to an empty string.
- cleanup_
dead_ boolservers - 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_ boolmigration - Whether to disable upgrade migrations. Defaults to false.
- last_
contact_ strthreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - max_
trailing_ intlogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- redundancy_
zone_ strtag - 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_ strtime - 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_ strtag - The tag to override the version information used during a migration. Defaults to an empty string.
- cleanup
Dead BooleanServers - 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.
- disable
Upgrade BooleanMigration - Whether to disable upgrade migrations. Defaults to false.
- last
Contact StringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - max
Trailing NumberLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- redundancy
Zone StringTag - 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 StringTime - 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 StringTag - 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 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 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)
public static AutopilotConfig get(String name, Output<String> id, AutopilotConfigState 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 - 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.
- Disable
Upgrade boolMigration - Whether to disable upgrade migrations. Defaults to false.
- Last
Contact stringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - Max
Trailing intLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- Redundancy
Zone stringTag - 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 stringTime - 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 stringTag - The tag to override the version information used during a migration. Defaults to an empty string.
- Cleanup
Dead boolServers - 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.
- Disable
Upgrade boolMigration - Whether to disable upgrade migrations. Defaults to false.
- Last
Contact stringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - Max
Trailing intLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- Redundancy
Zone stringTag - 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 stringTime - 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 stringTag - The tag to override the version information used during a migration. Defaults to an empty string.
- cleanup
Dead BooleanServers - 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.
- disable
Upgrade BooleanMigration - Whether to disable upgrade migrations. Defaults to false.
- last
Contact StringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - max
Trailing IntegerLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- redundancy
Zone StringTag - 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 StringTime - 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 StringTag - The tag to override the version information used during a migration. Defaults to an empty string.
- cleanup
Dead booleanServers - 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.
- disable
Upgrade booleanMigration - Whether to disable upgrade migrations. Defaults to false.
- last
Contact stringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - max
Trailing numberLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- redundancy
Zone stringTag - 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 stringTime - 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 stringTag - The tag to override the version information used during a migration. Defaults to an empty string.
- cleanup_
dead_ boolservers - 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_ boolmigration - Whether to disable upgrade migrations. Defaults to false.
- last_
contact_ strthreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - max_
trailing_ intlogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- redundancy_
zone_ strtag - 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_ strtime - 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_ strtag - The tag to override the version information used during a migration. Defaults to an empty string.
- cleanup
Dead BooleanServers - 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.
- disable
Upgrade BooleanMigration - Whether to disable upgrade migrations. Defaults to false.
- last
Contact StringThreshold - The time after which a server is
considered as unhealthy and will be removed. Defaults to
"200ms"
. - max
Trailing NumberLogs - The maximum number of Raft log entries a server can trail the leader. Defaults to 250.
- redundancy
Zone StringTag - 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 StringTime - 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 StringTag - The tag to override the version information used during a migration. Defaults to an empty string.
Package Details
- Repository
- HashiCorp Consul pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
consul
Terraform Provider.