This page documents the language specification for the consul package. If you're looking for help working with the inputs, outputs, or functions of consul resources in a Pulumi program, please see the resource documentation for examples and API reference.

Pulumi Consul

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-consul repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-consul repo.

class pulumi_consul.AclAuthMethod(resource_name, opts=None, config=None, description=None, name=None, namespace=None, type=None, __props__=None, __name__=None, __opts__=None)

Starting with Consul 1.5.0, the .AclAuthMethod resource can be used to managed Consul ACL auth methods.

import pulumi
import pulumi_consul as consul

minikube = consul.AclAuthMethod("minikube",
    config={
        "CACert": """-----BEGIN CERTIFICATE-----
...-----END CERTIFICATE-----

""",
        "Host": "https://192.0.2.42:8443",
        "ServiceAccountJWT": "eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9...",
    },
    description="dev minikube cluster",
    type="kubernetes")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • config (pulumi.Input[dict]) – The raw configuration for this ACL auth method.

  • description (pulumi.Input[str]) – A free form human readable description of the auth method.

  • name (pulumi.Input[str]) – The name of the ACL auth method.

  • namespace (pulumi.Input[str]) – The namespace to create the policy within.

  • type (pulumi.Input[str]) – The type of the ACL auth method.

config: pulumi.Output[dict] = None

The raw configuration for this ACL auth method.

description: pulumi.Output[str] = None

A free form human readable description of the auth method.

name: pulumi.Output[str] = None

The name of the ACL auth method.

namespace: pulumi.Output[str] = None

The namespace to create the policy within.

type: pulumi.Output[str] = None

The type of the ACL auth method.

static get(resource_name, id, opts=None, config=None, description=None, name=None, namespace=None, type=None)

Get an existing AclAuthMethod resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • config (pulumi.Input[dict]) – The raw configuration for this ACL auth method.

  • description (pulumi.Input[str]) – A free form human readable description of the auth method.

  • name (pulumi.Input[str]) – The name of the ACL auth method.

  • namespace (pulumi.Input[str]) – The namespace to create the policy within.

  • type (pulumi.Input[str]) – The type of the ACL auth method.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.AclBindingRule(resource_name, opts=None, auth_method=None, bind_name=None, bind_type=None, description=None, namespace=None, selector=None, __props__=None, __name__=None, __opts__=None)

Starting with Consul 1.5.0, the .AclBindingRule resource can be used to managed Consul ACL binding rules.

import pulumi
import pulumi_consul as consul

minikube = consul.AclAuthMethod("minikube",
    config={
        "CACert": """-----BEGIN CERTIFICATE-----
...-----END CERTIFICATE-----

""",
        "Host": "https://192.0.2.42:8443",
        "ServiceAccountJWT": "eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9...",
    },
    description="dev minikube cluster",
    type="kubernetes")
test = consul.AclBindingRule("test",
    auth_method=minikube.name,
    bind_name="minikube",
    bind_type="service",
    description="foobar",
    selector="serviceaccount.namespace==default")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • auth_method (pulumi.Input[str]) – The name of the ACL auth method this rule apply.

  • bind_name (pulumi.Input[str]) – The name to bind to a token at login-time.

  • bind_type (pulumi.Input[str]) – Specifies the way the binding rule affects a token created at login.

  • description (pulumi.Input[str]) – A free form human readable description of the binding rule.

  • namespace (pulumi.Input[str]) – The namespace to create the binding rule within.

  • selector (pulumi.Input[str]) – The expression used to math this rule against valid identities returned from an auth method validation.

auth_method: pulumi.Output[str] = None

The name of the ACL auth method this rule apply.

bind_name: pulumi.Output[str] = None

The name to bind to a token at login-time.

bind_type: pulumi.Output[str] = None

Specifies the way the binding rule affects a token created at login.

description: pulumi.Output[str] = None

A free form human readable description of the binding rule.

namespace: pulumi.Output[str] = None

The namespace to create the binding rule within.

selector: pulumi.Output[str] = None

The expression used to math this rule against valid identities returned from an auth method validation.

static get(resource_name, id, opts=None, auth_method=None, bind_name=None, bind_type=None, description=None, namespace=None, selector=None)

Get an existing AclBindingRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • auth_method (pulumi.Input[str]) – The name of the ACL auth method this rule apply.

  • bind_name (pulumi.Input[str]) – The name to bind to a token at login-time.

  • bind_type (pulumi.Input[str]) – Specifies the way the binding rule affects a token created at login.

  • description (pulumi.Input[str]) – A free form human readable description of the binding rule.

  • namespace (pulumi.Input[str]) – The namespace to create the binding rule within.

  • selector (pulumi.Input[str]) – The expression used to math this rule against valid identities returned from an auth method validation.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.AclPolicy(resource_name, opts=None, datacenters=None, description=None, name=None, namespace=None, rules=None, __props__=None, __name__=None, __opts__=None)

Starting with Consul 1.4.0, the .AclPolicy can be used to managed Consul ACL policies.

import pulumi
import pulumi_consul as consul

test = consul.AclPolicy("test",
    datacenters=["dc1"],
    rules="""node_prefix "" {
  policy = "read"
}

""")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • datacenters (pulumi.Input[list]) – The datacenters of the policy.

  • description (pulumi.Input[str]) – The description of the policy.

  • name (pulumi.Input[str]) – The name of the policy.

  • namespace (pulumi.Input[str]) – The namespace to create the policy within.

  • rules (pulumi.Input[str]) – The rules of the policy.

datacenters: pulumi.Output[list] = None

The datacenters of the policy.

description: pulumi.Output[str] = None

The description of the policy.

name: pulumi.Output[str] = None

The name of the policy.

namespace: pulumi.Output[str] = None

The namespace to create the policy within.

rules: pulumi.Output[str] = None

The rules of the policy.

static get(resource_name, id, opts=None, datacenters=None, description=None, name=None, namespace=None, rules=None)

Get an existing AclPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • datacenters (pulumi.Input[list]) – The datacenters of the policy.

  • description (pulumi.Input[str]) – The description of the policy.

  • name (pulumi.Input[str]) – The name of the policy.

  • namespace (pulumi.Input[str]) – The namespace to create the policy within.

  • rules (pulumi.Input[str]) – The rules of the policy.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.AclRole(resource_name, opts=None, description=None, name=None, namespace=None, policies=None, service_identities=None, __props__=None, __name__=None, __opts__=None)

Starting with Consul 1.5.0, the .AclRole can be used to managed Consul ACL roles.

import pulumi
import pulumi_consul as consul

read_policy = consul.AclPolicy("read-policy",
    datacenters=["dc1"],
    rules="node "" { policy = "read" }")
read = consul.AclRole("read",
    description="bar",
    policies=[read_policy.id],
    service_identities=[{
        "serviceName": "foo",
    }])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A free form human readable description of the role.

  • name (pulumi.Input[str]) – The name of the ACL role.

  • namespace (pulumi.Input[str]) – The namespace to create the role within.

  • policies (pulumi.Input[list]) – The list of policies that should be applied to the role.

  • service_identities (pulumi.Input[list]) – The list of service identities that should be applied to the role.

The service_identities object supports the following:

  • datacenters (pulumi.Input[list]) - The datacenters the effective policy is valid within.

  • serviceName (pulumi.Input[str]) - The name of the service.

description: pulumi.Output[str] = None

A free form human readable description of the role.

name: pulumi.Output[str] = None

The name of the ACL role.

namespace: pulumi.Output[str] = None

The namespace to create the role within.

policies: pulumi.Output[list] = None

The list of policies that should be applied to the role.

service_identities: pulumi.Output[list] = None

The list of service identities that should be applied to the role.

  • datacenters (list) - The datacenters the effective policy is valid within.

  • serviceName (str) - The name of the service.

static get(resource_name, id, opts=None, description=None, name=None, namespace=None, policies=None, service_identities=None)

Get an existing AclRole resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A free form human readable description of the role.

  • name (pulumi.Input[str]) – The name of the ACL role.

  • namespace (pulumi.Input[str]) – The namespace to create the role within.

  • policies (pulumi.Input[list]) – The list of policies that should be applied to the role.

  • service_identities (pulumi.Input[list]) – The list of service identities that should be applied to the role.

The service_identities object supports the following:

  • datacenters (pulumi.Input[list]) - The datacenters the effective policy is valid within.

  • serviceName (pulumi.Input[str]) - The name of the service.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.AclToken(resource_name, opts=None, accessor_id=None, description=None, local=None, namespace=None, policies=None, roles=None, __props__=None, __name__=None, __opts__=None)

The .AclToken resource writes an ACL token into Consul.

import pulumi
import pulumi_consul as consul

agent = consul.AclPolicy("agent", rules="""node_prefix "" {
  policy = "read"
}

""")
test = consul.AclToken("test",
    description="my test token",
    local=True,
    policies=[agent.name])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • accessor_id (pulumi.Input[str]) – The uuid of the token. If omitted, Consul will generate a random uuid.

  • description (pulumi.Input[str]) – The description of the token.

  • local (pulumi.Input[bool]) – The flag to set the token local to the current datacenter.

  • namespace (pulumi.Input[str]) – The namespace to create the token within.

  • policies (pulumi.Input[list]) – The list of policies attached to the token.

  • roles (pulumi.Input[list]) – The list of roles attached to the token.

accessor_id: pulumi.Output[str] = None

The uuid of the token. If omitted, Consul will generate a random uuid.

description: pulumi.Output[str] = None

The description of the token.

local: pulumi.Output[bool] = None

The flag to set the token local to the current datacenter.

namespace: pulumi.Output[str] = None

The namespace to create the token within.

policies: pulumi.Output[list] = None

The list of policies attached to the token.

roles: pulumi.Output[list] = None

The list of roles attached to the token.

static get(resource_name, id, opts=None, accessor_id=None, description=None, local=None, namespace=None, policies=None, roles=None)

Get an existing AclToken resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • accessor_id (pulumi.Input[str]) – The uuid of the token. If omitted, Consul will generate a random uuid.

  • description (pulumi.Input[str]) – The description of the token.

  • local (pulumi.Input[bool]) – The flag to set the token local to the current datacenter.

  • namespace (pulumi.Input[str]) – The namespace to create the token within.

  • policies (pulumi.Input[list]) – The list of policies attached to the token.

  • roles (pulumi.Input[list]) – The list of roles attached to the token.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.AclTokenPolicyAttachment(resource_name, opts=None, policy=None, token_id=None, __props__=None, __name__=None, __opts__=None)

Create a AclTokenPolicyAttachment resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] policy: The name of the policy attached to the token. :param pulumi.Input[str] token_id: The id of the token.

policy: pulumi.Output[str] = None

The name of the policy attached to the token.

token_id: pulumi.Output[str] = None

The id of the token.

static get(resource_name, id, opts=None, policy=None, token_id=None)

Get an existing AclTokenPolicyAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • policy (pulumi.Input[str]) – The name of the policy attached to the token.

  • token_id (pulumi.Input[str]) – The id of the token.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.AgentService(resource_name, opts=None, address=None, name=None, port=None, tags=None, __props__=None, __name__=None, __opts__=None)

!> The .AgentService resource has been deprecated in version 2.0.0 of the provider and will be removed in a future release. Please read the upgrade guide for more information.

Provides access to the agent service data in Consul. This can be used to define a service associated with a particular agent. Currently, defining health checks for an agent service is not supported.

import pulumi
import pulumi_consul as consul

app = consul.AgentService("app",
    address="www.google.com",
    port=80,
    tags=[
        "tag0",
        "tag1",
    ])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The address of the service. Defaults to the address of the agent.

  • name (pulumi.Input[str]) – The name of the service.

  • port (pulumi.Input[float]) – The port of the service.

  • tags (pulumi.Input[list]) – A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

address: pulumi.Output[str] = None

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

name: pulumi.Output[str] = None

The name of the service.

port: pulumi.Output[float] = None

The port of the service.

tags: pulumi.Output[list] = None

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

static get(resource_name, id, opts=None, address=None, name=None, port=None, tags=None)

Get an existing AgentService resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The address of the service. Defaults to the address of the agent.

  • name (pulumi.Input[str]) – The name of the service.

  • port (pulumi.Input[float]) – The port of the service.

  • tags (pulumi.Input[list]) – A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.AutopilotConfig(resource_name, opts=None, cleanup_dead_servers=None, datacenter=None, disable_upgrade_migration=None, last_contact_threshold=None, max_trailing_logs=None, redundancy_zone_tag=None, server_stabilization_time=None, upgrade_version_tag=None, __props__=None, __name__=None, __opts__=None)

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.

import pulumi
import pulumi_consul as consul

config = consul.AutopilotConfig("config",
    cleanup_dead_servers=False,
    last_contact_threshold="1s",
    max_trailing_logs=500)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cleanup_dead_servers (pulumi.Input[bool]) – Whether to remove failing servers when a replacement comes online. Defaults to true.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • disable_upgrade_migration (pulumi.Input[bool]) – Whether to disable upgrade migrations. Defaults to false.

  • last_contact_threshold (pulumi.Input[str]) – The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

  • max_trailing_logs (pulumi.Input[float]) – The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

  • redundancy_zone_tag (pulumi.Input[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 (pulumi.Input[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 (pulumi.Input[str]) – The tag to override the version information used during a migration. Defaults to an empty string.

cleanup_dead_servers: pulumi.Output[bool] = None

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

datacenter: pulumi.Output[str] = None

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

disable_upgrade_migration: pulumi.Output[bool] = None

Whether to disable upgrade migrations. Defaults to false.

last_contact_threshold: pulumi.Output[str] = None

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

max_trailing_logs: pulumi.Output[float] = None

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

redundancy_zone_tag: pulumi.Output[str] = None

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: pulumi.Output[str] = None

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: pulumi.Output[str] = None

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

static get(resource_name, id, opts=None, cleanup_dead_servers=None, datacenter=None, disable_upgrade_migration=None, last_contact_threshold=None, max_trailing_logs=None, redundancy_zone_tag=None, server_stabilization_time=None, upgrade_version_tag=None)

Get an existing AutopilotConfig resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • cleanup_dead_servers (pulumi.Input[bool]) – Whether to remove failing servers when a replacement comes online. Defaults to true.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • disable_upgrade_migration (pulumi.Input[bool]) –

    Whether to disable upgrade migrations. Defaults to false.

  • last_contact_threshold (pulumi.Input[str]) – The time after which a server is considered as unhealthy and will be removed. Defaults to "200ms".

  • max_trailing_logs (pulumi.Input[float]) – The maximum number of Raft log entries a server can trail the leader. Defaults to 250.

  • redundancy_zone_tag (pulumi.Input[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 (pulumi.Input[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 (pulumi.Input[str]) – The tag to override the version information used during a migration. Defaults to an empty string.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.AwaitableGetAclAuthMethodResult(config=None, description=None, id=None, name=None, namespace=None, type=None)
class pulumi_consul.AwaitableGetAclPolicyResult(datacenters=None, description=None, id=None, name=None, namespace=None, rules=None)
class pulumi_consul.AwaitableGetAclRoleResult(description=None, id=None, name=None, namespace=None, policies=None, service_identities=None)
class pulumi_consul.AwaitableGetAclTokenResult(accessor_id=None, description=None, id=None, local=None, namespace=None, policies=None)
class pulumi_consul.AwaitableGetAclTokenSecretIdResult(accessor_id=None, encrypted_secret_id=None, id=None, pgp_key=None, secret_id=None)
class pulumi_consul.AwaitableGetAgentConfigResult(datacenter=None, id=None, node_id=None, node_name=None, revision=None, server=None, version=None)
class pulumi_consul.AwaitableGetAgentSelfResult(acl_datacenter=None, acl_default_policy=None, acl_disabled_ttl=None, acl_down_policy=None, acl_enforce08_semantics=None, acl_ttl=None, addresses=None, advertise_addr=None, advertise_addr_wan=None, advertise_addrs=None, atlas_join=None, bind_addr=None, bootstrap_expect=None, bootstrap_mode=None, check_deregister_interval_min=None, check_reap_interval=None, check_update_interval=None, client_addr=None, data_dir=None, datacenter=None, dev_mode=None, dns=None, dns_recursors=None, domain=None, enable_anonymous_signature=None, enable_coordinates=None, enable_debug=None, enable_remote_exec=None, enable_syslog=None, enable_ui=None, enable_update_check=None, id=None, leave_on_int=None, leave_on_term=None, log_level=None, name=None, performance=None, pid_file=None, ports=None, protocol_version=None, reconnect_timeout_lan=None, reconnect_timeout_wan=None, rejoin_after_leave=None, retry_join_ec2=None, retry_join_gce=None, retry_join_wans=None, retry_joins=None, retry_max_attempts=None, retry_max_attempts_wan=None, serf_lan_bind_addr=None, serf_wan_bind_addr=None, server_mode=None, server_name=None, session_ttl_min=None, start_join_wans=None, start_joins=None, syslog_facility=None, tagged_addresses=None, telemetry=None, tls_ca_file=None, tls_cert_file=None, tls_key_file=None, tls_min_version=None, tls_verify_incoming=None, tls_verify_outgoing=None, tls_verify_server_hostname=None, translate_wan_addrs=None, ui_dir=None, unix_sockets=None, version=None, version_prerelease=None, version_revision=None)
class pulumi_consul.AwaitableGetAutopilotHealthResult(datacenter=None, failure_tolerance=None, healthy=None, id=None, servers=None)
class pulumi_consul.AwaitableGetCatalogNodesResult(datacenter=None, id=None, node_ids=None, node_names=None, nodes=None, query_options=None)
class pulumi_consul.AwaitableGetCatalogServiceResult(datacenter=None, id=None, name=None, query_options=None, services=None, tag=None)
class pulumi_consul.AwaitableGetCatalogServicesResult(datacenter=None, id=None, names=None, query_options=None, services=None)
class pulumi_consul.AwaitableGetKeyPrefixResult(datacenter=None, id=None, namespace=None, path_prefix=None, subkey_collection=None, subkeys=None, token=None, var=None)
class pulumi_consul.AwaitableGetKeysResult(datacenter=None, id=None, keys=None, namespace=None, token=None, var=None)
class pulumi_consul.AwaitableGetNetworkAreaMembersResult(datacenter=None, id=None, members=None, token=None, uuid=None)
class pulumi_consul.AwaitableGetNetworkSegmentsResult(datacenter=None, id=None, segments=None, token=None)
class pulumi_consul.AwaitableGetNodesResult(datacenter=None, id=None, node_ids=None, node_names=None, nodes=None, query_options=None)
class pulumi_consul.AwaitableGetServiceHealthResult(datacenter=None, id=None, name=None, near=None, node_meta=None, passing=None, results=None, tag=None, wait_for=None)
class pulumi_consul.AwaitableGetServiceResult(datacenter=None, id=None, name=None, query_options=None, services=None, tag=None)
class pulumi_consul.AwaitableGetServicesResult(datacenter=None, id=None, names=None, query_options=None, services=None)
class pulumi_consul.CatalogEntry(resource_name, opts=None, address=None, datacenter=None, node=None, services=None, token=None, __props__=None, __name__=None, __opts__=None)

!> The .CatalogEntry resource has been deprecated in version 2.0.0 of the provider and will be removed in a future release. Please read the upgrade guide for more information.

Registers a node or service with the Consul Catalog. Currently, defining health checks is not supported.

import pulumi
import pulumi_consul as consul

app = consul.CatalogEntry("app",
    address="192.168.10.10",
    node="foobar",
    services=[{
        "address": "127.0.0.1",
        "id": "redis1",
        "name": "redis",
        "port": 8000,
        "tags": [
            "master",
            "v1",
        ],
    }])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The address of the node being added to, or referenced in the catalog.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • node (pulumi.Input[str]) – The name of the node being added to, or referenced in the catalog.

  • services (pulumi.Input[list]) – A service to optionally associated with the node. Supported values are documented below.

  • token (pulumi.Input[str]) – ACL token.

The services object supports the following:

  • address (pulumi.Input[str]) - The address of the service. Defaults to the node address.

  • id (pulumi.Input[str]) - The ID of the service. Defaults to the name.

  • name (pulumi.Input[str]) - The name of the service

  • port (pulumi.Input[float]) - The port of the service.

  • tags (pulumi.Input[list]) - A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

address: pulumi.Output[str] = None

The address of the node being added to, or referenced in the catalog.

datacenter: pulumi.Output[str] = None

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

node: pulumi.Output[str] = None

The name of the node being added to, or referenced in the catalog.

services: pulumi.Output[list] = None

A service to optionally associated with the node. Supported values are documented below.

  • address (str) - The address of the service. Defaults to the node address.

  • id (str) - The ID of the service. Defaults to the name.

  • name (str) - The name of the service

  • port (float) - The port of the service.

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

token: pulumi.Output[str] = None

ACL token.

static get(resource_name, id, opts=None, address=None, datacenter=None, node=None, services=None, token=None)

Get an existing CatalogEntry resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The address of the node being added to, or referenced in the catalog.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • node (pulumi.Input[str]) – The name of the node being added to, or referenced in the catalog.

  • services (pulumi.Input[list]) – A service to optionally associated with the node. Supported values are documented below.

  • token (pulumi.Input[str]) – ACL token.

The services object supports the following:

  • address (pulumi.Input[str]) - The address of the service. Defaults to the node address.

  • id (pulumi.Input[str]) - The ID of the service. Defaults to the name.

  • name (pulumi.Input[str]) - The name of the service

  • port (pulumi.Input[float]) - The port of the service.

  • tags (pulumi.Input[list]) - A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.ConfigEntry(resource_name, opts=None, config_json=None, kind=None, name=None, __props__=None, __name__=None, __opts__=None)

The Configuration Entry resource can be used to provide cluster-wide defaults for various aspects of Consul.

import pulumi
import json
import pulumi_consul as consul

proxy_defaults = consul.ConfigEntry("proxyDefaults",
    kind="proxy-defaults",
    config_json=json.dumps({
        "Config": {
            "local_connect_timeout_ms": 1000,
            "handshake_timeout_ms": 10000,
        },
    }))
web = consul.ConfigEntry("web",
    kind="service-defaults",
    config_json=json.dumps({
        "Protocol": "http",
    }))
admin = consul.ConfigEntry("admin",
    kind="service-defaults",
    config_json=json.dumps({
        "Protocol": "http",
    }))
service_resolver = consul.ConfigEntry("serviceResolver",
    kind="service-resolver",
    config_json=json.dumps({
        "DefaultSubset": "v1",
        "Subsets": {
            "v1": {
                "Filter": "Service.Meta.version == v1",
            },
            "v2": {
                "Filter": "Service.Meta.version == v2",
            },
        },
    }))
service_splitter = consul.ConfigEntry("serviceSplitter",
    kind="service-splitter",
    config_json=json.dumps({
        "Splits": [
            {
                "Weight": 90,
                "ServiceSubset": "v1",
            },
            {
                "Weight": 10,
                "ServiceSubset": "v2",
            },
        ],
    }))
service_router = consul.ConfigEntry("serviceRouter",
    kind="service-router",
    config_json=json.dumps({
        "Routes": [{
            "Match": {
                "HTTP": {
                    "PathPrefix": "/admin",
                },
            },
            "Destination": {
                "Service": "admin",
            },
        }],
    }))
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • config_json (pulumi.Input[str]) – An arbitrary map of configuration values.

  • kind (pulumi.Input[str]) – The kind of configuration entry to register.

  • name (pulumi.Input[str]) – The name of the configuration entry being registred.

config_json: pulumi.Output[str] = None

An arbitrary map of configuration values.

kind: pulumi.Output[str] = None

The kind of configuration entry to register.

name: pulumi.Output[str] = None

The name of the configuration entry being registred.

static get(resource_name, id, opts=None, config_json=None, kind=None, name=None)

Get an existing ConfigEntry resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • config_json (pulumi.Input[str]) – An arbitrary map of configuration values.

  • kind (pulumi.Input[str]) – The kind of configuration entry to register.

  • name (pulumi.Input[str]) – The name of the configuration entry being registred.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.GetAclAuthMethodResult(config=None, description=None, id=None, name=None, namespace=None, type=None)

A collection of values returned by getAclAuthMethod.

config = None

The configuration options of the ACL Auth Method.

description = None

The description of the ACL Auth Method.

id = None

The provider-assigned unique ID for this managed resource.

type = None

The type of the ACL Auth Method.

class pulumi_consul.GetAclPolicyResult(datacenters=None, description=None, id=None, name=None, namespace=None, rules=None)

A collection of values returned by getAclPolicy.

datacenters = None

The datacenters associated with the ACL Policy.

description = None

The description of the ACL Policy.

id = None

The provider-assigned unique ID for this managed resource.

rules = None

The rules associated with the ACL Policy.

class pulumi_consul.GetAclRoleResult(description=None, id=None, name=None, namespace=None, policies=None, service_identities=None)

A collection of values returned by getAclRole.

description = None

The description of the ACL Role.

id = None

The provider-assigned unique ID for this managed resource.

policies = None

The list of policies associated with the ACL Role. Each entry has an id and a name attribute.

service_identities = None

The list of service identities associated with the ACL Role. Each entry has a service_name attribute and a list of datacenters.

class pulumi_consul.GetAclTokenResult(accessor_id=None, description=None, id=None, local=None, namespace=None, policies=None)

A collection of values returned by getAclToken.

description = None

The description of the ACL token.

id = None

The provider-assigned unique ID for this managed resource.

local = None

Whether the ACL token is local to the datacenter it was created within.

policies = None

A list of policies associated with the ACL token. Each entry has an id and a name attribute.

class pulumi_consul.GetAclTokenSecretIdResult(accessor_id=None, encrypted_secret_id=None, id=None, pgp_key=None, secret_id=None)

A collection of values returned by getAclTokenSecretId.

id = None

The provider-assigned unique ID for this managed resource.

secret_id = None

The secret ID of the ACL token if pgp_key has not been set.

class pulumi_consul.GetAgentConfigResult(datacenter=None, id=None, node_id=None, node_name=None, revision=None, server=None, version=None)

A collection of values returned by getAgentConfig.

datacenter = None

The datacenter the agent is running in

id = None

The provider-assigned unique ID for this managed resource.

node_id = None

The ID of the node the agent is running on

node_name = None

The name of the node the agent is running on

revision = None

The first 9 characters of the VCS revision of the build of Consul that is running

server = None

Boolean if the agent is a server or not

version = None

The version of the build of Consul that is running

class pulumi_consul.GetAgentSelfResult(acl_datacenter=None, acl_default_policy=None, acl_disabled_ttl=None, acl_down_policy=None, acl_enforce08_semantics=None, acl_ttl=None, addresses=None, advertise_addr=None, advertise_addr_wan=None, advertise_addrs=None, atlas_join=None, bind_addr=None, bootstrap_expect=None, bootstrap_mode=None, check_deregister_interval_min=None, check_reap_interval=None, check_update_interval=None, client_addr=None, data_dir=None, datacenter=None, dev_mode=None, dns=None, dns_recursors=None, domain=None, enable_anonymous_signature=None, enable_coordinates=None, enable_debug=None, enable_remote_exec=None, enable_syslog=None, enable_ui=None, enable_update_check=None, id=None, leave_on_int=None, leave_on_term=None, log_level=None, name=None, performance=None, pid_file=None, ports=None, protocol_version=None, reconnect_timeout_lan=None, reconnect_timeout_wan=None, rejoin_after_leave=None, retry_join_ec2=None, retry_join_gce=None, retry_join_wans=None, retry_joins=None, retry_max_attempts=None, retry_max_attempts_wan=None, serf_lan_bind_addr=None, serf_wan_bind_addr=None, server_mode=None, server_name=None, session_ttl_min=None, start_join_wans=None, start_joins=None, syslog_facility=None, tagged_addresses=None, telemetry=None, tls_ca_file=None, tls_cert_file=None, tls_key_file=None, tls_min_version=None, tls_verify_incoming=None, tls_verify_outgoing=None, tls_verify_server_hostname=None, translate_wan_addrs=None, ui_dir=None, unix_sockets=None, version=None, version_prerelease=None, version_revision=None)

A collection of values returned by getAgentSelf.

dns = None

A map of DNS configuration attributes. See below for details on the contents of the dns attribute.

version = None

The version of the Consul agent.

  • version_prerelease

  • version_revision

class pulumi_consul.GetAutopilotHealthResult(datacenter=None, failure_tolerance=None, healthy=None, id=None, servers=None)

A collection of values returned by getAutopilotHealth.

failure_tolerance = None

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

healthy = None

Whether the server is healthy according to the current Autopilot configuration

id = None

The provider-assigned unique ID for this managed resource.

servers = None

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

class pulumi_consul.GetCatalogNodesResult(datacenter=None, id=None, node_ids=None, node_names=None, nodes=None, query_options=None)

A collection of values returned by getCatalogNodes.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_consul.GetCatalogServiceResult(datacenter=None, id=None, name=None, query_options=None, services=None, tag=None)

A collection of values returned by getCatalogService.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_consul.GetCatalogServicesResult(datacenter=None, id=None, names=None, query_options=None, services=None)

A collection of values returned by getCatalogServices.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_consul.GetKeyPrefixResult(datacenter=None, id=None, namespace=None, path_prefix=None, subkey_collection=None, subkeys=None, token=None, var=None)

A collection of values returned by getKeyPrefix.

datacenter = None

The datacenter the keys are being read from.

id = None

The provider-assigned unique ID for this managed resource.

path_prefix = None

the common prefix shared by all keys being read.

  • var.<name> - For each name given, the corresponding attribute has the value of the key.

subkeys = None

A map of the subkeys and values is set if no subkey block is provided.

class pulumi_consul.GetKeysResult(datacenter=None, id=None, keys=None, namespace=None, token=None, var=None)

A collection of values returned by getKeys.

datacenter = None

The datacenter the keys are being read from.

  • var.<name> - For each name given, the corresponding attribute has the value of the key.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_consul.GetNetworkAreaMembersResult(datacenter=None, id=None, members=None, token=None, uuid=None)

A collection of values returned by getNetworkAreaMembers.

datacenter = None

The node’s Consul datacenter.

id = None

The provider-assigned unique ID for this managed resource.

members = None

The list of Consul servers in this network area

uuid = None

The UUID of the Network Area being queried.

class pulumi_consul.GetNetworkSegmentsResult(datacenter=None, id=None, segments=None, token=None)

A collection of values returned by getNetworkSegments.

datacenter = None

The datacenter the segments are being read from.

id = None

The provider-assigned unique ID for this managed resource.

segments = None

The list of network segments.

class pulumi_consul.GetNodesResult(datacenter=None, id=None, node_ids=None, node_names=None, nodes=None, query_options=None)

A collection of values returned by getNodes.

datacenter = None

The datacenter the keys are being read from to.

id = None

The provider-assigned unique ID for this managed resource.

node_ids = None

A list of the Consul node IDs.

node_names = None

A list of the Consul node names.

nodes = None

A list of nodes and details about each Consul agent. The list of per-node attributes is detailed below.

class pulumi_consul.GetServiceHealthResult(datacenter=None, id=None, name=None, near=None, node_meta=None, passing=None, results=None, tag=None, wait_for=None)

A collection of values returned by getServiceHealth.

datacenter = None

The datacenter in which the node is running.

id = None

The provider-assigned unique ID for this managed resource.

name = None

The name of this health-check.

near = None

The node to which the result must be sorted to.

node_meta = None

The list of metadata to filter the nodes.

passing = None

Whether to return only nodes with all checks in the passing state.

results = None

A list of entries and details about each endpoint advertising a service. Each element in the list has three attributes: node, service and checks. The list of the attributes of each one is detailed below.

tag = None

The name of the tag used to filter the list.

class pulumi_consul.GetServiceResult(datacenter=None, id=None, name=None, query_options=None, services=None, tag=None)

A collection of values returned by getService.

datacenter = None

The datacenter the keys are being read from to.

id = None

The provider-assigned unique ID for this managed resource.

name = None

The name of the service

services = None

A list of nodes and details about each endpoint advertising a service. Each element in the list is a map of attributes that correspond to each individual node. The list of per-node attributes is detailed below.

tag = None

The name of the tag used to filter the list of nodes in service.

class pulumi_consul.GetServicesResult(datacenter=None, id=None, names=None, query_options=None, services=None)

A collection of values returned by getServices.

datacenter = None

The datacenter the keys are being read from to.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_consul.Intention(resource_name, opts=None, action=None, description=None, destination_name=None, destination_namespace=None, meta=None, source_name=None, source_namespace=None, __props__=None, __name__=None, __opts__=None)

Intentions are used to define rules for which services may connect to one another when using Consul Connect.

It is appropriate to either reference existing services or specify non-existent services that will be created in the future when creating intentions. This resource can be used in conjunction with the .Service datasource when referencing services registered on nodes that have a running Consul agent.

import pulumi
import pulumi_consul as consul

database = consul.Intention("database",
    action="allow",
    destination_name="db",
    source_name="api")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • action (pulumi.Input[str]) – The intention action. Must be one of allow or deny.

  • description (pulumi.Input[str]) – Optional description that can be used by Consul tooling, but is not used internally.

  • destination_name (pulumi.Input[str]) – The name of the destination service for the intention. This service does not have to exist.

  • destination_namespace (pulumi.Input[str]) – The destination namespace of the intention.

  • meta (pulumi.Input[dict]) – Key/value pairs that are opaque to Consul and are associated with the intention.

  • source_name (pulumi.Input[str]) – The name of the source service for the intention. This service does not have to exist.

  • source_namespace (pulumi.Input[str]) – The source namespace of the intention.

action: pulumi.Output[str] = None

The intention action. Must be one of allow or deny.

description: pulumi.Output[str] = None

Optional description that can be used by Consul tooling, but is not used internally.

destination_name: pulumi.Output[str] = None

The name of the destination service for the intention. This service does not have to exist.

destination_namespace: pulumi.Output[str] = None

The destination namespace of the intention.

meta: pulumi.Output[dict] = None

Key/value pairs that are opaque to Consul and are associated with the intention.

source_name: pulumi.Output[str] = None

The name of the source service for the intention. This service does not have to exist.

source_namespace: pulumi.Output[str] = None

The source namespace of the intention.

static get(resource_name, id, opts=None, action=None, description=None, destination_name=None, destination_namespace=None, meta=None, source_name=None, source_namespace=None)

Get an existing Intention resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • action (pulumi.Input[str]) – The intention action. Must be one of allow or deny.

  • description (pulumi.Input[str]) – Optional description that can be used by Consul tooling, but is not used internally.

  • destination_name (pulumi.Input[str]) – The name of the destination service for the intention. This service does not have to exist.

  • destination_namespace (pulumi.Input[str]) – The destination namespace of the intention.

  • meta (pulumi.Input[dict]) – Key/value pairs that are opaque to Consul and are associated with the intention.

  • source_name (pulumi.Input[str]) – The name of the source service for the intention. This service does not have to exist.

  • source_namespace (pulumi.Input[str]) – The source namespace of the intention.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.KeyPrefix(resource_name, opts=None, datacenter=None, namespace=None, path_prefix=None, subkey_collection=None, subkeys=None, token=None, __props__=None, __name__=None, __opts__=None)

Create a KeyPrefix resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] datacenter: The datacenter to use. This overrides the

agent’s default datacenter and the datacenter in the provider setup.

Parameters
  • namespace (pulumi.Input[str]) – The namespace to create the keys within.

  • path_prefix (pulumi.Input[str]) – Specifies the common prefix shared by all keys that will be managed by this resource instance. In most cases this will end with a slash, to manage a “folder” of keys.

  • subkey_collection (pulumi.Input[list]) – A subkey to add. Supported values documented below. Multiple blocks supported.

  • subkeys (pulumi.Input[dict]) – A mapping from subkey name (which will be appended to the given path_prefix) to the value that should be stored at that key. Use slashes, as shown in the above example, to create “sub-folders” under the given path prefix.

  • token (pulumi.Input[str]) – The ACL token to use. This overrides the token that the agent provides by default.

The subkey_collection object supports the following:

  • flags (pulumi.Input[float]) - An unsigned integer value to attach to the key (defaults to 0).

  • path (pulumi.Input[str]) - This is the path (which will be appended to the given path_prefix) in Consul that should be written to.

  • value (pulumi.Input[str]) - The value to write to the given path.

datacenter: pulumi.Output[str] = None

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

namespace: pulumi.Output[str] = None

The namespace to create the keys within.

path_prefix: pulumi.Output[str] = None

Specifies the common prefix shared by all keys that will be managed by this resource instance. In most cases this will end with a slash, to manage a “folder” of keys.

subkey_collection: pulumi.Output[list] = None

A subkey to add. Supported values documented below. Multiple blocks supported.

  • flags (float) - An unsigned integer value to attach to the key (defaults to 0).

  • path (str) - This is the path (which will be appended to the given path_prefix) in Consul that should be written to.

  • value (str) - The value to write to the given path.

subkeys: pulumi.Output[dict] = None

A mapping from subkey name (which will be appended to the given path_prefix) to the value that should be stored at that key. Use slashes, as shown in the above example, to create “sub-folders” under the given path prefix.

token: pulumi.Output[str] = None

The ACL token to use. This overrides the token that the agent provides by default.

static get(resource_name, id, opts=None, datacenter=None, namespace=None, path_prefix=None, subkey_collection=None, subkeys=None, token=None)

Get an existing KeyPrefix resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • namespace (pulumi.Input[str]) – The namespace to create the keys within.

  • path_prefix (pulumi.Input[str]) – Specifies the common prefix shared by all keys that will be managed by this resource instance. In most cases this will end with a slash, to manage a “folder” of keys.

  • subkey_collection (pulumi.Input[list]) – A subkey to add. Supported values documented below. Multiple blocks supported.

  • subkeys (pulumi.Input[dict]) – A mapping from subkey name (which will be appended to the given path_prefix) to the value that should be stored at that key. Use slashes, as shown in the above example, to create “sub-folders” under the given path prefix.

  • token (pulumi.Input[str]) – The ACL token to use. This overrides the token that the agent provides by default.

The subkey_collection object supports the following:

  • flags (pulumi.Input[float]) - An unsigned integer value to attach to the key (defaults to 0).

  • path (pulumi.Input[str]) - This is the path (which will be appended to the given path_prefix) in Consul that should be written to.

  • value (pulumi.Input[str]) - The value to write to the given path.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.Keys(resource_name, opts=None, datacenter=None, keys=None, namespace=None, token=None, __props__=None, __name__=None, __opts__=None)

Create a Keys resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] datacenter: The datacenter to use. This overrides the

agent’s default datacenter and the datacenter in the provider setup.

Parameters
  • keys (pulumi.Input[list]) – Specifies a key in Consul to be written. Supported values documented below.

  • namespace (pulumi.Input[str]) – The namespace to create the keys within.

  • token (pulumi.Input[str]) – The ACL token to use. This overrides the token that the agent provides by default.

The keys object supports the following:

  • default (pulumi.Input[str])

  • delete (pulumi.Input[bool]) - If true, then the key will be deleted when either its configuration block is removed from the configuration or the entire resource is destroyed. Otherwise, it will be left in Consul. Defaults to false.

  • flags (pulumi.Input[float]) - An unsigned integer value to attach to the key (defaults to 0).

  • name (pulumi.Input[str])

  • path (pulumi.Input[str]) - This is the path in Consul that should be written to.

  • value (pulumi.Input[str]) - The value to write to the given path.

datacenter: pulumi.Output[str] = None

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

keys: pulumi.Output[list] = None

Specifies a key in Consul to be written. Supported values documented below.

  • default (str)

  • delete (bool) - If true, then the key will be deleted when either its configuration block is removed from the configuration or the entire resource is destroyed. Otherwise, it will be left in Consul. Defaults to false.

  • flags (float) - An unsigned integer value to attach to the key (defaults to 0).

  • name (str)

  • path (str) - This is the path in Consul that should be written to.

  • value (str) - The value to write to the given path.

namespace: pulumi.Output[str] = None

The namespace to create the keys within.

token: pulumi.Output[str] = None

The ACL token to use. This overrides the token that the agent provides by default.

static get(resource_name, id, opts=None, datacenter=None, keys=None, namespace=None, token=None, var=None)

Get an existing Keys resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • keys (pulumi.Input[list]) – Specifies a key in Consul to be written. Supported values documented below.

  • namespace (pulumi.Input[str]) – The namespace to create the keys within.

  • token (pulumi.Input[str]) – The ACL token to use. This overrides the token that the agent provides by default.

The keys object supports the following:

  • default (pulumi.Input[str])

  • delete (pulumi.Input[bool]) - If true, then the key will be deleted when either its configuration block is removed from the configuration or the entire resource is destroyed. Otherwise, it will be left in Consul. Defaults to false.

  • flags (pulumi.Input[float]) - An unsigned integer value to attach to the key (defaults to 0).

  • name (pulumi.Input[str])

  • path (pulumi.Input[str]) - This is the path in Consul that should be written to.

  • value (pulumi.Input[str]) - The value to write to the given path.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.License(resource_name, opts=None, datacenter=None, license=None, __props__=None, __name__=None, __opts__=None)

NOTE: This feature requires Consul Enterprise.

The .License resource provides datacenter-level management of the Consul Enterprise license. If ACLs are enabled then a token with operator privileges may be required in order to use this command.

import pulumi
import pulumi_consul as consul

license = consul.License("license", license=(lambda path: open(path).read())("license.hclic"))
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • license (pulumi.Input[str]) – The Consul license to use.

customer_id: pulumi.Output[str] = None

The ID of the customer the license is attached to.

datacenter: pulumi.Output[str] = None

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

expiration_time: pulumi.Output[str] = None

The expiration time of the license.

features: pulumi.Output[list] = None

The features for which the license is valid.

flags: pulumi.Output[dict] = None

The metadata attached to the license.

installation_id: pulumi.Output[str] = None

The ID of the current installation.

issue_time: pulumi.Output[str] = None

The date the license was issued.

license: pulumi.Output[str] = None

The Consul license to use.

license_id: pulumi.Output[str] = None

The ID of the license used.

product: pulumi.Output[str] = None

The product for which the license is valid.

start_time: pulumi.Output[str] = None

The start time of the license.

valid: pulumi.Output[bool] = None

Whether the license is valid.

warnings: pulumi.Output[list] = None

A list of warning messages regarding the license validity.

static get(resource_name, id, opts=None, customer_id=None, datacenter=None, expiration_time=None, features=None, flags=None, installation_id=None, issue_time=None, license=None, license_id=None, product=None, start_time=None, valid=None, warnings=None)

Get an existing License resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • customer_id (pulumi.Input[str]) – The ID of the customer the license is attached to.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • expiration_time (pulumi.Input[str]) – The expiration time of the license.

  • features (pulumi.Input[list]) – The features for which the license is valid.

  • flags (pulumi.Input[dict]) – The metadata attached to the license.

  • installation_id (pulumi.Input[str]) – The ID of the current installation.

  • issue_time (pulumi.Input[str]) – The date the license was issued.

  • license (pulumi.Input[str]) – The Consul license to use.

  • license_id (pulumi.Input[str]) – The ID of the license used.

  • product (pulumi.Input[str]) – The product for which the license is valid.

  • start_time (pulumi.Input[str]) – The start time of the license.

  • valid (pulumi.Input[bool]) – Whether the license is valid.

  • warnings (pulumi.Input[list]) – A list of warning messages regarding the license validity.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.Namespace(resource_name, opts=None, description=None, meta=None, name=None, policy_defaults=None, role_defaults=None, __props__=None, __name__=None, __opts__=None)

NOTE: This feature requires Consul Enterprise.

The .Namespace resource provides isolated Consul Enterprise Namespaces.

import pulumi
import pulumi_consul as consul

production = consul.Namespace("production",
    description="Production namespace",
    meta={
        "foo": "bar",
    })
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – Free form namespace description.

  • meta (pulumi.Input[dict]) – Specifies arbitrary KV metadata to associate with the namespace.

  • name (pulumi.Input[str]) – The namespace name.

  • policy_defaults (pulumi.Input[list]) – The list of default policies that should be applied to all tokens created in this namespace.

  • role_defaults (pulumi.Input[list]) – The list of default roles that should be applied to all tokens created in this namespace.

description: pulumi.Output[str] = None

Free form namespace description.

meta: pulumi.Output[dict] = None

Specifies arbitrary KV metadata to associate with the namespace.

name: pulumi.Output[str] = None

The namespace name.

policy_defaults: pulumi.Output[list] = None

The list of default policies that should be applied to all tokens created in this namespace.

role_defaults: pulumi.Output[list] = None

The list of default roles that should be applied to all tokens created in this namespace.

static get(resource_name, id, opts=None, description=None, meta=None, name=None, policy_defaults=None, role_defaults=None)

Get an existing Namespace resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – Free form namespace description.

  • meta (pulumi.Input[dict]) – Specifies arbitrary KV metadata to associate with the namespace.

  • name (pulumi.Input[str]) – The namespace name.

  • policy_defaults (pulumi.Input[list]) – The list of default policies that should be applied to all tokens created in this namespace.

  • role_defaults (pulumi.Input[list]) – The list of default roles that should be applied to all tokens created in this namespace.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.NetworkArea(resource_name, opts=None, datacenter=None, peer_datacenter=None, retry_joins=None, token=None, use_tls=None, __props__=None, __name__=None, __opts__=None)

NOTE: This feature requires Consul Enterprise.

The .NetworkArea resource manages a relationship between servers in two different Consul datacenters.

Unlike Consul’s WAN feature, network areas use just the server RPC port for communication, and relationships can be made between independent pairs of datacenters, so not all servers need to be fully connected. This allows for complex topologies among Consul datacenters like hub/spoke and more general trees.

import pulumi
import pulumi_consul as consul

dc2 = consul.NetworkArea("dc2",
    peer_datacenter="dc2",
    retry_joins=["1.2.3.4"],
    use_tls=True)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • peer_datacenter (pulumi.Input[str]) – The name of the Consul datacenter that will be joined to form the area.

  • retry_joins (pulumi.Input[list]) – Specifies a list of Consul servers to attempt to join. Servers can be given as IP, IP:port, hostname, or hostname:port.

  • token (pulumi.Input[str]) – The ACL token to use. This overrides the token that the agent provides by default.

  • use_tls (pulumi.Input[bool]) – Specifies whether gossip over this area should be encrypted with TLS if possible. Defaults to false.

datacenter: pulumi.Output[str] = None

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

peer_datacenter: pulumi.Output[str] = None

The name of the Consul datacenter that will be joined to form the area.

retry_joins: pulumi.Output[list] = None

Specifies a list of Consul servers to attempt to join. Servers can be given as IP, IP:port, hostname, or hostname:port.

token: pulumi.Output[str] = None

The ACL token to use. This overrides the token that the agent provides by default.

use_tls: pulumi.Output[bool] = None

Specifies whether gossip over this area should be encrypted with TLS if possible. Defaults to false.

static get(resource_name, id, opts=None, datacenter=None, peer_datacenter=None, retry_joins=None, token=None, use_tls=None)

Get an existing NetworkArea resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • peer_datacenter (pulumi.Input[str]) – The name of the Consul datacenter that will be joined to form the area.

  • retry_joins (pulumi.Input[list]) – Specifies a list of Consul servers to attempt to join. Servers can be given as IP, IP:port, hostname, or hostname:port.

  • token (pulumi.Input[str]) – The ACL token to use. This overrides the token that the agent provides by default.

  • use_tls (pulumi.Input[bool]) – Specifies whether gossip over this area should be encrypted with TLS if possible. Defaults to false.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.Node(resource_name, opts=None, address=None, datacenter=None, meta=None, name=None, token=None, __props__=None, __name__=None, __opts__=None)

Provides access to Node data in Consul. This can be used to define a node. Currently, defining health checks is not supported.

import pulumi
import pulumi_consul as consul

foobar = consul.Node("foobar", address="192.168.10.10")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The address of the node being added to, or referenced in the catalog.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • meta (pulumi.Input[dict]) – Key/value pairs that are associated with the node.

  • name (pulumi.Input[str]) – The name of the node being added to, or referenced in the catalog.

address: pulumi.Output[str] = None

The address of the node being added to, or referenced in the catalog.

datacenter: pulumi.Output[str] = None

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

meta: pulumi.Output[dict] = None

Key/value pairs that are associated with the node.

name: pulumi.Output[str] = None

The name of the node being added to, or referenced in the catalog.

static get(resource_name, id, opts=None, address=None, datacenter=None, meta=None, name=None, token=None)

Get an existing Node resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The address of the node being added to, or referenced in the catalog.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • meta (pulumi.Input[dict]) – Key/value pairs that are associated with the node.

  • name (pulumi.Input[str]) – The name of the node being added to, or referenced in the catalog.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.PreparedQuery(resource_name, opts=None, connect=None, datacenter=None, dns=None, failover=None, ignore_check_ids=None, name=None, near=None, node_meta=None, only_passing=None, service=None, service_meta=None, session=None, stored_token=None, tags=None, template=None, token=None, __props__=None, __name__=None, __opts__=None)

Create a PreparedQuery resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] connect: When true the prepared query will return connect

proxy services for a queried service. Conditions such as tags in the prepared query will be matched against the proxy service. Defaults to false.

Parameters
  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • dns (pulumi.Input[dict]) – Settings for controlling the DNS response details.

  • failover (pulumi.Input[dict]) – Options for controlling behavior when no healthy nodes are available in the local DC.

  • ignore_check_ids (pulumi.Input[list]) – Specifies a list of check IDs that should be ignored when filtering unhealthy instances. This is mostly useful in an emergency or as a temporary measure when a health check is found to be unreliable. Being able to ignore it in centrally-defined queries can be simpler than de-registering the check as an interim solution until the check can be fixed.

  • name (pulumi.Input[str]) – The name of the prepared query. Used to identify the prepared query during requests. Can be specified as an empty string to configure the query as a catch-all.

  • near (pulumi.Input[str]) – Allows specifying the name of a node to sort results near using Consul’s distance sorting and network coordinates. The magic _agent value can be used to always sort nearest the node servicing the request.

  • node_meta (pulumi.Input[dict]) – Specifies a list of user-defined key/value pairs that will be used for filtering the query results to nodes with the given metadata values present.

  • only_passing (pulumi.Input[bool]) – When true, the prepared query will only return nodes with passing health checks in the result.

  • service (pulumi.Input[str]) – The name of the service to query.

  • service_meta (pulumi.Input[dict]) – Specifies a list of user-defined key/value pairs that will be used for filtering the query results to services with the given metadata values present.

  • session (pulumi.Input[str]) – The name of the Consul session to tie this query’s lifetime to. This is an advanced parameter that should not be used without a complete understanding of Consul sessions and the implications of their use (it is recommended to leave this blank in nearly all cases). If this parameter is omitted the query will not expire.

  • stored_token (pulumi.Input[str]) – The ACL token to store with the prepared query. This token will be used by default whenever the query is executed.

  • tags (pulumi.Input[list]) – The list of required and/or disallowed tags. If a tag is in this list it must be present. If the tag is preceded with a “!” then it is disallowed.

  • template (pulumi.Input[dict]) – Query templating options. This is used to make a single prepared query respond to many different requests.

  • token (pulumi.Input[str]) – The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.

The dns object supports the following:

  • ttl (pulumi.Input[str]) - The TTL to send when returning DNS results.

The failover object supports the following:

  • datacenters (pulumi.Input[list]) - Remote datacenters to return results from.

  • nearestN (pulumi.Input[float]) - Return results from this many datacenters, sorted in ascending order of estimated RTT.

The template object supports the following:

  • regexp (pulumi.Input[str]) - The regular expression to match with. When using name_prefix_match, this regex is applied against the query name.

  • type (pulumi.Input[str]) - The type of template matching to perform. Currently only name_prefix_match is supported.

connect: pulumi.Output[bool] = None

When true the prepared query will return connect proxy services for a queried service. Conditions such as tags in the prepared query will be matched against the proxy service. Defaults to false.

datacenter: pulumi.Output[str] = None

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

dns: pulumi.Output[dict] = None

Settings for controlling the DNS response details.

  • ttl (str) - The TTL to send when returning DNS results.

failover: pulumi.Output[dict] = None

Options for controlling behavior when no healthy nodes are available in the local DC.

  • datacenters (list) - Remote datacenters to return results from.

  • nearestN (float) - Return results from this many datacenters, sorted in ascending order of estimated RTT.

ignore_check_ids: pulumi.Output[list] = None

Specifies a list of check IDs that should be ignored when filtering unhealthy instances. This is mostly useful in an emergency or as a temporary measure when a health check is found to be unreliable. Being able to ignore it in centrally-defined queries can be simpler than de-registering the check as an interim solution until the check can be fixed.

name: pulumi.Output[str] = None

The name of the prepared query. Used to identify the prepared query during requests. Can be specified as an empty string to configure the query as a catch-all.

near: pulumi.Output[str] = None

Allows specifying the name of a node to sort results near using Consul’s distance sorting and network coordinates. The magic _agent value can be used to always sort nearest the node servicing the request.

node_meta: pulumi.Output[dict] = None

Specifies a list of user-defined key/value pairs that will be used for filtering the query results to nodes with the given metadata values present.

only_passing: pulumi.Output[bool] = None

When true, the prepared query will only return nodes with passing health checks in the result.

service: pulumi.Output[str] = None

The name of the service to query.

service_meta: pulumi.Output[dict] = None

Specifies a list of user-defined key/value pairs that will be used for filtering the query results to services with the given metadata values present.

session: pulumi.Output[str] = None

The name of the Consul session to tie this query’s lifetime to. This is an advanced parameter that should not be used without a complete understanding of Consul sessions and the implications of their use (it is recommended to leave this blank in nearly all cases). If this parameter is omitted the query will not expire.

stored_token: pulumi.Output[str] = None

The ACL token to store with the prepared query. This token will be used by default whenever the query is executed.

tags: pulumi.Output[list] = None

The list of required and/or disallowed tags. If a tag is in this list it must be present. If the tag is preceded with a “!” then it is disallowed.

template: pulumi.Output[dict] = None

Query templating options. This is used to make a single prepared query respond to many different requests.

  • regexp (str) - The regular expression to match with. When using name_prefix_match, this regex is applied against the query name.

  • type (str) - The type of template matching to perform. Currently only name_prefix_match is supported.

token: pulumi.Output[str] = None

The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.

static get(resource_name, id, opts=None, connect=None, datacenter=None, dns=None, failover=None, ignore_check_ids=None, name=None, near=None, node_meta=None, only_passing=None, service=None, service_meta=None, session=None, stored_token=None, tags=None, template=None, token=None)

Get an existing PreparedQuery resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • connect (pulumi.Input[bool]) – When true the prepared query will return connect proxy services for a queried service. Conditions such as tags in the prepared query will be matched against the proxy service. Defaults to false.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • dns (pulumi.Input[dict]) – Settings for controlling the DNS response details.

  • failover (pulumi.Input[dict]) – Options for controlling behavior when no healthy nodes are available in the local DC.

  • ignore_check_ids (pulumi.Input[list]) – Specifies a list of check IDs that should be ignored when filtering unhealthy instances. This is mostly useful in an emergency or as a temporary measure when a health check is found to be unreliable. Being able to ignore it in centrally-defined queries can be simpler than de-registering the check as an interim solution until the check can be fixed.

  • name (pulumi.Input[str]) – The name of the prepared query. Used to identify the prepared query during requests. Can be specified as an empty string to configure the query as a catch-all.

  • near (pulumi.Input[str]) – Allows specifying the name of a node to sort results near using Consul’s distance sorting and network coordinates. The magic _agent value can be used to always sort nearest the node servicing the request.

  • node_meta (pulumi.Input[dict]) – Specifies a list of user-defined key/value pairs that will be used for filtering the query results to nodes with the given metadata values present.

  • only_passing (pulumi.Input[bool]) – When true, the prepared query will only return nodes with passing health checks in the result.

  • service (pulumi.Input[str]) – The name of the service to query.

  • service_meta (pulumi.Input[dict]) – Specifies a list of user-defined key/value pairs that will be used for filtering the query results to services with the given metadata values present.

  • session (pulumi.Input[str]) – The name of the Consul session to tie this query’s lifetime to. This is an advanced parameter that should not be used without a complete understanding of Consul sessions and the implications of their use (it is recommended to leave this blank in nearly all cases). If this parameter is omitted the query will not expire.

  • stored_token (pulumi.Input[str]) – The ACL token to store with the prepared query. This token will be used by default whenever the query is executed.

  • tags (pulumi.Input[list]) – The list of required and/or disallowed tags. If a tag is in this list it must be present. If the tag is preceded with a “!” then it is disallowed.

  • template (pulumi.Input[dict]) – Query templating options. This is used to make a single prepared query respond to many different requests.

  • token (pulumi.Input[str]) – The ACL token to use when saving the prepared query. This overrides the token that the agent provides by default.

The dns object supports the following:

  • ttl (pulumi.Input[str]) - The TTL to send when returning DNS results.

The failover object supports the following:

  • datacenters (pulumi.Input[list]) - Remote datacenters to return results from.

  • nearestN (pulumi.Input[float]) - Return results from this many datacenters, sorted in ascending order of estimated RTT.

The template object supports the following:

  • regexp (pulumi.Input[str]) - The regular expression to match with. When using name_prefix_match, this regex is applied against the query name.

  • type (pulumi.Input[str]) - The type of template matching to perform. Currently only name_prefix_match is supported.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.Provider(resource_name, opts=None, address=None, ca_file=None, ca_path=None, cert_file=None, datacenter=None, http_auth=None, insecure_https=None, key_file=None, namespace=None, scheme=None, token=None, __props__=None, __name__=None, __opts__=None)

The provider type for the consul package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

Parameters
translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_consul.Service(resource_name, opts=None, address=None, checks=None, datacenter=None, external=None, meta=None, name=None, namespace=None, node=None, port=None, service_id=None, tags=None, __props__=None, __name__=None, __opts__=None)

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.

If the Consul agent is running on the node where this service is registered, it is not recommended to use this resource.

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"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The address of the service. Defaults to the address of the node.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • meta (pulumi.Input[dict]) – A map of arbitrary KV metadata linked to the service instance.

  • name (pulumi.Input[str]) – The name of the health-check.

  • namespace (pulumi.Input[str]) – The namespace to create the service within.

  • node (pulumi.Input[str]) – The name of the node the to register the service on.

  • port (pulumi.Input[float]) – The port of the service.

  • service_id (pulumi.Input[str]) –

    • If the service ID is not provided, it will be defaulted to the value

    of the name attribute.

  • tags (pulumi.Input[list]) – A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

The checks object supports the following:

  • checkId (pulumi.Input[str]) - An ID, unique per agent. Will default to name if not set.

  • deregisterCriticalServiceAfter (pulumi.Input[str]) - The time after which the service is automatically deregistered when in the critical state. Defaults to 30s.

  • headers (pulumi.Input[list]) - The headers to send for an HTTP check. The attributes of each header is given below.

    • name (pulumi.Input[str]) - The name of the header.

    • values (pulumi.Input[list]) - The header’s list of values.

  • http (pulumi.Input[str]) - The HTTP endpoint to call for an HTTP check.

  • interval (pulumi.Input[str]) - The interval to wait between each health-check invocation.

  • method (pulumi.Input[str]) - The method to use for HTTP health-checks. Defaults to GET.

  • name (pulumi.Input[str]) - The name of the health-check.

  • notes (pulumi.Input[str]) - An opaque field meant to hold human readable text.

  • status (pulumi.Input[str]) - The initial health-check status.

  • tcp (pulumi.Input[str]) - The TCP address and port to connect to for a TCP check.

  • timeout (pulumi.Input[str]) - The timeout value for HTTP checks.

  • tlsSkipVerify (pulumi.Input[bool]) - Whether to deactivate certificate verification for HTTP health-checks. Defaults to false.

address: pulumi.Output[str] = None

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

datacenter: pulumi.Output[str] = None

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

meta: pulumi.Output[dict] = None

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

name: pulumi.Output[str] = None

The name of the health-check.

namespace: pulumi.Output[str] = None

The namespace to create the service within.

node: pulumi.Output[str] = None

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

port: pulumi.Output[float] = None

The port of the service.

service_id: pulumi.Output[str] = None
  • If the service ID is not provided, it will be defaulted to the value of the name attribute.

tags: pulumi.Output[list] = None

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

static get(resource_name, id, opts=None, address=None, checks=None, datacenter=None, external=None, meta=None, name=None, namespace=None, node=None, port=None, service_id=None, tags=None)

Get an existing Service resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • address (pulumi.Input[str]) – The address of the service. Defaults to the address of the node.

  • datacenter (pulumi.Input[str]) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • meta (pulumi.Input[dict]) – A map of arbitrary KV metadata linked to the service instance.

  • name (pulumi.Input[str]) – The name of the health-check.

  • namespace (pulumi.Input[str]) – The namespace to create the service within.

  • node (pulumi.Input[str]) – The name of the node the to register the service on.

  • port (pulumi.Input[float]) – The port of the service.

  • service_id (pulumi.Input[str]) –

    • If the service ID is not provided, it will be defaulted to the value

    of the name attribute.

  • tags (pulumi.Input[list]) – A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.

The checks object supports the following:

  • checkId (pulumi.Input[str]) - An ID, unique per agent. Will default to name if not set.

  • deregisterCriticalServiceAfter (pulumi.Input[str]) - The time after which the service is automatically deregistered when in the critical state. Defaults to 30s.

  • headers (pulumi.Input[list]) - The headers to send for an HTTP check. The attributes of each header is given below.

    • name (pulumi.Input[str]) - The name of the header.

    • values (pulumi.Input[list]) - The header’s list of values.

  • http (pulumi.Input[str]) - The HTTP endpoint to call for an HTTP check.

  • interval (pulumi.Input[str]) - The interval to wait between each health-check invocation.

  • method (pulumi.Input[str]) - The method to use for HTTP health-checks. Defaults to GET.

  • name (pulumi.Input[str]) - The name of the health-check.

  • notes (pulumi.Input[str]) - An opaque field meant to hold human readable text.

  • status (pulumi.Input[str]) - The initial health-check status.

  • tcp (pulumi.Input[str]) - The TCP address and port to connect to for a TCP check.

  • timeout (pulumi.Input[str]) - The timeout value for HTTP checks.

  • tlsSkipVerify (pulumi.Input[bool]) - Whether to deactivate certificate verification for HTTP health-checks. Defaults to false.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_consul.get_acl_auth_method(config=None, description=None, name=None, namespace=None, type=None, opts=None)

The .AclAuthMethod data source returns the information related to a Consul Auth Method.

import pulumi
import pulumi_consul as consul

test = consul.get_acl_auth_method(name="minikube")
pulumi.export("consulAclAuthMethod", test.config)
Parameters
  • config (dict) – The configuration options of the ACL Auth Method.

  • description (str) – The description of the ACL Auth Method.

  • name (str) – The name of the ACL Auth Method.

  • namespace (str) – The namespace to lookup the auth method.

  • type (str) – The type of the ACL Auth Method.

pulumi_consul.get_acl_policy(datacenters=None, description=None, name=None, namespace=None, rules=None, opts=None)

The .AclPolicy data source returns the information related to a Consul ACL Policy.

import pulumi
import pulumi_consul as consul

agent = consul.get_acl_policy(name="agent")
pulumi.export("consulAclPolicy", agent.rules)
Parameters
  • datacenters (list) – The datacenters associated with the ACL Policy.

  • description (str) – The description of the ACL Policy.

  • name (str) – The name of the ACL Policy.

  • namespace (str) – The namespace to lookup the policy.

  • rules (str) – The rules associated with the ACL Policy.

pulumi_consul.get_acl_role(description=None, name=None, namespace=None, policies=None, service_identities=None, opts=None)

The .AclRole data source returns the information related to a Consul ACL Role.

import pulumi
import pulumi_consul as consul

test = consul.get_acl_role(name="example-role")
pulumi.export("consulAclRole", test.id)
Parameters
  • description (str) – The description of the ACL Role.

  • name (str) – The name of the ACL Role.

  • namespace (str) – The namespace to lookup the role.

  • policies (list) – The list of policies associated with the ACL Role. Each entry has an id and a name attribute.

  • service_identities (list) – The list of service identities associated with the ACL Role. Each entry has a service_name attribute and a list of datacenters.

The policies object supports the following:

  • id (str)

  • name (str) - The name of the ACL Role.

The service_identities object supports the following:

  • datacenters (list)

  • serviceName (str)

pulumi_consul.get_acl_token(accessor_id=None, description=None, local=None, namespace=None, policies=None, opts=None)

The .AclToken data source returns the information related to the .AclToken resource with the exception of its secret ID.

If you want to get the secret ID associated with a token, use the `.getAclTokenSecretId`` data source <https://www.terraform.io/docs/providers/consul/d/acl_token_secret_id.html>`_.

import pulumi
import pulumi_consul as consul

test = consul.get_acl_token(accessor_id="00000000-0000-0000-0000-000000000002")
pulumi.export("consulAclPolicies", test.policies)
Parameters
  • accessor_id (str) – The accessor ID of the ACL token.

  • description (str) – The description of the ACL token.

  • local (bool) – Whether the ACL token is local to the datacenter it was created within.

  • namespace (str) – The namespace to lookup the ACL token.

  • policies (list) – A list of policies associated with the ACL token. Each entry has an id and a name attribute.

The policies object supports the following:

  • id (str)

  • name (str)

pulumi_consul.get_acl_token_secret_id(accessor_id=None, pgp_key=None, opts=None)

Use this data source to access information about an existing resource.

Parameters

accessor_id (str) – The accessor ID of the ACL token.

pulumi_consul.get_agent_config(opts=None)

Note: The .getAgentConfig resource differs from `.getAgentSelf`` <https://www.terraform.io/docs/providers/consul/d/agent_self.html>`_, providing less information but utilizing stable APIs. .getAgentSelf will be deprecated in a future release.

The .getAgentConfig data source returns configuration data from the agent specified in the provider.

import pulumi
import pulumi_consul as consul

remote_agent = consul.get_agent_config()
pulumi.export("consulVersion", remote_agent.version)
pulumi_consul.get_agent_self(opts=None)

Warning: The .getAgentSelf resource has been deprecated and will be removed from a future release of the provider. Read the upgrade instructions for more information.

The .getAgentSelf data source returns configuration and status data from the agent specified in the provider.

pulumi_consul.get_autopilot_health(datacenter=None, opts=None)

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

import pulumi
import pulumi_consul as consul

read = consul.get_autopilot_health()
pulumi.export("health", read.healthy)
Parameters

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

pulumi_consul.get_catalog_nodes(query_options=None, opts=None)

Use this data source to access information about an existing resource.

The query_options object supports the following:

  • allowStale (bool)

  • datacenter (str)

  • near (str)

  • node_meta (dict)

  • requireConsistent (bool)

  • token (str)

  • waitIndex (float)

  • waitTime (str)

pulumi_consul.get_catalog_service(datacenter=None, name=None, query_options=None, tag=None, opts=None)

Use this data source to access information about an existing resource.

The query_options object supports the following:

  • allowStale (bool)

  • datacenter (str)

  • namespace (str)

  • near (str)

  • node_meta (dict)

  • requireConsistent (bool)

  • token (str)

  • waitIndex (float)

  • waitTime (str)

pulumi_consul.get_catalog_services(query_options=None, opts=None)

Use this data source to access information about an existing resource.

The query_options object supports the following:

  • allowStale (bool)

  • datacenter (str)

  • namespace (str)

  • near (str)

  • node_meta (dict)

  • requireConsistent (bool)

  • token (str)

  • waitIndex (float)

  • waitTime (str)

pulumi_consul.get_key_prefix(datacenter=None, namespace=None, path_prefix=None, subkey_collection=None, token=None, opts=None)

Use this data source to access information about an existing resource.

Parameters
  • datacenter (str) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • namespace (str) – The namespace to create the keys within.

  • path_prefix (str) – Specifies the common prefix shared by all keys that will be read by this data source instance. In most cases, this will end with a slash to read a “folder” of subkeys.

  • subkey_collection (list) – Specifies a subkey in Consul to be read. Supported values documented below. Multiple blocks supported.

  • token (str) – The ACL token to use. This overrides the token that the agent provides by default.

The subkey_collection object supports the following:

  • default (str) - This is the default value to set for var.<name> if the key does not exist in Consul. Defaults to an empty string.

  • name (str) - This is the name of the key. This value of the key is exposed as var.<name>. This is not the path of the subkey in Consul.

  • path (str) - This is the subkey path in Consul (which will be appended to the given path_prefix) to construct the full key that will be used to read the value.

pulumi_consul.get_keys(datacenter=None, keys=None, namespace=None, token=None, opts=None)

The .Keys resource reads values from the Consul key/value store. This is a powerful way dynamically set values in templates.

import pulumi
import pulumi_aws as aws
import pulumi_consul as consul

app_keys = consul.get_keys(datacenter="nyc1",
    keys=[{
        "default": "ami-1234",
        "name": "ami",
        "path": "service/app/launch_ami",
    }],
    token="abcd")
# Start our instance with the dynamic ami value
app_instance = aws.ec2.Instance("appInstance", ami=app_keys.var["ami"])
Parameters
  • datacenter (str) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • keys (list) – Specifies a key in Consul to be read. Supported values documented below. Multiple blocks supported.

  • namespace (str) – The namespace to lookup the keys.

  • token (str) – The ACL token to use. This overrides the token that the agent provides by default.

The keys object supports the following:

  • default (str) - This is the default value to set for var.<name> if the key does not exist in Consul. Defaults to an empty string.

  • name (str) - This is the name of the key. This value of the key is exposed as var.<name>. This is not the path of the key in Consul.

  • path (str) - This is the path in Consul that should be read or written to.

pulumi_consul.get_network_area_members(datacenter=None, token=None, uuid=None, opts=None)

NOTE: This feature requires Consul Enterprise.

The .getNetworkAreaMembers data source provides a list of the Consul servers present in a specific network area.

import pulumi
import pulumi_consul as consul

dc2_network_area = consul.NetworkArea("dc2NetworkArea",
    peer_datacenter="dc2",
    retry_joins=["1.2.3.4"],
    use_tls=True)
dc2_network_area_members = dc2_network_area.id.apply(lambda id: consul.get_network_area_members(uuid=id))
pulumi.export("members", dc2_network_area_members.members)
Parameters
  • datacenter (str) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • token (str) – The ACL token to use. This overrides the token that the agent provides by default.

  • uuid (str) – The UUID of the area to list.

pulumi_consul.get_network_segments(datacenter=None, token=None, opts=None)

NOTE: This feature requires Consul Enterprise.

The consul_network_segment data source can be used to retrieve the network segments defined in the configuration.

import pulumi
import pulumi_consul as consul

segments_network_segments = consul.get_network_segments()
pulumi.export("segments", segments_network_segments.segments)
Parameters
  • datacenter (str) – The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

  • token (str) – The ACL token to use. This overrides the token that the agent provides by default.

pulumi_consul.get_nodes(query_options=None, opts=None)

The .getNodes data source returns a list of Consul nodes that have been registered with the Consul cluster in a given datacenter. By specifying a different datacenter in the query_options it is possible to retrieve a list of nodes from a different WAN-attached Consul datacenter.

Parameters

query_options (list) – See below.

The query_options object supports the following:

  • allowStale (bool) - When true, the default, allow responses from Consul servers that are followers.

  • datacenter (str) - The Consul datacenter to query. Defaults to the same value found in query_options parameter specified below, or if that is empty, the datacenter value found in the Consul agent that this provider is configured to talk to then the datacenter in the provider setup.

  • near (str)

  • node_meta (dict)

  • requireConsistent (bool) - When true force the client to perform a read on at least quorum servers and verify the result is the same. Defaults to false.

  • token (str) - Specify the Consul ACL token to use when performing the request. This defaults to the same API token configured by the consul provider but may be overriden if necessary.

  • waitIndex (float) - Index number used to enable blocking quereis.

  • waitTime (str) - Max time the client should wait for a blocking query to return.

pulumi_consul.get_service(datacenter=None, name=None, query_options=None, tag=None, opts=None)

.Service provides details about a specific Consul service in a given datacenter. The results include a list of nodes advertising the specified service, the node’s IP address, port number, node ID, etc. By specifying a different datacenter in the query_options it is possible to retrieve a list of services from a different WAN-attached Consul datacenter.

This data source is different from the .getServices (plural) data source, which provides a summary of the current Consul services.

Parameters
  • datacenter (str) – The Consul datacenter to query. Defaults to the same value found in query_options parameter specified below, or if that is empty, the datacenter value found in the Consul agent that this provider is configured to talk to.

  • name (str) – The service name to select.

  • query_options (list) – See below.

  • tag (str) – A single tag that can be used to filter the list of nodes to return based on a single matching tag..

The query_options object supports the following:

  • allowStale (bool) - When true, the default, allow responses from Consul servers that are followers.

  • datacenter (str) - The Consul datacenter to query. Defaults to the same value found in query_options parameter specified below, or if that is empty, the datacenter value found in the Consul agent that this provider is configured to talk to.

  • namespace (str) - The namespace to lookup the service.

  • near (str)

  • node_meta (dict)

  • requireConsistent (bool) - When true force the client to perform a read on at least quorum servers and verify the result is the same. Defaults to false.

  • token (str) - Specify the Consul ACL token to use when performing the request. This defaults to the same API token configured by the consul provider but may be overriden if necessary.

  • waitIndex (float) - Index number used to enable blocking quereis.

  • waitTime (str) - Max time the client should wait for a blocking query to return.

pulumi_consul.get_service_health(datacenter=None, name=None, near=None, node_meta=None, passing=None, tag=None, wait_for=None, opts=None)

.getServiceHealth can be used to get the list of the instances that are currently healthy, according to their associated health-checks. The result includes the list of service instances, the node associated to each instance and its health-checks.

This resource is likely to change as frequently as the health-checks are being updated, you should expect different results in a frequent basis.

Parameters
  • datacenter (str) – The Consul datacenter to query.

  • name (str) – The service name to select.

  • near (str) – Specifies a node name to sort the node list in ascending order based on the estimated round trip time from that node.

  • node_meta (dict) – Filter the results to nodes with the specified key/value pairs.

  • passing (bool) – Whether to return only nodes with all checks in the passing state. Defaults to true.

  • tag (str) – A single tag that can be used to filter the list to return based on a single matching tag.

pulumi_consul.get_services(query_options=None, opts=None)

The .getServices data source returns a list of Consul services that have been registered with the Consul cluster in a given datacenter. By specifying a different datacenter in the query_options it is possible to retrieve a list of services from a different WAN-attached Consul datacenter.

This data source is different from the .Service (singular) data source, which provides a detailed response about a specific Consul service.

Parameters

query_options (list) – See below.

The query_options object supports the following:

  • allowStale (bool) - When true, the default, allow responses from Consul servers that are followers.

  • datacenter (str) - The Consul datacenter to query. Defaults to the same value found in query_options parameter specified below, or if that is empty, the datacenter value found in the Consul agent that this provider is configured to talk to.

  • namespace (str) - The namespace to lookup the services.

  • near (str)

  • node_meta (dict)

  • requireConsistent (bool) - When true force the client to perform a read on at least quorum servers and verify the result is the same. Defaults to false.

  • token (str) - Specify the Consul ACL token to use when performing the request. This defaults to the same API token configured by the consul provider but may be overriden if necessary.

  • waitIndex (float) - Index number used to enable blocking quereis.

  • waitTime (str) - Max time the client should wait for a blocking query to return.