PrefectHQ / terraform-provider-prefect

Terraform Provider for Prefect Cloud
https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs
Apache License 2.0
29 stars 13 forks source link

Error when attempting to create `prefect_workspace_role`, description is required #112

Closed jamiezieziula closed 8 months ago

jamiezieziula commented 8 months ago

When attempting to create a workspace role with the following configuration, I receive an error indicating that a description is a required parameter for the request, but the documentation lists it as optional (also in the UI it is optional)

resource "prefect_workspace_role" "example" {
  name = "Custom Workspace Role"
  scopes = [
    "manage_blocks",
    "see_flows"
  ]
}
│ Error: Error creating Workspace Role
│ 
│   with prefect_workspace_role.example,
│   on main.tf line 18, in resource "prefect_workspace_role" "example":
│   18: resource "prefect_workspace_role" "example" {
│ 
│ Could not create Workspace Role, unexpected error: status code 422 Unprocessable Entity, error={"exception_message":"Invalid request
│ received.","exception_detail":[{"loc":["body","description"],"msg":"none is not an allowed
│ value","type":"type_error.none.not_allowed"}],"request_body":{"name":"Custom Workspace
│ Role","description":null,"scopes":["manage_blocks","see_flows"],"inherited_role_id":null}}