Azure / Azure/azure-quickstart-templates

JoinDomain extension fails when using parameters/variables only

Open
#1,635 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

201-vm-domain-join
https://github.com/Azure/azure-quickstart-templates/tree/master/201-vm-domain-join
### Issue Details

I have not been able to get the JoinDomain extension to work when passing a parameter or variable value in for OUPath as in your example. The only thing I can get working is a concatenated string like this:
"OUPath": "concat('OU=Core,OU=xServers,DC=',parameters('clientPrefix'),',DC=domain,DC=com')]",

If I use "OUPath": "[variables('coreOuPath')]", the deployment fails even though I have the variable set exactly the same as above. I'm wondering if anyone else is experiencing this issue? I have tried various combinations with no success. The only way I get it to work is leaving the OUPath blank and creating the computer object ahead of time (not ideal) or have the machine go to the default Computers CN (also not ideal). I have the work around above but doesn't make for very efficient and re-usable templates. Let me know if I'm missing something.

Greg

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the 201-vm-domain-join template and compare the working concatenated OUPath expression with the failing variables('coreOuPath') and parameter-based forms. Confirm the expected behavior by deploying the template with a reusable parameter or variable value, with success meaning the VM joins the intended organizational unit without pre-creating the computer object.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.