1. Packages
  2. HashiCorp Consul
  3. API Docs
  4. AutopilotConfig
Consul v3.11.1 published on Friday, Jan 19, 2024 by Pulumi

consul.AutopilotConfig

Explore with Pulumi AI

consul logo
Consul v3.11.1 published on Friday, Jan 19, 2024 by Pulumi

    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 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 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
    	})
    }
    
    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());
    
        }
    }
    
    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,
    });
    
    resources:
      config:
        type: consul:AutopilotConfig
        properties:
          cleanupDeadServers: false
          lastContactThreshold: 1s
          maxTrailingLogs: 500
    

    Create AutopilotConfig Resource

    new AutopilotConfig(name: string, args?: AutopilotConfigArgs, opts?: CustomResourceOptions);
    @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)
    @overload
    def AutopilotConfig(resource_name: str,
                        args: Optional[AutopilotConfigArgs] = None,
                        opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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 Integer
    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.
    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.

    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.
    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 Integer
    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.
    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.

    Package Details

    Repository
    HashiCorp Consul pulumi/pulumi-consul
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the consul Terraform Provider.
    consul logo
    Consul v3.11.1 published on Friday, Jan 19, 2024 by Pulumi