-
Notifications
You must be signed in to change notification settings - Fork 160
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
Update Agent Pools scope to Workspaces #870
Update Agent Pools scope to Workspaces #870
Conversation
ff123d4
to
f820046
Compare
Might be a bit of scope creep for this feature, but was thinking about if it would be possible in also having a resource dedicated to creating that link between the workspace and agent pool? ie Something like this: resource "tfe_workspace_agent_pool" "ws" {
agent_pool_id = "apool-123456"
workspace_id = "test"
} The idea is similar to something like the workspace_variable_set resource. With this new change, we're making an assumption that the workspace(s) already exist. This doesn't automatically change the execution mode to |
5f1f22c
to
750038f
Compare
750038f
to
6f1acec
Compare
f1c83f4
to
0e35f18
Compare
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.
Looking good! Added a few comments, some stuff will not pass the linter until hashicorp/go-tfe#701 gets merged.
"allowed_workspace_ids": { | ||
Type: schema.TypeSet, | ||
Computed: true, | ||
Elem: &schema.Schema{Type: schema.TypeString}, | ||
}, |
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.
Should this move to its own data source in order to align with the tfe_agent_pool_allowed_workspaces
resource?
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.
This resource only adds the workspace to the allowed_workspaces attribute of an agent_pool. So this was kept inside the agent_pool data source similar to the team_organization_members
4da75e7
to
9b6704d
Compare
e445795
to
fc3f410
Compare
ee34250
to
9fe9a86
Compare
Fix error checking lint
9fe9a86
to
d1ef6a5
Compare
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.
Test passing 🎉
Description
This PR updates the Agent Pools resource and data source to allow users to scope an Agent Pool to particular workspaces.
Testing plan
Covered by integration tests
External links