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): Pro, Enterprise.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as prefect from "@pulumi/prefect";
// All Blocks are scoped to a Workspace
const myWorkspace = prefect.getWorkspace({
handle: "my-workspace",
});
const mySecret = new prefect.Block("my_secret", {
name: "my-secret",
typeSlug: "secret",
data: JSON.stringify({
value: "foobar",
}),
workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
});
// Be sure to grant all Actors/Teams who need Block access
// to first be invited to the Workspace (with a role).
const developer = prefect.getWorkspaceRole({
name: "Developer",
});
// Example: invite a Service Account to the Workspace
const bot = new prefect.ServiceAccount("bot", {name: "bot"});
const botDeveloper = new prefect.WorkspaceAccess("bot_developer", {
accessorType: "SERVICE_ACCOUNT",
accessorId: bot.id,
workspaceRoleId: developer.then(developer => developer.id),
workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
});
// Example: invite a User to the Workspace
const user = prefect.getAccountMember({
email: "user@prefect.io",
});
const userDeveloper = new prefect.WorkspaceAccess("user_developer", {
accessorType: "USER",
accessorId: user.then(user => user.userId),
workspaceRoleId: developer.then(developer => developer.id),
workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
});
// Example: invite a Team to the Workspace
const eng = prefect.getTeam({
name: "my-team",
});
const teamDeveloper = new prefect.WorkspaceAccess("team_developer", {
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("custom_access", {
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("default_access", {
blockId: mySecret.id,
manageActorIds: [],
viewActorIds: [],
manageTeamIds: [],
viewTeamIds: [],
workspaceId: myWorkspace.then(myWorkspace => myWorkspace.id),
});
import pulumi
import json
import pulumi_prefect as prefect
# All Blocks are scoped to a Workspace
my_workspace = prefect.get_workspace(handle="my-workspace")
my_secret = prefect.Block("my_secret",
name="my-secret",
type_slug="secret",
data=json.dumps({
"value": "foobar",
}),
workspace_id=my_workspace.id)
# Be sure to grant all Actors/Teams who need Block access
# to first be invited to the Workspace (with a role).
developer = prefect.get_workspace_role(name="Developer")
# Example: invite a Service Account to the Workspace
bot = prefect.ServiceAccount("bot", name="bot")
bot_developer = prefect.WorkspaceAccess("bot_developer",
accessor_type="SERVICE_ACCOUNT",
accessor_id=bot.id,
workspace_role_id=developer.id,
workspace_id=my_workspace.id)
# Example: invite a User to the Workspace
user = prefect.get_account_member(email="user@prefect.io")
user_developer = prefect.WorkspaceAccess("user_developer",
accessor_type="USER",
accessor_id=user.user_id,
workspace_role_id=developer.id,
workspace_id=my_workspace.id)
# Example: invite a Team to the Workspace
eng = prefect.get_team(name="my-team")
team_developer = prefect.WorkspaceAccess("team_developer",
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("custom_access",
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("default_access",
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 {
// All Blocks are scoped to a Workspace
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, "my_secret", &prefect.BlockArgs{
Name: pulumi.String("my-secret"),
TypeSlug: pulumi.String("secret"),
Data: pulumi.String(json0),
WorkspaceId: pulumi.String(myWorkspace.Id),
})
if err != nil {
return err
}
// Be sure to grant all Actors/Teams who need Block access
// to first be invited to the Workspace (with a role).
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", &prefect.ServiceAccountArgs{
Name: pulumi.String("bot"),
})
if err != nil {
return err
}
_, err = prefect.NewWorkspaceAccess(ctx, "bot_developer", &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
}
// Example: invite a User to the Workspace
user, err := prefect.LookupAccountMember(ctx, &prefect.LookupAccountMemberArgs{
Email: "user@prefect.io",
}, nil)
if err != nil {
return err
}
_, err = prefect.NewWorkspaceAccess(ctx, "user_developer", &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
}
// Example: invite a Team to the Workspace
eng, err := prefect.LookupTeam(ctx, &prefect.LookupTeamArgs{
Name: pulumi.StringRef("my-team"),
}, nil)
if err != nil {
return err
}
_, err = prefect.NewWorkspaceAccess(ctx, "team_developer", &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, "custom_access", &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, "default_access", &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(() =>
{
// All Blocks are scoped to a Workspace
var myWorkspace = Prefect.GetWorkspace.Invoke(new()
{
Handle = "my-workspace",
});
var mySecret = new Prefect.Block("my_secret", new()
{
Name = "my-secret",
TypeSlug = "secret",
Data = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["value"] = "foobar",
}),
WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
});
// Be sure to grant all Actors/Teams who need Block access
// to first be invited to the Workspace (with a role).
var developer = Prefect.GetWorkspaceRole.Invoke(new()
{
Name = "Developer",
});
// Example: invite a Service Account to the Workspace
var bot = new Prefect.ServiceAccount("bot", new()
{
Name = "bot",
});
var botDeveloper = new Prefect.WorkspaceAccess("bot_developer", new()
{
AccessorType = "SERVICE_ACCOUNT",
AccessorId = bot.Id,
WorkspaceRoleId = developer.Apply(getWorkspaceRoleResult => getWorkspaceRoleResult.Id),
WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
});
// Example: invite a User to the Workspace
var user = Prefect.GetAccountMember.Invoke(new()
{
Email = "user@prefect.io",
});
var userDeveloper = new Prefect.WorkspaceAccess("user_developer", new()
{
AccessorType = "USER",
AccessorId = user.Apply(getAccountMemberResult => getAccountMemberResult.UserId),
WorkspaceRoleId = developer.Apply(getWorkspaceRoleResult => getWorkspaceRoleResult.Id),
WorkspaceId = myWorkspace.Apply(getWorkspaceResult => getWorkspaceResult.Id),
});
// Example: invite a Team to the Workspace
var eng = Prefect.GetTeam.Invoke(new()
{
Name = "my-team",
});
var teamDeveloper = new Prefect.WorkspaceAccess("team_developer", 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("custom_access", 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("default_access", 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.ServiceAccountArgs;
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) {
// All Blocks are scoped to a Workspace
final var myWorkspace = PrefectFunctions.getWorkspace(GetWorkspaceArgs.builder()
.handle("my-workspace")
.build());
var mySecret = new Block("mySecret", BlockArgs.builder()
.name("my-secret")
.typeSlug("secret")
.data(serializeJson(
jsonObject(
jsonProperty("value", "foobar")
)))
.workspaceId(myWorkspace.id())
.build());
// Be sure to grant all Actors/Teams who need Block access
// to first be invited to the Workspace (with a role).
final var developer = PrefectFunctions.getWorkspaceRole(GetWorkspaceRoleArgs.builder()
.name("Developer")
.build());
// Example: invite a Service Account to the Workspace
var bot = new ServiceAccount("bot", ServiceAccountArgs.builder()
.name("bot")
.build());
var botDeveloper = new WorkspaceAccess("botDeveloper", WorkspaceAccessArgs.builder()
.accessorType("SERVICE_ACCOUNT")
.accessorId(bot.id())
.workspaceRoleId(developer.id())
.workspaceId(myWorkspace.id())
.build());
// Example: invite a User to the Workspace
final var user = PrefectFunctions.getAccountMember(GetAccountMemberArgs.builder()
.email("user@prefect.io")
.build());
var userDeveloper = new WorkspaceAccess("userDeveloper", WorkspaceAccessArgs.builder()
.accessorType("USER")
.accessorId(user.userId())
.workspaceRoleId(developer.id())
.workspaceId(myWorkspace.id())
.build());
// Example: invite a Team to the Workspace
final var eng = PrefectFunctions.getTeam(GetTeamArgs.builder()
.name("my-team")
.build());
var teamDeveloper = new WorkspaceAccess("teamDeveloper", WorkspaceAccessArgs.builder()
.accessorType("TEAM")
.accessorId(eng.id())
.workspaceRoleId(developer.id())
.workspaceId(myWorkspace.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.actorId())
.manageTeamIds(eng.id())
.workspaceId(myWorkspace.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.id())
.build());
}
}
resources:
mySecret:
type: prefect:Block
name: my_secret
properties:
name: my-secret
typeSlug: secret
data:
fn::toJSON:
value: foobar
workspaceId: ${myWorkspace.id}
# Example: invite a Service Account to the Workspace
bot:
type: prefect:ServiceAccount
properties:
name: bot
botDeveloper:
type: prefect:WorkspaceAccess
name: bot_developer
properties:
accessorType: SERVICE_ACCOUNT
accessorId: ${bot.id}
workspaceRoleId: ${developer.id}
workspaceId: ${myWorkspace.id}
userDeveloper:
type: prefect:WorkspaceAccess
name: user_developer
properties:
accessorType: USER
accessorId: ${user.userId}
workspaceRoleId: ${developer.id}
workspaceId: ${myWorkspace.id}
teamDeveloper:
type: prefect:WorkspaceAccess
name: team_developer
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
name: custom_access
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
name: default_access
properties:
blockId: ${mySecret.id}
manageActorIds: []
viewActorIds: []
manageTeamIds: []
viewTeamIds: []
workspaceId: ${myWorkspace.id}
variables:
# All Blocks are scoped to a Workspace
myWorkspace:
fn::invoke:
function: prefect:getWorkspace
arguments:
handle: my-workspace
# Be sure to grant all Actors/Teams who need Block access
# to first be invited to the Workspace (with a role).
developer:
fn::invoke:
function: prefect:getWorkspaceRole
arguments:
name: Developer
# Example: invite a User to the Workspace
user:
fn::invoke:
function: prefect:getAccountMember
arguments:
email: user@prefect.io
# Example: invite a Team to the Workspace
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:
- Block
Id string - Block ID (UUID)
- Account
Id string - Account ID (UUID) where the Block is located
- Manage
Actor List<string>Ids - List of actor IDs with manage access to the Block
- Manage
Team List<string>Ids - List of team IDs with manage access to the Block
- View
Actor List<string>Ids - List of actor IDs with view access to the Block
- View
Team List<string>Ids - List of team IDs with view access to the Block
- Workspace
Id string - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
- Block
Id string - Block ID (UUID)
- Account
Id string - Account ID (UUID) where the Block is located
- Manage
Actor []stringIds - List of actor IDs with manage access to the Block
- Manage
Team []stringIds - List of team IDs with manage access to the Block
- View
Actor []stringIds - List of actor IDs with view access to the Block
- View
Team []stringIds - List of team IDs with view access to the Block
- Workspace
Id string - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
- block
Id String - Block ID (UUID)
- account
Id String - Account ID (UUID) where the Block is located
- manage
Actor List<String>Ids - List of actor IDs with manage access to the Block
- manage
Team List<String>Ids - List of team IDs with manage access to the Block
- view
Actor List<String>Ids - List of actor IDs with view access to the Block
- view
Team List<String>Ids - List of team IDs with view access to the Block
- workspace
Id String - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
- block
Id string - Block ID (UUID)
- account
Id string - Account ID (UUID) where the Block is located
- manage
Actor string[]Ids - List of actor IDs with manage access to the Block
- manage
Team string[]Ids - List of team IDs with manage access to the Block
- view
Actor string[]Ids - List of actor IDs with view access to the Block
- view
Team string[]Ids - List of team IDs with view access to the Block
- workspace
Id string - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
- block_
id str - Block ID (UUID)
- account_
id str - Account ID (UUID) where the Block is located
- manage_
actor_ Sequence[str]ids - List of actor IDs with manage access to the Block
- manage_
team_ Sequence[str]ids - List of team IDs with manage access to the Block
- view_
actor_ Sequence[str]ids - List of actor IDs with view access to the Block
- view_
team_ Sequence[str]ids - 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.BlockAccessresource or the provider'sworkspace_idmust be set.
- block
Id String - Block ID (UUID)
- account
Id String - Account ID (UUID) where the Block is located
- manage
Actor List<String>Ids - List of actor IDs with manage access to the Block
- manage
Team List<String>Ids - List of team IDs with manage access to the Block
- view
Actor List<String>Ids - List of actor IDs with view access to the Block
- view
Team List<String>Ids - List of team IDs with view access to the Block
- workspace
Id String - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust 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) -> BlockAccessfunc 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.
- Account
Id string - Account ID (UUID) where the Block is located
- Block
Id string - Block ID (UUID)
- Manage
Actor List<string>Ids - List of actor IDs with manage access to the Block
- Manage
Team List<string>Ids - List of team IDs with manage access to the Block
- View
Actor List<string>Ids - List of actor IDs with view access to the Block
- View
Team List<string>Ids - List of team IDs with view access to the Block
- Workspace
Id string - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
- Account
Id string - Account ID (UUID) where the Block is located
- Block
Id string - Block ID (UUID)
- Manage
Actor []stringIds - List of actor IDs with manage access to the Block
- Manage
Team []stringIds - List of team IDs with manage access to the Block
- View
Actor []stringIds - List of actor IDs with view access to the Block
- View
Team []stringIds - List of team IDs with view access to the Block
- Workspace
Id string - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
- account
Id String - Account ID (UUID) where the Block is located
- block
Id String - Block ID (UUID)
- manage
Actor List<String>Ids - List of actor IDs with manage access to the Block
- manage
Team List<String>Ids - List of team IDs with manage access to the Block
- view
Actor List<String>Ids - List of actor IDs with view access to the Block
- view
Team List<String>Ids - List of team IDs with view access to the Block
- workspace
Id String - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
- account
Id string - Account ID (UUID) where the Block is located
- block
Id string - Block ID (UUID)
- manage
Actor string[]Ids - List of actor IDs with manage access to the Block
- manage
Team string[]Ids - List of team IDs with manage access to the Block
- view
Actor string[]Ids - List of actor IDs with view access to the Block
- view
Team string[]Ids - List of team IDs with view access to the Block
- workspace
Id string - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
- account_
id str - Account ID (UUID) where the Block is located
- block_
id str - Block ID (UUID)
- manage_
actor_ Sequence[str]ids - List of actor IDs with manage access to the Block
- manage_
team_ Sequence[str]ids - List of team IDs with manage access to the Block
- view_
actor_ Sequence[str]ids - List of actor IDs with view access to the Block
- view_
team_ Sequence[str]ids - 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.BlockAccessresource or the provider'sworkspace_idmust be set.
- account
Id String - Account ID (UUID) where the Block is located
- block
Id String - Block ID (UUID)
- manage
Actor List<String>Ids - List of actor IDs with manage access to the Block
- manage
Team List<String>Ids - List of team IDs with manage access to the Block
- view
Actor List<String>Ids - List of actor IDs with view access to the Block
- view
Team List<String>Ids - List of team IDs with view access to the Block
- workspace
Id String - Workspace ID (UUID) where the Block is located. In Prefect Cloud, either the
prefect.BlockAccessresource or the provider'sworkspace_idmust be set.
Package Details
- Repository
- prefect prefecthq/terraform-provider-prefect
- License
- Notes
- This Pulumi package is based on the
prefectTerraform Provider.
