-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add workspace_role
resource
#70
Conversation
@@ -19,7 +19,6 @@ type WorkspaceRole struct { | |||
BaseModel | |||
Name string `json:"name"` | |||
Description *string `json:"description"` | |||
Permissions []string `json:"permissions"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
permissions
are a deprecated version of scopes
, and can be removed here
model.AccountID = customtypes.NewUUIDPointerValue(role.AccountID) | ||
model.InheritedRoleID = customtypes.NewUUIDPointerValue(role.InheritedRoleID) | ||
|
||
// NOTE: here, we'll omit updating the TF state with the scopes returned from the API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's say a practitioner configures a manage_work_pools
scope in terraform. Prefect Cloud will create the role + automatically add subordinate scopes, like see_work_pools
and write_work_pools
. This will always cause a conflict on apply, as the practitioner will only have defined manage_work_pools
in this case, it's ok to hold onto the user-defined parameters only, as they'll more like request inputs vs. a full declarative reflection of the scopes assigned to this role
@@ -0,0 +1,63 @@ | |||
package resources_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noting that these tests are not yet configured to run in GHA, as there's some extra setup we'll need to do around configuring the test provider to properly inherit env vars. we'll also want to define a precheck function, which testcases can hook into to ensure all the necessary parameters exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz teach me Go one day
resolves #40