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

Is it possible to update the security of an agent pool with terraform? #910

Open
vamshisiram opened this issue Oct 26, 2023 · 19 comments
Open

Comments

@vamshisiram
Copy link

Right now, we have four agent pools manually created outside of terraform at the DevOps Org level. I want to just update the security for the agent pools at the project level, whenever a new project is created with Terraform.

is this possible? if so, can i please get information on how?

i looked at the API for agent pools and could not find that info.

thanks for looking into this.

If you have a support request or question please submit them to one of these resources:

@xuzhang3
Copy link
Collaborator

xuzhang3 commented Nov 8, 2023

@vamshisiram This feature not supported yet. Is Settings -> Agent pools -> Security the feature you want?

@vamshisiram
Copy link
Author

vamshisiram commented Nov 8, 2023 via email

@xuzhang3
Copy link
Collaborator

xuzhang3 commented Nov 9, 2023

Which security feature? Settings -> Agent pools -> Security or Settings -> Agent pools -> <Agent Pool Name> -> Security.

@vamshisiram
Copy link
Author

vamshisiram commented Nov 9, 2023 via email

@xuzhang3
Copy link
Collaborator

xuzhang3 commented Nov 9, 2023

@vamshisiram The pipeline permission in Settings -> Agent pools -> <Agent Pool Name> -> Security has been support by resource : https://registry.terraform.io/providers/microsoft/azuredevops/latest/docs/resources/pipeline_authorization

@vamshisiram
Copy link
Author

@xuzhang3

Is this at the organization level?

I would like something at the project level. Is that possible?

@vamshisiram
Copy link
Author

@xuzhang3 I reviewed the link you shared. It is for authorizing a pipeline access to a resource. It is not for controlling agent pool security.

Please clarify if the following is available:

Org settings > Agent Pools > Security.

Or

Project settings > Agent Pools > Security.

This is for adding a project admin or contributor to the agent pool, not for a pipeline access to the agent pool.

I hope this helps ask my question clearly.

Please let me know. @xuzhang3

@xuzhang3
Copy link
Collaborator

@vamshisiram Settings > Agent Pools > Security not supported yet.

@vamshisiram
Copy link
Author

vamshisiram commented Nov 10, 2023 via email

@xuzhang3
Copy link
Collaborator

@vamshisiram I have put this into our backlog but I cannot give you any ETA of this, we are block by other tasks.

@jan-mrm
Copy link
Contributor

jan-mrm commented Jan 24, 2024

@xuzhang3 is that something one can contribute? I just had a look but I'm not sure what I would need to do to even get the client.
At https://github.com/microsoft/azure-devops-go-api/tree/dev/azuredevops/v7 are not the required client calls. Not in security nor in something extra like securityroles what I'd guess from the ADO rest api https://learn.microsoft.com/en-us/rest/api/azure/devops/securityroles/roleassignments/set-role-assignment?view=azure-devops-rest-7.0

@xuzhang3
Copy link
Collaborator

@jan-mrm which type of security you want? Pipeline permission or user permission, pipeline permissions can be managed by azuredevops_pipeline_authorization. The user permission not supported, you can mange the user permission by Security API or the new API(role assignment)you mentioned

@jan-mrm
Copy link
Contributor

jan-mrm commented Jan 26, 2024

@xuzhang3 I'd be interested in Settings -> Agent pools -> <Agent> -> Security. User/Group permissions.
I wanted to add the client for the new role assignments api but I couldn't find the it in the azure-go-api repo.
Is it possible to add the client for the new role assignments api?

@xuzhang3
Copy link
Collaborator

As I know Security Role Assignment not include in the go-sdk security

@xuzhang3
Copy link
Collaborator

go-sdk feature support : microsoft/azure-devops-go-api#148

@jan-mrm
Copy link
Contributor

jan-mrm commented Jan 26, 2024

@xuzhang3 cool, thank you 👍 for the next time i also know what to do

@DmitrySandalov
Copy link

The issue seems to be related to #729

@ozbillwang
Copy link

ozbillwang commented Jul 30, 2024

With current way, we can create the agent pool at the organization level.

Then I have to manually add it in that project I created recently.

Still waiting the improvement that I can manage the agent pool at project level.

@xuzhang3
Copy link
Collaborator

@ozbillwang project level agent pool can be managed by azuredevops_agent_queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants