1. Packages
  2. Prefect Provider
  3. API Docs
  4. BlockAccess
prefect 2.22.3 published on Thursday, Mar 20, 2025 by prefecthq

prefect.BlockAccess

Explore with Pulumi AI

prefect logo
prefect 2.22.3 published on Thursday, Mar 20, 2025 by prefecthq

    This resource manages access control to Blocks. Accessors can be Service Accounts, Users, or Teams. Accessors can be Managers or Viewers.

    All Actors/Teams must first be granted access to the Workspace where the Block resides.

    Leave fields empty to use the default access controls

    This feature is available in the following product plan(s): Prefect Cloud (Pro), Prefect Cloud (Enterprise).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as prefect from "@pulumi/prefect";
    
    const myWorkspace = prefect.getWorkspace({
        handle: "my-workspace",
    });
    const mySecret = new prefect.Block("mySecret", {
        typeSlug: "secret",
        data: JSON.stringify({
            value: "foobar",
        }),
        workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
    });
    const developer = prefect.getWorkspaceRole({
        name: "Developer",
    });
    // Example: invite a Service Account to the Workspace
    const bot = new prefect.ServiceAccount("bot", {});
    const botDeveloper = new prefect.WorkspaceAccess("botDeveloper", {
        accessorType: "SERVICE_ACCOUNT",
        accessorId: bot.id,
        workspaceRoleId: developer.then(developer => developer.id),
        workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
    });
    const user = prefect.getAccountMember({
        email: "user@prefect.io",
    });
    const userDeveloper = new prefect.WorkspaceAccess("userDeveloper", {
        accessorType: "USER",
        accessorId: user.then(user => user.userId),
        workspaceRoleId: developer.then(developer => developer.id),
        workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
    });
    const eng = prefect.getTeam({
        name: "my-team",
    });
    const teamDeveloper = new prefect.WorkspaceAccess("teamDeveloper", {
        accessorType: "TEAM",
        accessorId: eng.then(eng => eng.id),
        workspaceRoleId: developer.then(developer => developer.id),
        workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
    });
    // Grant all Actors/Teams the appropriate Manage or View access to the Block
    const customAccess = new prefect.BlockAccess("customAccess", {
        blockId: mySecret.id,
        manageActorIds: [bot.actorId],
        viewActorIds: [user.then(user => user.actorId)],
        manageTeamIds: [eng.then(eng => eng.id)],
        workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
    });
    // Optionally, leave all fields empty to use the default access controls
    const defaultAccess = new prefect.BlockAccess("defaultAccess", {
        blockId: mySecret.id,
        manageActorIds: [],
        viewActorIds: [],
        manageTeamIds: [],
        viewTeamIds: [],
        workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
    });
    
    import pulumi
    import json
    import pulumi_prefect as prefect
    
    my_workspace = prefect.get_workspace(handle="my-workspace")
    my_secret = prefect.Block("mySecret",
        type_slug="secret",
        data=json.dumps({
            "value": "foobar",
        }),
        workspace_id=my_workspace.id)
    developer = prefect.get_workspace_role(name="Developer")
    # Example: invite a Service Account to the Workspace
    bot = prefect.ServiceAccount("bot")
    bot_developer = prefect.WorkspaceAccess("botDeveloper",
        accessor_type="SERVICE_ACCOUNT",
        accessor_id=bot.id,
        workspace_role_id=developer.id,
        workspace_id=my_workspace.id)
    user = prefect.get_account_member(email="user@prefect.io")
    user_developer = prefect.WorkspaceAccess("userDeveloper",
        accessor_type="USER",
        accessor_id=user.user_id,
        workspace_role_id=developer.id,
        workspace_id=my_workspace.id)
    eng = prefect.get_team(name="my-team")
    team_developer = prefect.WorkspaceAccess("teamDeveloper",
        accessor_type="TEAM",
        accessor_id=eng.id,
        workspace_role_id=developer.id,
        workspace_id=my_workspace.id)
    # Grant all Actors/Teams the appropriate Manage or View access to the Block
    custom_access = prefect.BlockAccess("customAccess",
        block_id=my_secret.id,
        manage_actor_ids=[bot.actor_id],
        view_actor_ids=[user.actor_id],
        manage_team_ids=[eng.id],
        workspace_id=my_workspace.id)
    # Optionally, leave all fields empty to use the default access controls
    default_access = prefect.BlockAccess("defaultAccess",
        block_id=my_secret.id,
        manage_actor_ids=[],
        view_actor_ids=[],
        manage_team_ids=[],
        view_team_ids=[],
        workspace_id=my_workspace.id)
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		myWorkspace, err := prefect.LookupWorkspace(ctx, &prefect.LookupWorkspaceArgs{
    			Handle: pulumi.StringRef("my-workspace"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"value": "foobar",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		mySecret, err := prefect.NewBlock(ctx, "mySecret", &prefect.BlockArgs{
    			TypeSlug:    pulumi.String("secret"),
    			Data:        pulumi.String(json0),
    			WorkspaceId: pulumi.String(myWorkspace.Id),
    		})
    		if err != nil {
    			return err
    		}
    		developer, err := prefect.LookupWorkspaceRole(ctx, &prefect.LookupWorkspaceRoleArgs{
    			Name: "Developer",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Example: invite a Service Account to the Workspace
    		bot, err := prefect.NewServiceAccount(ctx, "bot", nil)
    		if err != nil {
    			return err
    		}
    		_, err = prefect.NewWorkspaceAccess(ctx, "botDeveloper", &prefect.WorkspaceAccessArgs{
    			AccessorType:    pulumi.String("SERVICE_ACCOUNT"),
    			AccessorId:      bot.ID(),
    			WorkspaceRoleId: pulumi.String(developer.Id),
    			WorkspaceId:     pulumi.String(myWorkspace.Id),
    		})
    		if err != nil {
    			return err
    		}
    		user, err := prefect.LookupAccountMember(ctx, &prefect.LookupAccountMemberArgs{
    			Email: "user@prefect.io",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = prefect.NewWorkspaceAccess(ctx, "userDeveloper", &prefect.WorkspaceAccessArgs{
    			AccessorType:    pulumi.String("USER"),
    			AccessorId:      pulumi.String(user.UserId),
    			WorkspaceRoleId: pulumi.String(developer.Id),
    			WorkspaceId:     pulumi.String(myWorkspace.Id),
    		})
    		if err != nil {
    			return err
    		}
    		eng, err := prefect.LookupTeam(ctx, &prefect.LookupTeamArgs{
    			Name: pulumi.StringRef("my-team"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = prefect.NewWorkspaceAccess(ctx, "teamDeveloper", &prefect.WorkspaceAccessArgs{
    			AccessorType:    pulumi.String("TEAM"),
    			AccessorId:      pulumi.String(eng.Id),
    			WorkspaceRoleId: pulumi.String(developer.Id),
    			WorkspaceId:     pulumi.String(myWorkspace.Id),
    		})
    		if err != nil {
    			return err
    		}
    		// Grant all Actors/Teams the appropriate Manage or View access to the Block
    		_, err = prefect.NewBlockAccess(ctx, "customAccess", &prefect.BlockAccessArgs{
    			BlockId: mySecret.ID(),
    			ManageActorIds: pulumi.StringArray{
    				bot.ActorId,
    			},
    			ViewActorIds: pulumi.StringArray{
    				pulumi.String(user.ActorId),
    			},
    			ManageTeamIds: pulumi.StringArray{
    				pulumi.String(eng.Id),
    			},
    			WorkspaceId: pulumi.String(myWorkspace.Id),
    		})
    		if err != nil {
    			return err
    		}
    		// Optionally, leave all fields empty to use the default access controls
    		_, err = prefect.NewBlockAccess(ctx, "defaultAccess", &prefect.BlockAccessArgs{
    			BlockId:        mySecret.ID(),
    			ManageActorIds: pulumi.StringArray{},
    			ViewActorIds:   pulumi.StringArray{},
    			ManageTeamIds:  pulumi.StringArray{},
    			ViewTeamIds:    pulumi.StringArray{},
    			WorkspaceId:    pulumi.String(myWorkspace.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Prefect = Pulumi.Prefect;
    
    return await Deployment.RunAsync(() => 
    {
        var myWorkspace = Prefect.GetWorkspace.Invoke(new()
        {
            Handle = "my-workspace",
        });
    
        var mySecret = new Prefect.Block("mySecret", new()
        {
            TypeSlug = "secret",
            Data = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["value"] = "foobar",
            }),
            WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
        });
    
        var developer = Prefect.GetWorkspaceRole.Invoke(new()
        {
            Name = "Developer",
        });
    
        // Example: invite a Service Account to the Workspace
        var bot = new Prefect.ServiceAccount("bot");
    
        var botDeveloper = new Prefect.WorkspaceAccess("botDeveloper", new()
        {
            AccessorType = "SERVICE_ACCOUNT",
            AccessorId = bot.Id,
            WorkspaceRoleId = developer.Apply(getWorkspaceRoleResult => getWorkspaceRoleResult.Id),
            WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
        });
    
        var user = Prefect.GetAccountMember.Invoke(new()
        {
            Email = "user@prefect.io",
        });
    
        var userDeveloper = new Prefect.WorkspaceAccess("userDeveloper", new()
        {
            AccessorType = "USER",
            AccessorId = user.Apply(getAccountMemberResult => getAccountMemberResult.UserId),
            WorkspaceRoleId = developer.Apply(getWorkspaceRoleResult => getWorkspaceRoleResult.Id),
            WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
        });
    
        var eng = Prefect.GetTeam.Invoke(new()
        {
            Name = "my-team",
        });
    
        var teamDeveloper = new Prefect.WorkspaceAccess("teamDeveloper", new()
        {
            AccessorType = "TEAM",
            AccessorId = eng.Apply(getTeamResult => getTeamResult.Id),
            WorkspaceRoleId = developer.Apply(getWorkspaceRoleResult => getWorkspaceRoleResult.Id),
            WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
        });
    
        // Grant all Actors/Teams the appropriate Manage or View access to the Block
        var customAccess = new Prefect.BlockAccess("customAccess", new()
        {
            BlockId = mySecret.Id,
            ManageActorIds = new[]
            {
                bot.ActorId,
            },
            ViewActorIds = new[]
            {
                user.Apply(getAccountMemberResult => getAccountMemberResult.ActorId),
            },
            ManageTeamIds = new[]
            {
                eng.Apply(getTeamResult => getTeamResult.Id),
            },
            WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
        });
    
        // Optionally, leave all fields empty to use the default access controls
        var defaultAccess = new Prefect.BlockAccess("defaultAccess", new()
        {
            BlockId = mySecret.Id,
            ManageActorIds = new[] {},
            ViewActorIds = new[] {},
            ManageTeamIds = new[] {},
            ViewTeamIds = new[] {},
            WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
        });
    
    });
    
    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.GetWorkspaceArgs;
    import com.pulumi.prefect.Block;
    import com.pulumi.prefect.BlockArgs;
    import com.pulumi.prefect.inputs.GetWorkspaceRoleArgs;
    import com.pulumi.prefect.ServiceAccount;
    import com.pulumi.prefect.WorkspaceAccess;
    import com.pulumi.prefect.WorkspaceAccessArgs;
    import com.pulumi.prefect.inputs.GetAccountMemberArgs;
    import com.pulumi.prefect.inputs.GetTeamArgs;
    import com.pulumi.prefect.BlockAccess;
    import com.pulumi.prefect.BlockAccessArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            final var myWorkspace = PrefectFunctions.getWorkspace(GetWorkspaceArgs.builder()
                .handle("my-workspace")
                .build());
    
            var mySecret = new Block("mySecret", BlockArgs.builder()
                .typeSlug("secret")
                .data(serializeJson(
                    jsonObject(
                        jsonProperty("value", "foobar")
                    )))
                .workspaceId(myWorkspace.applyValue(getWorkspaceResult -> getWorkspaceResult.id()))
                .build());
    
            final var developer = PrefectFunctions.getWorkspaceRole(GetWorkspaceRoleArgs.builder()
                .name("Developer")
                .build());
    
            // Example: invite a Service Account to the Workspace
            var bot = new ServiceAccount("bot");
    
            var botDeveloper = new WorkspaceAccess("botDeveloper", WorkspaceAccessArgs.builder()
                .accessorType("SERVICE_ACCOUNT")
                .accessorId(bot.id())
                .workspaceRoleId(developer.applyValue(getWorkspaceRoleResult -> getWorkspaceRoleResult.id()))
                .workspaceId(myWorkspace.applyValue(getWorkspaceResult -> getWorkspaceResult.id()))
                .build());
    
            final var user = PrefectFunctions.getAccountMember(GetAccountMemberArgs.builder()
                .email("user@prefect.io")
                .build());
    
            var userDeveloper = new WorkspaceAccess("userDeveloper", WorkspaceAccessArgs.builder()
                .accessorType("USER")
                .accessorId(user.applyValue(getAccountMemberResult -> getAccountMemberResult.userId()))
                .workspaceRoleId(developer.applyValue(getWorkspaceRoleResult -> getWorkspaceRoleResult.id()))
                .workspaceId(myWorkspace.applyValue(getWorkspaceResult -> getWorkspaceResult.id()))
                .build());
    
            final var eng = PrefectFunctions.getTeam(GetTeamArgs.builder()
                .name("my-team")
                .build());
    
            var teamDeveloper = new WorkspaceAccess("teamDeveloper", WorkspaceAccessArgs.builder()
                .accessorType("TEAM")
                .accessorId(eng.applyValue(getTeamResult -> getTeamResult.id()))
                .workspaceRoleId(developer.applyValue(getWorkspaceRoleResult -> getWorkspaceRoleResult.id()))
                .workspaceId(myWorkspace.applyValue(getWorkspaceResult -> getWorkspaceResult.id()))
                .build());
    
            // Grant all Actors/Teams the appropriate Manage or View access to the Block
            var customAccess = new BlockAccess("customAccess", BlockAccessArgs.builder()
                .blockId(mySecret.id())
                .manageActorIds(bot.actorId())
                .viewActorIds(user.applyValue(getAccountMemberResult -> getAccountMemberResult.actorId()))
                .manageTeamIds(eng.applyValue(getTeamResult -> getTeamResult.id()))
                .workspaceId(myWorkspace.applyValue(getWorkspaceResult -> getWorkspaceResult.id()))
                .build());
    
            // Optionally, leave all fields empty to use the default access controls
            var defaultAccess = new BlockAccess("defaultAccess", BlockAccessArgs.builder()
                .blockId(mySecret.id())
                .manageActorIds()
                .viewActorIds()
                .manageTeamIds()
                .viewTeamIds()
                .workspaceId(myWorkspace.applyValue(getWorkspaceResult -> getWorkspaceResult.id()))
                .build());
    
        }
    }
    
    resources:
      mySecret:
        type: prefect:Block
        properties:
          typeSlug: secret
          data:
            fn::toJSON:
              value: foobar
          workspaceId: ${myWorkspace.id}
      # Example: invite a Service Account to the Workspace
      bot:
        type: prefect:ServiceAccount
      botDeveloper:
        type: prefect:WorkspaceAccess
        properties:
          accessorType: SERVICE_ACCOUNT
          accessorId: ${bot.id}
          workspaceRoleId: ${developer.id}
          workspaceId: ${myWorkspace.id}
      userDeveloper:
        type: prefect:WorkspaceAccess
        properties:
          accessorType: USER
          accessorId: ${user.userId}
          workspaceRoleId: ${developer.id}
          workspaceId: ${myWorkspace.id}
      teamDeveloper:
        type: prefect:WorkspaceAccess
        properties:
          accessorType: TEAM
          accessorId: ${eng.id}
          workspaceRoleId: ${developer.id}
          workspaceId: ${myWorkspace.id}
      # Grant all Actors/Teams the appropriate Manage or View access to the Block
      customAccess:
        type: prefect:BlockAccess
        properties:
          blockId: ${mySecret.id}
          manageActorIds:
            - ${bot.actorId}
          viewActorIds:
            - ${user.actorId}
          manageTeamIds:
            - ${eng.id}
          workspaceId: ${myWorkspace.id}
      # Optionally, leave all fields empty to use the default access controls
      defaultAccess:
        type: prefect:BlockAccess
        properties:
          blockId: ${mySecret.id}
          manageActorIds: []
          viewActorIds: []
          manageTeamIds: []
          viewTeamIds: []
          workspaceId: ${myWorkspace.id}
    variables:
      myWorkspace:
        fn::invoke:
          function: prefect:getWorkspace
          arguments:
            handle: my-workspace
      developer:
        fn::invoke:
          function: prefect:getWorkspaceRole
          arguments:
            name: Developer
      user:
        fn::invoke:
          function: prefect:getAccountMember
          arguments:
            email: user@prefect.io
      eng:
        fn::invoke:
          function: prefect:getTeam
          arguments:
            name: my-team
    

    Create BlockAccess Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BlockAccess(name: string, args: BlockAccessArgs, opts?: CustomResourceOptions);
    @overload
    def BlockAccess(resource_name: str,
                    args: BlockAccessArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def BlockAccess(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    block_id: Optional[str] = None,
                    account_id: Optional[str] = None,
                    manage_actor_ids: Optional[Sequence[str]] = None,
                    manage_team_ids: Optional[Sequence[str]] = None,
                    view_actor_ids: Optional[Sequence[str]] = None,
                    view_team_ids: Optional[Sequence[str]] = None,
                    workspace_id: Optional[str] = None)
    func NewBlockAccess(ctx *Context, name string, args BlockAccessArgs, opts ...ResourceOption) (*BlockAccess, error)
    public BlockAccess(string name, BlockAccessArgs args, CustomResourceOptions? opts = null)
    public BlockAccess(String name, BlockAccessArgs args)
    public BlockAccess(String name, BlockAccessArgs args, CustomResourceOptions options)
    
    type: prefect:BlockAccess
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BlockAccessArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BlockAccessArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BlockAccessArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BlockAccessArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BlockAccessArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var blockAccessResource = new Prefect.BlockAccess("blockAccessResource", new()
    {
        BlockId = "string",
        AccountId = "string",
        ManageActorIds = new[]
        {
            "string",
        },
        ManageTeamIds = new[]
        {
            "string",
        },
        ViewActorIds = new[]
        {
            "string",
        },
        ViewTeamIds = new[]
        {
            "string",
        },
        WorkspaceId = "string",
    });
    
    example, err := prefect.NewBlockAccess(ctx, "blockAccessResource", &prefect.BlockAccessArgs{
    BlockId: pulumi.String("string"),
    AccountId: pulumi.String("string"),
    ManageActorIds: pulumi.StringArray{
    pulumi.String("string"),
    },
    ManageTeamIds: pulumi.StringArray{
    pulumi.String("string"),
    },
    ViewActorIds: pulumi.StringArray{
    pulumi.String("string"),
    },
    ViewTeamIds: pulumi.StringArray{
    pulumi.String("string"),
    },
    WorkspaceId: pulumi.String("string"),
    })
    
    var blockAccessResource = new BlockAccess("blockAccessResource", BlockAccessArgs.builder()
        .blockId("string")
        .accountId("string")
        .manageActorIds("string")
        .manageTeamIds("string")
        .viewActorIds("string")
        .viewTeamIds("string")
        .workspaceId("string")
        .build());
    
    block_access_resource = prefect.BlockAccess("blockAccessResource",
        block_id="string",
        account_id="string",
        manage_actor_ids=["string"],
        manage_team_ids=["string"],
        view_actor_ids=["string"],
        view_team_ids=["string"],
        workspace_id="string")
    
    const blockAccessResource = new prefect.BlockAccess("blockAccessResource", {
        blockId: "string",
        accountId: "string",
        manageActorIds: ["string"],
        manageTeamIds: ["string"],
        viewActorIds: ["string"],
        viewTeamIds: ["string"],
        workspaceId: "string",
    });
    
    type: prefect:BlockAccess
    properties:
        accountId: string
        blockId: string
        manageActorIds:
            - string
        manageTeamIds:
            - string
        viewActorIds:
            - string
        viewTeamIds:
            - string
        workspaceId: string
    

    BlockAccess Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BlockAccess resource accepts the following input properties:

    BlockId string
    Block ID (UUID)
    AccountId string
    Account ID (UUID) where the Block is located
    ManageActorIds List<string>
    List of actor IDs with manage access to the Block
    ManageTeamIds List<string>
    List of team IDs with manage access to the Block
    ViewActorIds List<string>
    List of actor IDs with view access to the Block
    ViewTeamIds List<string>
    List of team IDs with view access to the Block
    WorkspaceId string
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    BlockId string
    Block ID (UUID)
    AccountId string
    Account ID (UUID) where the Block is located
    ManageActorIds []string
    List of actor IDs with manage access to the Block
    ManageTeamIds []string
    List of team IDs with manage access to the Block
    ViewActorIds []string
    List of actor IDs with view access to the Block
    ViewTeamIds []string
    List of team IDs with view access to the Block
    WorkspaceId string
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    blockId String
    Block ID (UUID)
    accountId String
    Account ID (UUID) where the Block is located
    manageActorIds List<String>
    List of actor IDs with manage access to the Block
    manageTeamIds List<String>
    List of team IDs with manage access to the Block
    viewActorIds List<String>
    List of actor IDs with view access to the Block
    viewTeamIds List<String>
    List of team IDs with view access to the Block
    workspaceId String
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    blockId string
    Block ID (UUID)
    accountId string
    Account ID (UUID) where the Block is located
    manageActorIds string[]
    List of actor IDs with manage access to the Block
    manageTeamIds string[]
    List of team IDs with manage access to the Block
    viewActorIds string[]
    List of actor IDs with view access to the Block
    viewTeamIds string[]
    List of team IDs with view access to the Block
    workspaceId string
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    block_id str
    Block ID (UUID)
    account_id str
    Account ID (UUID) where the Block is located
    manage_actor_ids Sequence[str]
    List of actor IDs with manage access to the Block
    manage_team_ids Sequence[str]
    List of team IDs with manage access to the Block
    view_actor_ids Sequence[str]
    List of actor IDs with view access to the Block
    view_team_ids Sequence[str]
    List of team IDs with view access to the Block
    workspace_id str
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    blockId String
    Block ID (UUID)
    accountId String
    Account ID (UUID) where the Block is located
    manageActorIds List<String>
    List of actor IDs with manage access to the Block
    manageTeamIds List<String>
    List of team IDs with manage access to the Block
    viewActorIds List<String>
    List of actor IDs with view access to the Block
    viewTeamIds List<String>
    List of team IDs with view access to the Block
    workspaceId String
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BlockAccess resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BlockAccess Resource

    Get an existing BlockAccess resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BlockAccessState, opts?: CustomResourceOptions): BlockAccess
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            block_id: Optional[str] = None,
            manage_actor_ids: Optional[Sequence[str]] = None,
            manage_team_ids: Optional[Sequence[str]] = None,
            view_actor_ids: Optional[Sequence[str]] = None,
            view_team_ids: Optional[Sequence[str]] = None,
            workspace_id: Optional[str] = None) -> BlockAccess
    func GetBlockAccess(ctx *Context, name string, id IDInput, state *BlockAccessState, opts ...ResourceOption) (*BlockAccess, error)
    public static BlockAccess Get(string name, Input<string> id, BlockAccessState? state, CustomResourceOptions? opts = null)
    public static BlockAccess get(String name, Output<String> id, BlockAccessState state, CustomResourceOptions options)
    resources:  _:    type: prefect:BlockAccess    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    Account ID (UUID) where the Block is located
    BlockId string
    Block ID (UUID)
    ManageActorIds List<string>
    List of actor IDs with manage access to the Block
    ManageTeamIds List<string>
    List of team IDs with manage access to the Block
    ViewActorIds List<string>
    List of actor IDs with view access to the Block
    ViewTeamIds List<string>
    List of team IDs with view access to the Block
    WorkspaceId string
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    AccountId string
    Account ID (UUID) where the Block is located
    BlockId string
    Block ID (UUID)
    ManageActorIds []string
    List of actor IDs with manage access to the Block
    ManageTeamIds []string
    List of team IDs with manage access to the Block
    ViewActorIds []string
    List of actor IDs with view access to the Block
    ViewTeamIds []string
    List of team IDs with view access to the Block
    WorkspaceId string
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    accountId String
    Account ID (UUID) where the Block is located
    blockId String
    Block ID (UUID)
    manageActorIds List<String>
    List of actor IDs with manage access to the Block
    manageTeamIds List<String>
    List of team IDs with manage access to the Block
    viewActorIds List<String>
    List of actor IDs with view access to the Block
    viewTeamIds List<String>
    List of team IDs with view access to the Block
    workspaceId String
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    accountId string
    Account ID (UUID) where the Block is located
    blockId string
    Block ID (UUID)
    manageActorIds string[]
    List of actor IDs with manage access to the Block
    manageTeamIds string[]
    List of team IDs with manage access to the Block
    viewActorIds string[]
    List of actor IDs with view access to the Block
    viewTeamIds string[]
    List of team IDs with view access to the Block
    workspaceId string
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    account_id str
    Account ID (UUID) where the Block is located
    block_id str
    Block ID (UUID)
    manage_actor_ids Sequence[str]
    List of actor IDs with manage access to the Block
    manage_team_ids Sequence[str]
    List of team IDs with manage access to the Block
    view_actor_ids Sequence[str]
    List of actor IDs with view access to the Block
    view_team_ids Sequence[str]
    List of team IDs with view access to the Block
    workspace_id str
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.
    accountId String
    Account ID (UUID) where the Block is located
    blockId String
    Block ID (UUID)
    manageActorIds List<String>
    List of actor IDs with manage access to the Block
    manageTeamIds List<String>
    List of team IDs with manage access to the Block
    viewActorIds List<String>
    List of actor IDs with view access to the Block
    viewTeamIds List<String>
    List of team IDs with view access to the Block
    workspaceId String
    Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the prefect.BlockAccess resource or the provider's workspace_id must be set.

    Package Details

    Repository
    prefect prefecthq/terraform-provider-prefect
    License
    Notes
    This Pulumi package is based on the prefect Terraform Provider.
    prefect logo
    prefect 2.22.3 published on Thursday, Mar 20, 2025 by prefecthq