Class AclToken
The consul..AclToken resource writes an ACL token into Consul.
Example Usage
Basic usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var agent = new Consul.AclPolicy("agent", new Consul.AclPolicyArgs
{
Rules = @"node_prefix """" {
policy = ""read""
}
",
});
var test = new Consul.AclToken("test", new Consul.AclTokenArgs
{
Description = "my test token",
Local = true,
Policies =
{
agent.Name,
},
});
}
}
Inherited Members
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class AclToken : CustomResource
Constructors
View SourceAclToken(String, AclTokenArgs, CustomResourceOptions)
Create a AclToken resource with the given unique name, arguments, and options.
Declaration
public AclToken(string name, AclTokenArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AclTokenArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAccessorId
The uuid of the token. If omitted, Consul will generate a random uuid.
Declaration
public Output<string> AccessorId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the token.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Local
The flag to set the token local to the current datacenter.
Declaration
public Output<bool?> Local { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Namespace
The namespace to create the token within.
Declaration
public Output<string> Namespace { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Policies
The list of policies attached to the token.
Declaration
public Output<ImmutableArray<string>> Policies { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Roles
The list of roles attached to the token.
Declaration
public Output<ImmutableArray<string>> Roles { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, AclTokenState, CustomResourceOptions)
Get an existing AclToken resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AclToken Get(string name, Input<string> id, AclTokenState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AclTokenState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AclToken |