trying to create a pool inside a project of a devcenter and cannot find any resource that can do this in one go so wondering if there is any resource for this activity.
Hi @dasra23,
This is not a provided resource within the azurerm
Terraform provider. However, you could use the AzApi Terraform provider for this specific āsub-resourceā:
Ensure you set the parent_id
attribute to the resource ID of the project resource you are deploying with the AzureRM provider which will ensure there is an implied dependency:
parent_id = azurerm_dev_center_project.example.id
Hope that helps!
Happy Terraforming
This one was really helpful but could not find a way to turn on single sign on option, would really appreciate if you have faced any similar situation and thank you very much for the suggestion.
also any way to just use the default network as there are no networks created for the dev center and trying to deploy to microsoft hosted network
I can see that the value of managed network is managedNetwork in the template and when I use it via terraform I am getting
āerrorā: {
ā ācodeā: āValidationErrorā,
ā āmessageā: āThe request is not valid.ā,
ā ādetailsā: [
ā {
ā ācodeā: āAttachedNetworkConnectionNotFoundā,
ā ātargetā: āā,
ā āmessageā: āThe Network Connection could not be found. Ensure the Network Connection is attached to the Dev Center.ā,
ā ādetailsā: ,
Hi @dasra23 ,
Iām glad that was useful. I am, unfortunately, not familiar with the Azure Dev Centers as I have never used them so I am unlikely to be able to help with specifics related to their configuration.
However, this error seems to require an āattached networkā and, looking at the AZAPI documentation it should be available as a data resource if it is attached: Microsoft.DevCenter/projects/attachednetworks. If it is not (which the error seems to suggest) then you are likely to be missing some configuration to associate the network with the project or DevCenter instance. Which in turn seems to be managed by this resource:
Microsoft.DevCenter/networkConnections
Hope that helps a little further
Thank you very much again for the response. I already had the networkConnection working for me but was looking for attachednetwork info and that was very smooth since you provided the info here. I have almost all of it automated now. Thanks again
The strange part about networkConnection name in pool Microsoft.DevCenter/projects/pools - Bicep, ARM template & Terraform AzAPI reference | Microsoft Learn is that it does not accept managedNetwork as a value for networkConnectionName since it is not attached with the project but the template shows it as a default value when microsoft hosted network is used while creating a pool manually but I can only use the private network. Is it a bug for the azapi_resource type pool? If so how can I raise the issue with the team.