consul.getAclRole

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

Example Usage

using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Consul.GetAclRole.InvokeAsync(new Consul.GetAclRoleArgs
        {
            Name = "example-role",
        }));
        this.ConsulAclRole = test.Apply(test => test.Id);
    }

    [Output("consulAclRole")]
    public Output<string> ConsulAclRole { 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.LookupAclRole(ctx, &GetAclRoleArgs{
			Name: "example-role",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("consulAclRole", test.Id)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_consul as consul

test = consul.get_acl_role(name="example-role")
pulumi.export("consulAclRole", test.id)
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const test = consul.getAclRole({
    name: "example-role",
});
export const consulAclRole = test.then(test => test.id);

Coming soon!

Using getAclRole

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 getAclRole(args: GetAclRoleArgs, opts?: InvokeOptions): Promise<GetAclRoleResult>
function getAclRoleOutput(args: GetAclRoleOutputArgs, opts?: InvokeOptions): Output<GetAclRoleResult>
def get_acl_role(name: Optional[str] = None,
                 namespace: Optional[str] = None,
                 partition: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetAclRoleResult
def get_acl_role_output(name: Optional[pulumi.Input[str]] = None,
                 namespace: Optional[pulumi.Input[str]] = None,
                 partition: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetAclRoleResult]
func LookupAclRole(ctx *Context, args *LookupAclRoleArgs, opts ...InvokeOption) (*LookupAclRoleResult, error)
func LookupAclRoleOutput(ctx *Context, args *LookupAclRoleOutputArgs, opts ...InvokeOption) LookupAclRoleResultOutput

> Note: This function is named LookupAclRole in the Go SDK.

public static class GetAclRole 
{
    public static Task<GetAclRoleResult> InvokeAsync(GetAclRoleArgs args, InvokeOptions? opts = null)
    public static Output<GetAclRoleResult> Invoke(GetAclRoleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAclRoleResult> getAclRole(GetAclRoleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: consul:index/getAclRole:getAclRole
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

The name of the ACL Role.

Namespace string

The namespace to lookup the role.

Partition string

The partition to lookup the role.

Name string

The name of the ACL Role.

Namespace string

The namespace to lookup the role.

Partition string

The partition to lookup the role.

name String

The name of the ACL Role.

namespace String

The namespace to lookup the role.

partition String

The partition to lookup the role.

name string

The name of the ACL Role.

namespace string

The namespace to lookup the role.

partition string

The partition to lookup the role.

name str

The name of the ACL Role.

namespace str

The namespace to lookup the role.

partition str

The partition to lookup the role.

name String

The name of the ACL Role.

namespace String

The namespace to lookup the role.

partition String

The partition to lookup the role.

getAclRole Result

The following output properties are available:

Description string

The description of the ACL Role.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the ACL Role.

NodeIdentities List<GetAclRoleNodeIdentity>

The list of node identities associated with the ACL Role. Each entry has a node_name and a datacenter attributes.

Policies List<GetAclRolePolicy>

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

ServiceIdentities List<GetAclRoleServiceIdentity>

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

Namespace string

The namespace to lookup the role.

Partition string
Description string

The description of the ACL Role.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the ACL Role.

NodeIdentities []GetAclRoleNodeIdentity

The list of node identities associated with the ACL Role. Each entry has a node_name and a datacenter attributes.

Policies []GetAclRolePolicy

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

ServiceIdentities []GetAclRoleServiceIdentity

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

Namespace string

The namespace to lookup the role.

Partition string
description String

The description of the ACL Role.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the ACL Role.

nodeIdentities List<GetAclRoleNodeIdentity>

The list of node identities associated with the ACL Role. Each entry has a node_name and a datacenter attributes.

policies List<GetAclRolePolicy>

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

serviceIdentities List<GetAclRoleServiceIdentity>

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

namespace String

The namespace to lookup the role.

partition String
description string

The description of the ACL Role.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the ACL Role.

nodeIdentities GetAclRoleNodeIdentity[]

The list of node identities associated with the ACL Role. Each entry has a node_name and a datacenter attributes.

policies GetAclRolePolicy[]

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

serviceIdentities GetAclRoleServiceIdentity[]

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

namespace string

The namespace to lookup the role.

partition string
description str

The description of the ACL Role.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the ACL Role.

node_identities Sequence[GetAclRoleNodeIdentity]

The list of node identities associated with the ACL Role. Each entry has a node_name and a datacenter attributes.

policies Sequence[GetAclRolePolicy]

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

service_identities Sequence[GetAclRoleServiceIdentity]

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

namespace str

The namespace to lookup the role.

partition str
description String

The description of the ACL Role.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the ACL Role.

nodeIdentities List<Property Map>

The list of node identities associated with the ACL Role. Each entry has a node_name and a datacenter attributes.

policies List<Property Map>

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

serviceIdentities List<Property Map>

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

namespace String

The namespace to lookup the role.

partition String

Supporting Types

GetAclRoleNodeIdentity

Datacenter string
NodeName string
Datacenter string
NodeName string
datacenter String
nodeName String
datacenter string
nodeName string
datacenter String
nodeName String

GetAclRolePolicy

Id string
Name string

The name of the ACL Role.

Id string
Name string

The name of the ACL Role.

id String
name String

The name of the ACL Role.

id string
name string

The name of the ACL Role.

id str
name str

The name of the ACL Role.

id String
name String

The name of the ACL Role.

GetAclRoleServiceIdentity

Datacenters List<string>
ServiceName string
Datacenters []string
ServiceName string
datacenters List<String>
serviceName String
datacenters string[]
serviceName string
datacenters Sequence[str]
service_name str
datacenters List<String>
serviceName String

Package Details

Repository
HashiCorp Consul pulumi/pulumi-consul
License
Apache-2.0
Notes

This Pulumi package is based on the consul Terraform Provider.