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

Keys

Create a Keys Resource

new Keys(name: string, args?: KeysArgs, opts?: CustomResourceOptions);
def Keys(resource_name: str, opts: Optional[ResourceOptions] = None, datacenter: Optional[str] = None, keys: Optional[Sequence[KeysKeyArgs]] = None, namespace: Optional[str] = None, token: Optional[str] = None)
func NewKeys(ctx *Context, name string, args *KeysArgs, opts ...ResourceOption) (*Keys, error)
public Keys(string name, KeysArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args KeysArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args KeysArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KeysArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Keys Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Keys resource accepts the following input properties:

Datacenter string

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

KeysCollection List<KeysKeyArgs>

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

Namespace string

The namespace to create the keys within.

Token string

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

Datacenter string

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

Keys []KeysKey

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

Namespace string

The namespace to create the keys within.

Token string

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

datacenter string

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

keys KeysKey[]

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

namespace string

The namespace to create the keys within.

token string

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

datacenter str

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

keys Sequence[KeysKeyArgs]

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

namespace str

The namespace to create the keys within.

token str

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

Outputs

All input properties are implicitly available as output properties. Additionally, the Keys resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Var Dictionary<string, string>
Id string
The provider-assigned unique ID for this managed resource.
Var map[string]string
id string
The provider-assigned unique ID for this managed resource.
var {[key: string]: string}
id str
The provider-assigned unique ID for this managed resource.
var Mapping[str, str]

Look up an Existing Keys Resource

Get an existing Keys 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?: KeysState, opts?: CustomResourceOptions): Keys
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, datacenter: Optional[str] = None, keys: Optional[Sequence[KeysKeyArgs]] = None, namespace: Optional[str] = None, token: Optional[str] = None, var: Optional[Mapping[str, str]] = None) -> Keys
func GetKeys(ctx *Context, name string, id IDInput, state *KeysState, opts ...ResourceOption) (*Keys, error)
public static Keys Get(string name, Input<string> id, KeysState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Datacenter string

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

KeysCollection List<KeysKeyArgs>

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

Namespace string

The namespace to create the keys within.

Token string

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

Var Dictionary<string, string>
Datacenter string

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

Keys []KeysKey

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

Namespace string

The namespace to create the keys within.

Token string

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

Var map[string]string
datacenter string

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

keys KeysKey[]

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

namespace string

The namespace to create the keys within.

token string

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

var {[key: string]: string}
datacenter str

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

keys Sequence[KeysKeyArgs]

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

namespace str

The namespace to create the keys within.

token str

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

var Mapping[str, str]

Supporting Types

KeysKey

Path string

This is the path in Consul that should be written to.

Default string
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 int

An unsigned integer value to attach to the key (defaults to 0).

Name string

Deprecated: Using consul_keys resource to read is deprecated; please use consul_keys data source instead

Value string

The value to write to the given path.

Path string

This is the path in Consul that should be written to.

Default string
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 int

An unsigned integer value to attach to the key (defaults to 0).

Name string

Deprecated: Using consul_keys resource to read is deprecated; please use consul_keys data source instead

Value string

The value to write to the given path.

path string

This is the path in Consul that should be written to.

default string
delete boolean

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 number

An unsigned integer value to attach to the key (defaults to 0).

name string

Deprecated: Using consul_keys resource to read is deprecated; please use consul_keys data source instead

value string

The value to write to the given path.

path str

This is the path in Consul that should be written to.

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 int

An unsigned integer value to attach to the key (defaults to 0).

name str

Deprecated: Using consul_keys resource to read is deprecated; please use consul_keys data source instead

value str

The value to write to the given path.

Package Details

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