# Copy-paste your Terraform configurations here.
#
# For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file.
# For security, you can also encrypt the files using our GPG public key:
# https://www.hashicorp.com/security
#
# If reproducing the bug involves modifying the config file (e.g., apply a config,
# change a value, apply the config again, see the bug), then please include both:
# * the version of the config before the change, and
# * the version of the config after the change.
# Read down a default Workspace Role (or create your own)
data "prefect_workspace_role" "developer" {
name = "Developer"
}
# Assign the Workspace Role to the Team
resource "prefect_workspace_access" "team_developer" {
accessor_type = "TEAM"
accessor_id = "43ff886e-1870-4068-9ed8-842ec9e44ef4"
workspace_id = "f579e720-7969-4ab8-93b7-2dfa784903e6"
workspace_role_id = data.prefect_workspace_role.developer.id
}
Community Note
Terraform Version
Affected Resource(s)
prefect_workspace_access - https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs/resources/workspace_access
Terraform Configuration Files
Debug Output
https://gist.github.com/robfreedy/dca030736415aa6807bde311a10cf84c
Panic Output
Expected Behavior
Team should be given access to a particular workspace given Team ID, Workspace ID, Account ID, and Role ID
Actual Behavior
405 Method Not Allowed
Steps to Reproduce
terraform apply
Important Factoids
References
In the resource docs for this resource, there is no mention of a team_id for the accessor_id parameter
https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs/resources/workspace_access#schema
0000