consul.getAclToken
The consul.AclToken
data source returns the information related to the
consul.AclToken
resource with the exception of its secret ID.
If you want to get the secret ID associated with a token, use the
consul.getAclTokenSecretId
data source.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var test = Output.Create(Consul.GetAclToken.InvokeAsync(new Consul.GetAclTokenArgs
{
AccessorId = "00000000-0000-0000-0000-000000000002",
}));
this.ConsulAclPolicies = test.Apply(test => test.Policies);
}
[Output("consulAclPolicies")]
public Output<string> ConsulAclPolicies { get; set; }
}
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 {
test, err := consul.LookupAclToken(ctx, &GetAclTokenArgs{
AccessorId: "00000000-0000-0000-0000-000000000002",
}, nil)
if err != nil {
return err
}
ctx.Export("consulAclPolicies", test.Policies)
return nil
})
}
Coming soon!
import pulumi
import pulumi_consul as consul
test = consul.get_acl_token(accessor_id="00000000-0000-0000-0000-000000000002")
pulumi.export("consulAclPolicies", test.policies)
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
const test = pulumi.output(consul.getAclToken({
accessorId: "00000000-0000-0000-0000-000000000002",
}));
export const consulAclPolicies = test.policies;
Coming soon!
Using getAclToken
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAclToken(args: GetAclTokenArgs, opts?: InvokeOptions): Promise<GetAclTokenResult>
function getAclTokenOutput(args: GetAclTokenOutputArgs, opts?: InvokeOptions): Output<GetAclTokenResult>
def get_acl_token(accessor_id: Optional[str] = None,
namespace: Optional[str] = None,
partition: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAclTokenResult
def get_acl_token_output(accessor_id: Optional[pulumi.Input[str]] = None,
namespace: Optional[pulumi.Input[str]] = None,
partition: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAclTokenResult]
func LookupAclToken(ctx *Context, args *LookupAclTokenArgs, opts ...InvokeOption) (*LookupAclTokenResult, error)
func LookupAclTokenOutput(ctx *Context, args *LookupAclTokenOutputArgs, opts ...InvokeOption) LookupAclTokenResultOutput
> Note: This function is named LookupAclToken
in the Go SDK.
public static class GetAclToken
{
public static Task<GetAclTokenResult> InvokeAsync(GetAclTokenArgs args, InvokeOptions? opts = null)
public static Output<GetAclTokenResult> Invoke(GetAclTokenInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAclTokenResult> getAclToken(GetAclTokenArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: consul:index/getAclToken:getAclToken
arguments:
# arguments dictionary
The following arguments are supported:
- Accessor
Id string The accessor ID of the ACL token.
- Namespace string
The namespace to lookup the ACL token.
- Partition string
The partition to lookup the ACL token.
- Accessor
Id string The accessor ID of the ACL token.
- Namespace string
The namespace to lookup the ACL token.
- Partition string
The partition to lookup the ACL token.
- accessor
Id String The accessor ID of the ACL token.
- namespace String
The namespace to lookup the ACL token.
- partition String
The partition to lookup the ACL token.
- accessor
Id string The accessor ID of the ACL token.
- namespace string
The namespace to lookup the ACL token.
- partition string
The partition to lookup the ACL token.
- accessor_
id str The accessor ID of the ACL token.
- namespace str
The namespace to lookup the ACL token.
- partition str
The partition to lookup the ACL token.
- accessor
Id String The accessor ID of the ACL token.
- namespace String
The namespace to lookup the ACL token.
- partition String
The partition to lookup the ACL token.
getAclToken Result
The following output properties are available:
- Accessor
Id string - Description string
The description of the ACL token.
- Expiration
Time string If set this represents the point after which a token should be considered revoked and is eligible for destruction.
- Id string
The provider-assigned unique ID for this managed resource.
- Local bool
Whether the ACL token is local to the datacenter it was created within.
- Node
Identities List<GetAcl Token Node Identity> The list of node identities attached to the token. Each entry has a
node_name
and adatacenter
attributes.- Policies
List<Get
Acl Token Policy> A list of policies associated with the ACL token. Each entry has an
id
and aname
attribute.- Roles
List<Get
Acl Token Role> The list of roles attached to the token.
- Service
Identities List<GetAcl Token Service Identity> The list of service identities attached to the token. Each entry has a
service_name
and adatacenters
attribute.- Namespace string
- Partition string
- Accessor
Id string - Description string
The description of the ACL token.
- Expiration
Time string If set this represents the point after which a token should be considered revoked and is eligible for destruction.
- Id string
The provider-assigned unique ID for this managed resource.
- Local bool
Whether the ACL token is local to the datacenter it was created within.
- Node
Identities []GetAcl Token Node Identity The list of node identities attached to the token. Each entry has a
node_name
and adatacenter
attributes.- Policies
[]Get
Acl Token Policy A list of policies associated with the ACL token. Each entry has an
id
and aname
attribute.- Roles
[]Get
Acl Token Role The list of roles attached to the token.
- Service
Identities []GetAcl Token Service Identity The list of service identities attached to the token. Each entry has a
service_name
and adatacenters
attribute.- Namespace string
- Partition string
- accessor
Id String - description String
The description of the ACL token.
- expiration
Time String If set this represents the point after which a token should be considered revoked and is eligible for destruction.
- id String
The provider-assigned unique ID for this managed resource.
- local Boolean
Whether the ACL token is local to the datacenter it was created within.
- node
Identities List<GetAcl Token Node Identity> The list of node identities attached to the token. Each entry has a
node_name
and adatacenter
attributes.- policies
List<Get
Acl Token Policy> A list of policies associated with the ACL token. Each entry has an
id
and aname
attribute.- roles
List<Get
Acl Token Role> The list of roles attached to the token.
- service
Identities List<GetAcl Token Service Identity> The list of service identities attached to the token. Each entry has a
service_name
and adatacenters
attribute.- namespace String
- partition String
- accessor
Id string - description string
The description of the ACL token.
- expiration
Time string If set this represents the point after which a token should be considered revoked and is eligible for destruction.
- id string
The provider-assigned unique ID for this managed resource.
- local boolean
Whether the ACL token is local to the datacenter it was created within.
- node
Identities GetAcl Token Node Identity[] The list of node identities attached to the token. Each entry has a
node_name
and adatacenter
attributes.- policies
Get
Acl Token Policy[] A list of policies associated with the ACL token. Each entry has an
id
and aname
attribute.- roles
Get
Acl Token Role[] The list of roles attached to the token.
- service
Identities GetAcl Token Service Identity[] The list of service identities attached to the token. Each entry has a
service_name
and adatacenters
attribute.- namespace string
- partition string
- accessor_
id str - description str
The description of the ACL token.
- expiration_
time str If set this represents the point after which a token should be considered revoked and is eligible for destruction.
- id str
The provider-assigned unique ID for this managed resource.
- local bool
Whether the ACL token is local to the datacenter it was created within.
- node_
identities Sequence[GetAcl Token Node Identity] The list of node identities attached to the token. Each entry has a
node_name
and adatacenter
attributes.- policies
Sequence[Get
Acl Token Policy] A list of policies associated with the ACL token. Each entry has an
id
and aname
attribute.- roles
Sequence[Get
Acl Token Role] The list of roles attached to the token.
- service_
identities Sequence[GetAcl Token Service Identity] The list of service identities attached to the token. Each entry has a
service_name
and adatacenters
attribute.- namespace str
- partition str
- accessor
Id String - description String
The description of the ACL token.
- expiration
Time String If set this represents the point after which a token should be considered revoked and is eligible for destruction.
- id String
The provider-assigned unique ID for this managed resource.
- local Boolean
Whether the ACL token is local to the datacenter it was created within.
- node
Identities List<Property Map> The list of node identities attached to the token. Each entry has a
node_name
and adatacenter
attributes.- policies List<Property Map>
A list of policies associated with the ACL token. Each entry has an
id
and aname
attribute.- roles List<Property Map>
The list of roles attached to the token.
- service
Identities List<Property Map> The list of service identities attached to the token. Each entry has a
service_name
and adatacenters
attribute.- namespace String
- partition String
Supporting Types
GetAclTokenNodeIdentity
- Datacenter string
- Node
Name string
- Datacenter string
- Node
Name string
- datacenter String
- node
Name String
- datacenter string
- node
Name string
- datacenter str
- node_
name str
- datacenter String
- node
Name String
GetAclTokenPolicy
GetAclTokenRole
GetAclTokenServiceIdentity
- Datacenters List<string>
- Service
Name string
- Datacenters []string
- Service
Name string
- datacenters List<String>
- service
Name String
- datacenters string[]
- service
Name string
- datacenters Sequence[str]
- service_
name str
- datacenters List<String>
- service
Name String
Package Details
- Repository
- HashiCorp Consul pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
consul
Terraform Provider.