Open lukaskolafa opened 2 months ago
@lukaskolafa I would suggest add a filter to the azuredevops_groups
then you can get the result directly if the group
exists
ok, thanks!
On Tue, Apr 9, 2024 at 8:18 AM xuzhang3 @.***> wrote:
@lukaskolafa https://github.com/lukaskolafa I would suggest add a filter to the azuredevops_groups then you can get the result directly if the group exists
— Reply to this email directly, view it on GitHub https://github.com/microsoft/terraform-provider-azuredevops/issues/1021#issuecomment-2044226667, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYQ6HTIHEGQ7PDC3I6MVCDY4OB5HAVCNFSM6AAAAABF4ZDTTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBUGIZDMNRWG4 . You are receiving this because you were mentioned.Message ID: @.*** com>
Hello Team,
I would like to propose a change to the
data
azuredevops_group
source to allow returningnil
in case the group does not exist. This would allow us to use the data source for conditional group maintenance. The problem is, that AZDO creates some groups conditionally (e.g.: "Deployment Group Administrators").My proposal would be, to update the function
dataSourceGroupRead
- include a new parameter calledallow_empty_result
and based on that throw an error in case the group is not found or returns nil. The default value would befalse
, so there is no breaking change for existing behavior.If I create a PR for this change, would you accept it?
Our current workaround would be using an "external" data source with a custom script.
thanks