1. Packages
  2. HashiCorp Consul
  3. API Docs
  4. Service
Consul v3.11.0 published on Monday, Nov 20, 2023 by Pulumi

consul.Service

Explore with Pulumi AI

consul logo
Consul v3.11.0 published on Monday, Nov 20, 2023 by Pulumi

    A high-level resource for creating a Service in Consul in the Consul catalog. This is appropriate for registering external services and can be used to create services addressable by Consul that cannot be registered with a local agent.

    NOTE: If a Consul agent is running on the node where this service is registered, it is not recommended to use this resource as the service will be removed during the next anti-entropy synchronization.

    Example Usage

    Creating a new node with the service

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Consul = Pulumi.Consul;
    
    return await Deployment.RunAsync(() => 
    {
        var compute = new Consul.Node("compute", new()
        {
            Address = "www.google.com",
        });
    
        var google = new Consul.Service("google", new()
        {
            Node = compute.Name,
            Port = 80,
            Tags = new[]
            {
                "tag0",
            },
        });
    
    });
    
    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 {
    		compute, err := consul.NewNode(ctx, "compute", &consul.NodeArgs{
    			Address: pulumi.String("www.google.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = consul.NewService(ctx, "google", &consul.ServiceArgs{
    			Node: compute.Name,
    			Port: pulumi.Int(80),
    			Tags: pulumi.StringArray{
    				pulumi.String("tag0"),
    			},
    		})
    		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.Node;
    import com.pulumi.consul.NodeArgs;
    import com.pulumi.consul.Service;
    import com.pulumi.consul.ServiceArgs;
    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 compute = new Node("compute", NodeArgs.builder()        
                .address("www.google.com")
                .build());
    
            var google = new Service("google", ServiceArgs.builder()        
                .node(compute.name())
                .port(80)
                .tags("tag0")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_consul as consul
    
    compute = consul.Node("compute", address="www.google.com")
    google = consul.Service("google",
        node=compute.name,
        port=80,
        tags=["tag0"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as consul from "@pulumi/consul";
    
    const compute = new consul.Node("compute", {address: "www.google.com"});
    const google = new consul.Service("google", {
        node: compute.name,
        port: 80,
        tags: ["tag0"],
    });
    
    resources:
      google:
        type: consul:Service
        properties:
          node: ${compute.name}
          port: 80
          tags:
            - tag0
      compute:
        type: consul:Node
        properties:
          address: www.google.com
    

    Utilizing an existing known node

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Consul = Pulumi.Consul;
    
    return await Deployment.RunAsync(() => 
    {
        var google = new Consul.Service("google", new()
        {
            Node = "google",
            Port = 443,
        });
    
    });
    
    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.NewService(ctx, "google", &consul.ServiceArgs{
    			Node: pulumi.String("google"),
    			Port: pulumi.Int(443),
    		})
    		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.Service;
    import com.pulumi.consul.ServiceArgs;
    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 google = new Service("google", ServiceArgs.builder()        
                .node("google")
                .port(443)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_consul as consul
    
    google = consul.Service("google",
        node="google",
        port=443)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as consul from "@pulumi/consul";
    
    const google = new consul.Service("google", {
        node: "google",
        port: 443,
    });
    
    resources:
      google:
        type: consul:Service
        properties:
          node: google
          port: 443
    

    Register a health-check

    Coming soon!

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.consul.Service;
    import com.pulumi.consul.ServiceArgs;
    import com.pulumi.consul.inputs.ServiceCheckArgs;
    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 redis = new Service("redis", ServiceArgs.builder()        
                .checks(ServiceCheckArgs.builder()
                    .checkId("service:redis1")
                    .deregisterCriticalServiceAfter("30s")
                    .headers(                
                        ServiceCheckHeaderArgs.builder()
                            .name("foo")
                            .value("test")
                            .build(),
                        ServiceCheckHeaderArgs.builder()
                            .name("bar")
                            .value("test")
                            .build())
                    .http("https://www.hashicorptest.com")
                    .interval("5s")
                    .method("PUT")
                    .name("Redis health check")
                    .status("passing")
                    .timeout("1s")
                    .tlsSkipVerify(false)
                    .build())
                .node("redis")
                .port(6379)
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      redis:
        type: consul:Service
        properties:
          checks:
            - checkId: service:redis1
              deregisterCriticalServiceAfter: 30s
              headers:
                - name: foo
                  value:
                    - test
                - name: bar
                  value:
                    - test
              http: https://www.hashicorptest.com
              interval: 5s
              method: PUT
              name: Redis health check
              status: passing
              timeout: 1s
              tlsSkipVerify: false
          node: redis
          port: 6379
    

    Create Service Resource

    new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
    @overload
    def Service(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                address: Optional[str] = None,
                checks: Optional[Sequence[ServiceCheckArgs]] = None,
                datacenter: Optional[str] = None,
                enable_tag_override: Optional[bool] = None,
                external: Optional[bool] = None,
                meta: Optional[Mapping[str, str]] = None,
                name: Optional[str] = None,
                namespace: Optional[str] = None,
                node: Optional[str] = None,
                partition: Optional[str] = None,
                port: Optional[int] = None,
                service_id: Optional[str] = None,
                tags: Optional[Sequence[str]] = None)
    @overload
    def Service(resource_name: str,
                args: ServiceArgs,
                opts: Optional[ResourceOptions] = None)
    func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)
    public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)
    public Service(String name, ServiceArgs args)
    public Service(String name, ServiceArgs args, CustomResourceOptions options)
    
    type: consul:Service
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ServiceArgs
    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 ServiceArgs
    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 ServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Service 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 Service resource accepts the following input properties:

    Node string

    The name of the node the to register the service on.

    Address string

    The address of the service. Defaults to the address of the node.

    Checks List<ServiceCheck>
    Datacenter string

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

    EnableTagOverride bool

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    External bool

    Deprecated:

    The external field has been deprecated and does nothing.

    Meta Dictionary<string, string>

    A map of arbitrary KV metadata linked to the service instance.

    Name string

    The name of the header.

    Namespace string

    The namespace to create the service within.

    Partition string

    The partition the service is associated with.

    Port int

    The port of the service.

    ServiceId string

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    Tags List<string>

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    Node string

    The name of the node the to register the service on.

    Address string

    The address of the service. Defaults to the address of the node.

    Checks []ServiceCheckArgs
    Datacenter string

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

    EnableTagOverride bool

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    External bool

    Deprecated:

    The external field has been deprecated and does nothing.

    Meta map[string]string

    A map of arbitrary KV metadata linked to the service instance.

    Name string

    The name of the header.

    Namespace string

    The namespace to create the service within.

    Partition string

    The partition the service is associated with.

    Port int

    The port of the service.

    ServiceId string

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    Tags []string

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    node String

    The name of the node the to register the service on.

    address String

    The address of the service. Defaults to the address of the node.

    checks List<ServiceCheck>
    datacenter String

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

    enableTagOverride Boolean

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    external Boolean

    Deprecated:

    The external field has been deprecated and does nothing.

    meta Map<String,String>

    A map of arbitrary KV metadata linked to the service instance.

    name String

    The name of the header.

    namespace String

    The namespace to create the service within.

    partition String

    The partition the service is associated with.

    port Integer

    The port of the service.

    serviceId String

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    tags List<String>

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    node string

    The name of the node the to register the service on.

    address string

    The address of the service. Defaults to the address of the node.

    checks ServiceCheck[]
    datacenter string

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

    enableTagOverride boolean

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    external boolean

    Deprecated:

    The external field has been deprecated and does nothing.

    meta {[key: string]: string}

    A map of arbitrary KV metadata linked to the service instance.

    name string

    The name of the header.

    namespace string

    The namespace to create the service within.

    partition string

    The partition the service is associated with.

    port number

    The port of the service.

    serviceId string

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    tags string[]

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    node str

    The name of the node the to register the service on.

    address str

    The address of the service. Defaults to the address of the node.

    checks Sequence[ServiceCheckArgs]
    datacenter str

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

    enable_tag_override bool

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    external bool

    Deprecated:

    The external field has been deprecated and does nothing.

    meta Mapping[str, str]

    A map of arbitrary KV metadata linked to the service instance.

    name str

    The name of the header.

    namespace str

    The namespace to create the service within.

    partition str

    The partition the service is associated with.

    port int

    The port of the service.

    service_id str

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    tags Sequence[str]

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    node String

    The name of the node the to register the service on.

    address String

    The address of the service. Defaults to the address of the node.

    checks List<Property Map>
    datacenter String

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

    enableTagOverride Boolean

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    external Boolean

    Deprecated:

    The external field has been deprecated and does nothing.

    meta Map<String>

    A map of arbitrary KV metadata linked to the service instance.

    name String

    The name of the header.

    namespace String

    The namespace to create the service within.

    partition String

    The partition the service is associated with.

    port Number

    The port of the service.

    serviceId String

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    tags List<String>

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Service 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 Service Resource

    Get an existing Service 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?: ServiceState, opts?: CustomResourceOptions): Service
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address: Optional[str] = None,
            checks: Optional[Sequence[ServiceCheckArgs]] = None,
            datacenter: Optional[str] = None,
            enable_tag_override: Optional[bool] = None,
            external: Optional[bool] = None,
            meta: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            node: Optional[str] = None,
            partition: Optional[str] = None,
            port: Optional[int] = None,
            service_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> Service
    func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
    public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
    public static Service get(String name, Output<String> id, ServiceState 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:
    Address string

    The address of the service. Defaults to the address of the node.

    Checks List<ServiceCheck>
    Datacenter string

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

    EnableTagOverride bool

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    External bool

    Deprecated:

    The external field has been deprecated and does nothing.

    Meta Dictionary<string, string>

    A map of arbitrary KV metadata linked to the service instance.

    Name string

    The name of the header.

    Namespace string

    The namespace to create the service within.

    Node string

    The name of the node the to register the service on.

    Partition string

    The partition the service is associated with.

    Port int

    The port of the service.

    ServiceId string

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    Tags List<string>

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    Address string

    The address of the service. Defaults to the address of the node.

    Checks []ServiceCheckArgs
    Datacenter string

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

    EnableTagOverride bool

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    External bool

    Deprecated:

    The external field has been deprecated and does nothing.

    Meta map[string]string

    A map of arbitrary KV metadata linked to the service instance.

    Name string

    The name of the header.

    Namespace string

    The namespace to create the service within.

    Node string

    The name of the node the to register the service on.

    Partition string

    The partition the service is associated with.

    Port int

    The port of the service.

    ServiceId string

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    Tags []string

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    address String

    The address of the service. Defaults to the address of the node.

    checks List<ServiceCheck>
    datacenter String

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

    enableTagOverride Boolean

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    external Boolean

    Deprecated:

    The external field has been deprecated and does nothing.

    meta Map<String,String>

    A map of arbitrary KV metadata linked to the service instance.

    name String

    The name of the header.

    namespace String

    The namespace to create the service within.

    node String

    The name of the node the to register the service on.

    partition String

    The partition the service is associated with.

    port Integer

    The port of the service.

    serviceId String

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    tags List<String>

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    address string

    The address of the service. Defaults to the address of the node.

    checks ServiceCheck[]
    datacenter string

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

    enableTagOverride boolean

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    external boolean

    Deprecated:

    The external field has been deprecated and does nothing.

    meta {[key: string]: string}

    A map of arbitrary KV metadata linked to the service instance.

    name string

    The name of the header.

    namespace string

    The namespace to create the service within.

    node string

    The name of the node the to register the service on.

    partition string

    The partition the service is associated with.

    port number

    The port of the service.

    serviceId string

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    tags string[]

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    address str

    The address of the service. Defaults to the address of the node.

    checks Sequence[ServiceCheckArgs]
    datacenter str

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

    enable_tag_override bool

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    external bool

    Deprecated:

    The external field has been deprecated and does nothing.

    meta Mapping[str, str]

    A map of arbitrary KV metadata linked to the service instance.

    name str

    The name of the header.

    namespace str

    The namespace to create the service within.

    node str

    The name of the node the to register the service on.

    partition str

    The partition the service is associated with.

    port int

    The port of the service.

    service_id str

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    tags Sequence[str]

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    address String

    The address of the service. Defaults to the address of the node.

    checks List<Property Map>
    datacenter String

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

    enableTagOverride Boolean

    Specifies to disable the anti-entropy feature for this service's tags. Defaults to false.

    external Boolean

    Deprecated:

    The external field has been deprecated and does nothing.

    meta Map<String>

    A map of arbitrary KV metadata linked to the service instance.

    name String

    The name of the header.

    namespace String

    The namespace to create the service within.

    node String

    The name of the node the to register the service on.

    partition String

    The partition the service is associated with.

    port Number

    The port of the service.

    serviceId String

    If the service ID is not provided, it will be defaulted to the value of the name attribute.

    tags List<String>

    A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

    Supporting Types

    ServiceCheck, ServiceCheckArgs

    CheckId string

    An ID, unique per agent.

    Interval string

    The interval to wait between each health-check invocation.

    Name string

    The name of the health-check.

    Timeout string

    Specifies a timeout for outgoing connections in the case of a HTTP or TCP check.

    DeregisterCriticalServiceAfter string

    The time after which the service is automatically deregistered when in the critical state. Defaults to 30s.

    Headers List<ServiceCheckHeader>

    The headers to send for an HTTP check. The attributes of each header is given below.

    Http string

    The HTTP endpoint to call for an HTTP check.

    Method string

    The method to use for HTTP health-checks. Defaults to GET.

    Notes string

    An opaque field meant to hold human readable text.

    Status string

    The initial health-check status.

    Tcp string

    The TCP address and port to connect to for a TCP check.

    TlsSkipVerify bool

    Whether to deactivate certificate verification for HTTP health-checks. Defaults to false.

    CheckId string

    An ID, unique per agent.

    Interval string

    The interval to wait between each health-check invocation.

    Name string

    The name of the health-check.

    Timeout string

    Specifies a timeout for outgoing connections in the case of a HTTP or TCP check.

    DeregisterCriticalServiceAfter string

    The time after which the service is automatically deregistered when in the critical state. Defaults to 30s.

    Headers []ServiceCheckHeader

    The headers to send for an HTTP check. The attributes of each header is given below.

    Http string

    The HTTP endpoint to call for an HTTP check.

    Method string

    The method to use for HTTP health-checks. Defaults to GET.

    Notes string

    An opaque field meant to hold human readable text.

    Status string

    The initial health-check status.

    Tcp string

    The TCP address and port to connect to for a TCP check.

    TlsSkipVerify bool

    Whether to deactivate certificate verification for HTTP health-checks. Defaults to false.

    checkId String

    An ID, unique per agent.

    interval String

    The interval to wait between each health-check invocation.

    name String

    The name of the health-check.

    timeout String

    Specifies a timeout for outgoing connections in the case of a HTTP or TCP check.

    deregisterCriticalServiceAfter String

    The time after which the service is automatically deregistered when in the critical state. Defaults to 30s.

    headers List<ServiceCheckHeader>

    The headers to send for an HTTP check. The attributes of each header is given below.

    http String

    The HTTP endpoint to call for an HTTP check.

    method String

    The method to use for HTTP health-checks. Defaults to GET.

    notes String

    An opaque field meant to hold human readable text.

    status String

    The initial health-check status.

    tcp String

    The TCP address and port to connect to for a TCP check.

    tlsSkipVerify Boolean

    Whether to deactivate certificate verification for HTTP health-checks. Defaults to false.

    checkId string

    An ID, unique per agent.

    interval string

    The interval to wait between each health-check invocation.

    name string

    The name of the health-check.

    timeout string

    Specifies a timeout for outgoing connections in the case of a HTTP or TCP check.

    deregisterCriticalServiceAfter string

    The time after which the service is automatically deregistered when in the critical state. Defaults to 30s.

    headers ServiceCheckHeader[]

    The headers to send for an HTTP check. The attributes of each header is given below.

    http string

    The HTTP endpoint to call for an HTTP check.

    method string

    The method to use for HTTP health-checks. Defaults to GET.

    notes string

    An opaque field meant to hold human readable text.

    status string

    The initial health-check status.

    tcp string

    The TCP address and port to connect to for a TCP check.

    tlsSkipVerify boolean

    Whether to deactivate certificate verification for HTTP health-checks. Defaults to false.

    check_id str

    An ID, unique per agent.

    interval str

    The interval to wait between each health-check invocation.

    name str

    The name of the health-check.

    timeout str

    Specifies a timeout for outgoing connections in the case of a HTTP or TCP check.

    deregister_critical_service_after str

    The time after which the service is automatically deregistered when in the critical state. Defaults to 30s.

    headers Sequence[ServiceCheckHeader]

    The headers to send for an HTTP check. The attributes of each header is given below.

    http str

    The HTTP endpoint to call for an HTTP check.

    method str

    The method to use for HTTP health-checks. Defaults to GET.

    notes str

    An opaque field meant to hold human readable text.

    status str

    The initial health-check status.

    tcp str

    The TCP address and port to connect to for a TCP check.

    tls_skip_verify bool

    Whether to deactivate certificate verification for HTTP health-checks. Defaults to false.

    checkId String

    An ID, unique per agent.

    interval String

    The interval to wait between each health-check invocation.

    name String

    The name of the health-check.

    timeout String

    Specifies a timeout for outgoing connections in the case of a HTTP or TCP check.

    deregisterCriticalServiceAfter String

    The time after which the service is automatically deregistered when in the critical state. Defaults to 30s.

    headers List<Property Map>

    The headers to send for an HTTP check. The attributes of each header is given below.

    http String

    The HTTP endpoint to call for an HTTP check.

    method String

    The method to use for HTTP health-checks. Defaults to GET.

    notes String

    An opaque field meant to hold human readable text.

    status String

    The initial health-check status.

    tcp String

    The TCP address and port to connect to for a TCP check.

    tlsSkipVerify Boolean

    Whether to deactivate certificate verification for HTTP health-checks. Defaults to false.

    ServiceCheckHeader, ServiceCheckHeaderArgs

    Name string

    The name of the header.

    Values List<string>

    The header's list of values.

    Name string

    The name of the header.

    Values []string

    The header's list of values.

    name String

    The name of the header.

    values List<String>

    The header's list of values.

    name string

    The name of the header.

    values string[]

    The header's list of values.

    name str

    The name of the header.

    values Sequence[str]

    The header's list of values.

    name String

    The name of the header.

    values List<String>

    The header's list of values.

    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.0 published on Monday, Nov 20, 2023 by Pulumi