Skip to content
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(work pools): support work pool access #389

Merged
merged 4 commits into from
Feb 28, 2025
Merged

Conversation

mitchnielsen
Copy link
Contributor

@mitchnielsen mitchnielsen commented Feb 27, 2025

Summary

Similar to deployment_access and workspace_access, adds work_pool_access resource to manage access to work pools.

API docs

Closes #366

Closes https://linear.app/prefect/issue/PLA-985/add-support-for-work-pool-access

Summary

Requirements

General

  • The contributing guide has been read
  • Title follows the conventional commits format
  • Body includes Closes <issue>, if available
  • Relevant labels have been added
  • Draft status is used until ready for review

Code-level changes

  • Unit tests are added/updated
  • Acceptance tests are added/updated (including import tests, when needed)

New or updated resource/datasource

  • Documentation is added (generated by make docs from source code)
    - When applicable, provide a link back to the relevant page in the Prefect documentation site.
  • For resources, the following are added:
    - Resource example under examples/resources/prefect_<name>/resource.tf
    - Import example under examples/resources/prefect_<name>/import.sh (I noticed we don't have imports for deployment_access or workspace_access, so assuming that was intentional for now - but in the future we can add this if it makes sense)
  • For datasources, the following is added:
    - Datasource example under examples/data-sources,resources>/prefect_<name>/data-source.tf

Similar to deployment_access and workspace_access, adds work_pool_access
resource to manage access to work pools.

Closes #366

Closes https://linear.app/prefect/issue/PLA-985/add-support-for-work-pool-access
Required: true,
Description: "The name of the Work Pool",
},
"manage_actor_ids": schema.ListAttribute{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all repeated from deployment_access and workspace_access. We can de-duplicate a lot of that code. I'll make a followup issue to do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -27,7 +27,7 @@ func TestAccDatasource_account_role_defaults(t *testing.T) {
}

// Default account role names - these exist in every account
defaultAccountRoles := []defaultAccountRole{{"Admin", 42}, {"Member", 12}, {"Owner", 44}}
defaultAccountRoles := []defaultAccountRole{{"Admin", 43}, {"Member", 12}, {"Owner", 45}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change, but this drifts from time to time when server-side changes are made.

Copy link
Contributor

@jamiezieziula jamiezieziula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm as a go-expert

@mitchnielsen mitchnielsen merged commit 05cbc49 into main Feb 28, 2025
7 checks passed
@mitchnielsen mitchnielsen deleted the work-pool-access branch February 28, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for work pool access
2 participants