Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
For now, we can only get existing ADO environment by giving the ID of the environment. In most cases we couldn't get the enviroment ID, becasue it's dynamic. The environment could be destroyed and recreated, so it's not a good way to, for example, manually assign the Identifier. Sometimes also we don't want to destroy the environment.
Affected Resource
Add new behaviour in data source:
data "azuredevops_environment"
Scenario:
To access a created earlier environment, instead of recreating it or using tricks, we could use this:
data "azuredevops_environment" "env" {
count = length(data.azuredevops_project.main)
project_id = data.azuredevops_project.main[count.index].id
name = data.azuredevops_project.main[count.index].environment_name
}
Community Note
Description
For now, we can only get existing ADO environment by giving the ID of the environment. In most cases we couldn't get the enviroment ID, becasue it's dynamic. The environment could be destroyed and recreated, so it's not a good way to, for example, manually assign the Identifier. Sometimes also we don't want to destroy the environment.
Affected Resource
Add new behaviour in data source:
data "azuredevops_environment"
Scenario:
To access a created earlier environment, instead of recreating it or using tricks, we could use this:
This is my suggestion to solve it.
References
PR: azuredevops_environment Another Issue