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

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/v2/go/consul"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        test, err := consul.LookupAclRole(ctx, &consul.LookupAclRoleArgs{
            Name: "example-role",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("consulAclRole", test.Id)
        return nil
    })
}
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);

Using getAclRole

function getAclRole(args: GetAclRoleArgs, opts?: InvokeOptions): Promise<GetAclRoleResult>
def get_acl_role(description: Optional[str] = None, name: Optional[str] = None, namespace: Optional[str] = None, policies: Optional[Sequence[GetAclRolePolicyArgs]] = None, service_identities: Optional[Sequence[GetAclRoleServiceIdentityArgs]] = None, opts: Optional[InvokeOptions] = None) -> GetAclRoleResult
func LookupAclRole(ctx *Context, args *LookupAclRoleArgs, opts ...InvokeOption) (*LookupAclRoleResult, error)

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

public static class GetAclRole {
    public static Task<GetAclRoleResult> InvokeAsync(GetAclRoleArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the ACL Role.

Description string

The description of the ACL Role.

Namespace string

The namespace to lookup the role.

Policies List<GetAclRolePolicyArgs>

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

ServiceIdentities List<GetAclRoleServiceIdentityArgs>

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

Name string

The name of the ACL Role.

Description string

The description of the ACL Role.

Namespace string

The namespace to lookup the role.

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.

name string

The name of the ACL Role.

description string

The description of the ACL Role.

namespace string

The namespace to lookup the role.

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.

name str

The name of the ACL Role.

description str

The description of the ACL Role.

namespace str

The namespace to lookup the role.

policies Sequence[GetAclRolePolicyArgs]

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

service_identities Sequence[GetAclRoleServiceIdentityArgs]

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

getAclRole Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
Description string

The description of the ACL Role.

Namespace string
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.

Id string

The provider-assigned unique ID for this managed resource.

Name string
Description string

The description of the ACL Role.

Namespace string
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.

id string

The provider-assigned unique ID for this managed resource.

name string
description string

The description of the ACL Role.

namespace string
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.

id str

The provider-assigned unique ID for this managed resource.

name str
description str

The description of the ACL Role.

namespace str
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.

Supporting Types

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 str
name str

The name of the ACL Role.

GetAclRoleServiceIdentity

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

Package Details

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