prefect 2.90.1 published on Friday, Nov 14, 2025 by prefecthq
prefect 2.90.1 published on Friday, Nov 14, 2025 by prefecthq
Get information about an existing Workspace Role.
Use this data source read down the pre-defined Roles, to manage User and Service Account access.
For more information, see manage account roles.
This feature is available in the following product plan(s): Hobby, Starter, Team, Pro, Enterprise.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as prefect from "@pulumi/prefect";
// Read down the default Admin Account Role
const admin = prefect.getAccountRole({
name: "Admin",
});
// Read down the default Member Account Role
const member = prefect.getAccountRole({
name: "Member",
});
// Read down the default Owner Account Role
const owner = prefect.getAccountRole({
name: "Owner",
});
import pulumi
import pulumi_prefect as prefect
# Read down the default Admin Account Role
admin = prefect.get_account_role(name="Admin")
# Read down the default Member Account Role
member = prefect.get_account_role(name="Member")
# Read down the default Owner Account Role
owner = prefect.get_account_role(name="Owner")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/prefect/v2/prefect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Read down the default Admin Account Role
_, err := prefect.GetAccountRole(ctx, &prefect.GetAccountRoleArgs{
Name: "Admin",
}, nil)
if err != nil {
return err
}
// Read down the default Member Account Role
_, err = prefect.GetAccountRole(ctx, &prefect.GetAccountRoleArgs{
Name: "Member",
}, nil)
if err != nil {
return err
}
// Read down the default Owner Account Role
_, err = prefect.GetAccountRole(ctx, &prefect.GetAccountRoleArgs{
Name: "Owner",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Prefect = Pulumi.Prefect;
return await Deployment.RunAsync(() =>
{
// Read down the default Admin Account Role
var admin = Prefect.GetAccountRole.Invoke(new()
{
Name = "Admin",
});
// Read down the default Member Account Role
var member = Prefect.GetAccountRole.Invoke(new()
{
Name = "Member",
});
// Read down the default Owner Account Role
var owner = Prefect.GetAccountRole.Invoke(new()
{
Name = "Owner",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.prefect.PrefectFunctions;
import com.pulumi.prefect.inputs.GetAccountRoleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Read down the default Admin Account Role
final var admin = PrefectFunctions.getAccountRole(GetAccountRoleArgs.builder()
.name("Admin")
.build());
// Read down the default Member Account Role
final var member = PrefectFunctions.getAccountRole(GetAccountRoleArgs.builder()
.name("Member")
.build());
// Read down the default Owner Account Role
final var owner = PrefectFunctions.getAccountRole(GetAccountRoleArgs.builder()
.name("Owner")
.build());
}
}
variables:
# Read down the default Admin Account Role
admin:
fn::invoke:
function: prefect:getAccountRole
arguments:
name: Admin
# Read down the default Member Account Role
member:
fn::invoke:
function: prefect:getAccountRole
arguments:
name: Member
# Read down the default Owner Account Role
owner:
fn::invoke:
function: prefect:getAccountRole
arguments:
name: Owner
Using getAccountRole
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 getAccountRole(args: GetAccountRoleArgs, opts?: InvokeOptions): Promise<GetAccountRoleResult>
function getAccountRoleOutput(args: GetAccountRoleOutputArgs, opts?: InvokeOptions): Output<GetAccountRoleResult>def get_account_role(account_id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccountRoleResult
def get_account_role_output(account_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccountRoleResult]func GetAccountRole(ctx *Context, args *GetAccountRoleArgs, opts ...InvokeOption) (*GetAccountRoleResult, error)
func GetAccountRoleOutput(ctx *Context, args *GetAccountRoleOutputArgs, opts ...InvokeOption) GetAccountRoleResultOutput> Note: This function is named GetAccountRole in the Go SDK.
public static class GetAccountRole
{
public static Task<GetAccountRoleResult> InvokeAsync(GetAccountRoleArgs args, InvokeOptions? opts = null)
public static Output<GetAccountRoleResult> Invoke(GetAccountRoleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAccountRoleResult> getAccountRole(GetAccountRoleArgs args, InvokeOptions options)
public static Output<GetAccountRoleResult> getAccountRole(GetAccountRoleArgs args, InvokeOptions options)
fn::invoke:
function: prefect:index/getAccountRole:getAccountRole
arguments:
# arguments dictionaryThe following arguments are supported:
- name str
- Name of the Account Role
- account_
id str - Account ID (UUID) where the resource resides
getAccountRole Result
The following output properties are available:
- Created string
- Timestamp of when the resource was created (RFC3339)
- Id string
- Account Role ID (UUID)
- Is
System boolRole - Boolean specifying if the Account Role is a system role
- Name string
- Name of the Account Role
- Permissions List<string>
- List of permissions linked to the Account Role
- Updated string
- Timestamp of when the resource was updated (RFC3339)
- Account
Id string - Account ID (UUID) where the resource resides
- Created string
- Timestamp of when the resource was created (RFC3339)
- Id string
- Account Role ID (UUID)
- Is
System boolRole - Boolean specifying if the Account Role is a system role
- Name string
- Name of the Account Role
- Permissions []string
- List of permissions linked to the Account Role
- Updated string
- Timestamp of when the resource was updated (RFC3339)
- Account
Id string - Account ID (UUID) where the resource resides
- created String
- Timestamp of when the resource was created (RFC3339)
- id String
- Account Role ID (UUID)
- is
System BooleanRole - Boolean specifying if the Account Role is a system role
- name String
- Name of the Account Role
- permissions List<String>
- List of permissions linked to the Account Role
- updated String
- Timestamp of when the resource was updated (RFC3339)
- account
Id String - Account ID (UUID) where the resource resides
- created string
- Timestamp of when the resource was created (RFC3339)
- id string
- Account Role ID (UUID)
- is
System booleanRole - Boolean specifying if the Account Role is a system role
- name string
- Name of the Account Role
- permissions string[]
- List of permissions linked to the Account Role
- updated string
- Timestamp of when the resource was updated (RFC3339)
- account
Id string - Account ID (UUID) where the resource resides
- created str
- Timestamp of when the resource was created (RFC3339)
- id str
- Account Role ID (UUID)
- is_
system_ boolrole - Boolean specifying if the Account Role is a system role
- name str
- Name of the Account Role
- permissions Sequence[str]
- List of permissions linked to the Account Role
- updated str
- Timestamp of when the resource was updated (RFC3339)
- account_
id str - Account ID (UUID) where the resource resides
- created String
- Timestamp of when the resource was created (RFC3339)
- id String
- Account Role ID (UUID)
- is
System BooleanRole - Boolean specifying if the Account Role is a system role
- name String
- Name of the Account Role
- permissions List<String>
- List of permissions linked to the Account Role
- updated String
- Timestamp of when the resource was updated (RFC3339)
- account
Id String - Account ID (UUID) where the resource resides
Package Details
- Repository
- prefect prefecthq/terraform-provider-prefect
- License
- Notes
- This Pulumi package is based on the
prefectTerraform Provider.
prefect 2.90.1 published on Friday, Nov 14, 2025 by prefecthq
