consul.CatalogEntry
Explore with Pulumi AI
!> The consul.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.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Consul = Pulumi.Consul;
return await Deployment.RunAsync(() =>
{
var app = new Consul.CatalogEntry("app", new()
{
Address = "192.168.10.10",
Node = "foobar",
Services = new[]
{
new Consul.Inputs.CatalogEntryServiceArgs
{
Address = "127.0.0.1",
Id = "redis1",
Name = "redis",
Port = 8000,
Tags = new[]
{
"master",
"v1",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-consul/sdk/v3/go/consul"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := consul.NewCatalogEntry(ctx, "app", &consul.CatalogEntryArgs{
Address: pulumi.String("192.168.10.10"),
Node: pulumi.String("foobar"),
Services: consul.CatalogEntryServiceArray{
&consul.CatalogEntryServiceArgs{
Address: pulumi.String("127.0.0.1"),
Id: pulumi.String("redis1"),
Name: pulumi.String("redis"),
Port: pulumi.Int(8000),
Tags: pulumi.StringArray{
pulumi.String("master"),
pulumi.String("v1"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.consul.CatalogEntry;
import com.pulumi.consul.CatalogEntryArgs;
import com.pulumi.consul.inputs.CatalogEntryServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var app = new CatalogEntry("app", CatalogEntryArgs.builder()
.address("192.168.10.10")
.node("foobar")
.services(CatalogEntryServiceArgs.builder()
.address("127.0.0.1")
.id("redis1")
.name("redis")
.port(8000)
.tags(
"master",
"v1")
.build())
.build());
}
}
import pulumi
import pulumi_consul as consul
app = consul.CatalogEntry("app",
address="192.168.10.10",
node="foobar",
services=[consul.CatalogEntryServiceArgs(
address="127.0.0.1",
id="redis1",
name="redis",
port=8000,
tags=[
"master",
"v1",
],
)])
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
const app = new 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",
],
}],
});
resources:
app:
type: consul:CatalogEntry
properties:
address: 192.168.10.10
node: foobar
services:
- address: 127.0.0.1
id: redis1
name: redis
port: 8000
tags:
- master
- v1
Create CatalogEntry Resource
new CatalogEntry(name: string, args: CatalogEntryArgs, opts?: CustomResourceOptions);
@overload
def CatalogEntry(resource_name: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
datacenter: Optional[str] = None,
node: Optional[str] = None,
services: Optional[Sequence[CatalogEntryServiceArgs]] = None,
token: Optional[str] = None)
@overload
def CatalogEntry(resource_name: str,
args: CatalogEntryArgs,
opts: Optional[ResourceOptions] = None)
func NewCatalogEntry(ctx *Context, name string, args CatalogEntryArgs, opts ...ResourceOption) (*CatalogEntry, error)
public CatalogEntry(string name, CatalogEntryArgs args, CustomResourceOptions? opts = null)
public CatalogEntry(String name, CatalogEntryArgs args)
public CatalogEntry(String name, CatalogEntryArgs args, CustomResourceOptions options)
type: consul:CatalogEntry
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CatalogEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CatalogEntryArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CatalogEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CatalogEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CatalogEntryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CatalogEntry Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CatalogEntry resource accepts the following input properties:
- Address string
The address of the node being added to, or referenced in the catalog.
- Node string
The name of the node being added to, or referenced in the catalog.
- Datacenter string
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- Services
List<Catalog
Entry Service> A service to optionally associated with the node. Supported values are documented below.
- Token string
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- Address string
The address of the node being added to, or referenced in the catalog.
- Node string
The name of the node being added to, or referenced in the catalog.
- Datacenter string
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- Services
[]Catalog
Entry Service Args A service to optionally associated with the node. Supported values are documented below.
- Token string
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- address String
The address of the node being added to, or referenced in the catalog.
- node String
The name of the node being added to, or referenced in the catalog.
- datacenter String
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- services
List<Catalog
Entry Service> A service to optionally associated with the node. Supported values are documented below.
- token String
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- address string
The address of the node being added to, or referenced in the catalog.
- node string
The name of the node being added to, or referenced in the catalog.
- datacenter string
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- services
Catalog
Entry Service[] A service to optionally associated with the node. Supported values are documented below.
- token string
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- address str
The address of the node being added to, or referenced in the catalog.
- node str
The name of the node being added to, or referenced in the catalog.
- datacenter str
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- services
Sequence[Catalog
Entry Service Args] A service to optionally associated with the node. Supported values are documented below.
- token str
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- address String
The address of the node being added to, or referenced in the catalog.
- node String
The name of the node being added to, or referenced in the catalog.
- datacenter String
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- services List<Property Map>
A service to optionally associated with the node. Supported values are documented below.
- token String
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
Outputs
All input properties are implicitly available as output properties. Additionally, the CatalogEntry resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing CatalogEntry Resource
Get an existing CatalogEntry resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CatalogEntryState, opts?: CustomResourceOptions): CatalogEntry
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
datacenter: Optional[str] = None,
node: Optional[str] = None,
services: Optional[Sequence[CatalogEntryServiceArgs]] = None,
token: Optional[str] = None) -> CatalogEntry
func GetCatalogEntry(ctx *Context, name string, id IDInput, state *CatalogEntryState, opts ...ResourceOption) (*CatalogEntry, error)
public static CatalogEntry Get(string name, Input<string> id, CatalogEntryState? state, CustomResourceOptions? opts = null)
public static CatalogEntry get(String name, Output<String> id, CatalogEntryState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Address string
The address of the node being added to, or referenced in the catalog.
- Datacenter string
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- Node string
The name of the node being added to, or referenced in the catalog.
- Services
List<Catalog
Entry Service> A service to optionally associated with the node. Supported values are documented below.
- Token string
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- Address string
The address of the node being added to, or referenced in the catalog.
- Datacenter string
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- Node string
The name of the node being added to, or referenced in the catalog.
- Services
[]Catalog
Entry Service Args A service to optionally associated with the node. Supported values are documented below.
- Token string
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- address String
The address of the node being added to, or referenced in the catalog.
- datacenter String
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- node String
The name of the node being added to, or referenced in the catalog.
- services
List<Catalog
Entry Service> A service to optionally associated with the node. Supported values are documented below.
- token String
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- address string
The address of the node being added to, or referenced in the catalog.
- datacenter string
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- node string
The name of the node being added to, or referenced in the catalog.
- services
Catalog
Entry Service[] A service to optionally associated with the node. Supported values are documented below.
- token string
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- address str
The address of the node being added to, or referenced in the catalog.
- datacenter str
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- node str
The name of the node being added to, or referenced in the catalog.
- services
Sequence[Catalog
Entry Service Args] A service to optionally associated with the node. Supported values are documented below.
- token str
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
- address String
The address of the node being added to, or referenced in the catalog.
- datacenter String
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
- node String
The name of the node being added to, or referenced in the catalog.
- services List<Property Map>
A service to optionally associated with the node. Supported values are documented below.
- token String
ACL token.
The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration
Supporting Types
CatalogEntryService, CatalogEntryServiceArgs
- Name string
The name of the service
- Address string
The address of the service. Defaults to the node address.
- Id string
The ID of the service. Defaults to the
name
.- Port int
The port of the service.
- List<string>
A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.
- Name string
The name of the service
- Address string
The address of the service. Defaults to the node address.
- Id string
The ID of the service. Defaults to the
name
.- Port int
The port of the service.
- []string
A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.
- name String
The name of the service
- address String
The address of the service. Defaults to the node address.
- id String
The ID of the service. Defaults to the
name
.- port Integer
The port of the service.
- List<String>
A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.
- name string
The name of the service
- address string
The address of the service. Defaults to the node address.
- id string
The ID of the service. Defaults to the
name
.- port number
The port of the service.
- string[]
A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.
- name String
The name of the service
- address String
The address of the service. Defaults to the node address.
- id String
The ID of the service. Defaults to the
name
.- port Number
The port of the service.
- List<String>
A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.
Package Details
- Repository
- HashiCorp Consul pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
consul
Terraform Provider.