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

getAutopilotHealth

The consul.getAutopilotHealth data source returns autopilot health information about the current Consul cluster.

Example Usage

using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var read = Output.Create(Consul.GetAutopilotHealth.InvokeAsync());
        this.Health = read.Apply(read => read.Healthy);
    }

    [Output("health")]
    public Output<string> Health { get; set; }
}
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 {
        read, err := consul.GetAutopilotHealth(ctx, nil, nil)
        if err != nil {
            return err
        }
        ctx.Export("health", read.Healthy)
        return nil
    })
}
import pulumi
import pulumi_consul as consul

read = consul.get_autopilot_health()
pulumi.export("health", read.healthy)
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const read = pulumi.output(consul.getAutopilotHealth({ async: true }));

export const health = read.healthy;

Using getAutopilotHealth

function getAutopilotHealth(args: GetAutopilotHealthArgs, opts?: InvokeOptions): Promise<GetAutopilotHealthResult>
def get_autopilot_health(datacenter: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetAutopilotHealthResult
func GetAutopilotHealth(ctx *Context, args *GetAutopilotHealthArgs, opts ...InvokeOption) (*GetAutopilotHealthResult, error)

Note: This function is named GetAutopilotHealth in the Go SDK.

public static class GetAutopilotHealth {
    public static Task<GetAutopilotHealthResult> InvokeAsync(GetAutopilotHealthArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Datacenter string

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

Datacenter string

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

datacenter string

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

datacenter str

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

getAutopilotHealth Result

The following output properties are available:

FailureTolerance int

The number of redundant healthy servers that could fail without causing an outage

Healthy bool

Whether the server is healthy according to the current Autopilot configuration

Id string

The provider-assigned unique ID for this managed resource.

Servers List<GetAutopilotHealthServer>

A list of server health information. See below for details on the available information.

Datacenter string
FailureTolerance int

The number of redundant healthy servers that could fail without causing an outage

Healthy bool

Whether the server is healthy according to the current Autopilot configuration

Id string

The provider-assigned unique ID for this managed resource.

Servers []GetAutopilotHealthServer

A list of server health information. See below for details on the available information.

Datacenter string
failureTolerance number

The number of redundant healthy servers that could fail without causing an outage

healthy boolean

Whether the server is healthy according to the current Autopilot configuration

id string

The provider-assigned unique ID for this managed resource.

servers GetAutopilotHealthServer[]

A list of server health information. See below for details on the available information.

datacenter string
failure_tolerance int

The number of redundant healthy servers that could fail without causing an outage

healthy bool

Whether the server is healthy according to the current Autopilot configuration

id str

The provider-assigned unique ID for this managed resource.

servers Sequence[GetAutopilotHealthServer]

A list of server health information. See below for details on the available information.

datacenter str

Supporting Types

GetAutopilotHealthServer

Address string

The address of the server

Healthy bool

Whether the server is healthy according to the current Autopilot configuration

Id string

The Raft ID of the server

LastContact string

The time elapsed since the server’s last contact with the leader

LastIndex int

The index of the server’s last committed Raft log entry

LastTerm int

The server’s last known Raft leader term

Leader bool

Whether the server is currently leader

Name string

The node name of the server

SerfStatus string

The status of the SerfHealth check of the server

StableSince string

The time this server has been in its current Healthy state

Version string

The Consul version of the server

Voter bool

Whether the server is a voting member of the Raft cluster

Address string

The address of the server

Healthy bool

Whether the server is healthy according to the current Autopilot configuration

Id string

The Raft ID of the server

LastContact string

The time elapsed since the server’s last contact with the leader

LastIndex int

The index of the server’s last committed Raft log entry

LastTerm int

The server’s last known Raft leader term

Leader bool

Whether the server is currently leader

Name string

The node name of the server

SerfStatus string

The status of the SerfHealth check of the server

StableSince string

The time this server has been in its current Healthy state

Version string

The Consul version of the server

Voter bool

Whether the server is a voting member of the Raft cluster

address string

The address of the server

healthy boolean

Whether the server is healthy according to the current Autopilot configuration

id string

The Raft ID of the server

lastContact string

The time elapsed since the server’s last contact with the leader

lastIndex number

The index of the server’s last committed Raft log entry

lastTerm number

The server’s last known Raft leader term

leader boolean

Whether the server is currently leader

name string

The node name of the server

serfStatus string

The status of the SerfHealth check of the server

stableSince string

The time this server has been in its current Healthy state

version string

The Consul version of the server

voter boolean

Whether the server is a voting member of the Raft cluster

address str

The address of the server

healthy bool

Whether the server is healthy according to the current Autopilot configuration

id str

The Raft ID of the server

last_contact str

The time elapsed since the server’s last contact with the leader

last_index int

The index of the server’s last committed Raft log entry

last_term int

The server’s last known Raft leader term

leader bool

Whether the server is currently leader

name str

The node name of the server

serf_status str

The status of the SerfHealth check of the server

stable_since str

The time this server has been in its current Healthy state

version str

The Consul version of the server

voter bool

Whether the server is a voting member of the Raft cluster

Package Details

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