getAuthBackendRoleId

Reads the Role ID of an AppRole from a Vault server.

Example Usage

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
    public MyStack()
    {
        var role = Output.Create(Vault.AppRole.GetAuthBackendRoleId.InvokeAsync(new Vault.AppRole.GetAuthBackendRoleIdArgs
        {
            Backend = "my-approle-backend",
            RoleName = "my-role",
        }));
        this.Role_id = role.Apply(role => role.RoleId);
    }

    [Output("role-id")]
    public Output<string> Role_id { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-vault/sdk/v4/go/vault/appRole"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "my-approle-backend"
		role, err := appRole.GetAuthBackendRoleId(ctx, &appRole.GetAuthBackendRoleIdArgs{
			Backend:  &opt0,
			RoleName: "my-role",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("role-id", role.RoleId)
		return nil
	})
}
import pulumi
import pulumi_vault as vault

role = vault.appRole.get_auth_backend_role_id(backend="my-approle-backend",
    role_name="my-role")
pulumi.export("role-id", role.role_id)
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";

const role = pulumi.output(vault.appRole.getAuthBackendRoleId({
    backend: "my-approle-backend",
    roleName: "my-role",
}, { async: true }));

export const role_id = role.roleId;

Using getAuthBackendRoleId

function getAuthBackendRoleId(args: GetAuthBackendRoleIdArgs, opts?: InvokeOptions): Promise<GetAuthBackendRoleIdResult>
def get_auth_backend_role_id(backend: Optional[str] = None,
                             role_name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetAuthBackendRoleIdResult
func GetAuthBackendRoleId(ctx *Context, args *GetAuthBackendRoleIdArgs, opts ...InvokeOption) (*GetAuthBackendRoleIdResult, error)

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

public static class GetAuthBackendRoleId {
    public static Task<GetAuthBackendRoleIdResult> InvokeAsync(GetAuthBackendRoleIdArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

RoleName string
The name of the role to retrieve the Role ID for.
Backend string
The unique name for the AppRole backend the role to retrieve a RoleID for resides in. Defaults to “approle”.
RoleName string
The name of the role to retrieve the Role ID for.
Backend string
The unique name for the AppRole backend the role to retrieve a RoleID for resides in. Defaults to “approle”.
roleName string
The name of the role to retrieve the Role ID for.
backend string
The unique name for the AppRole backend the role to retrieve a RoleID for resides in. Defaults to “approle”.
role_name str
The name of the role to retrieve the Role ID for.
backend str
The unique name for the AppRole backend the role to retrieve a RoleID for resides in. Defaults to “approle”.

getAuthBackendRoleId Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
RoleId string
The RoleID of the role.
RoleName string
Backend string
Id string
The provider-assigned unique ID for this managed resource.
RoleId string
The RoleID of the role.
RoleName string
Backend string
id string
The provider-assigned unique ID for this managed resource.
roleId string
The RoleID of the role.
roleName string
backend string
id str
The provider-assigned unique ID for this managed resource.
role_id str
The RoleID of the role.
role_name str
backend str

Package Details

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