Has anyone deployed Windows VMs and joined them to...
# azure
q
Has anyone deployed Windows VMs and joined them to an Azure Active Directory Domain via code? I am not seeing much of anything of how to do this or if it is even possible
c
Do you mean AAD or AADDS? For the latter you just use the usual domain join extension.
q
Thanks. I can not seem to find the domain join extension. Where can I find more information about that?
q
Ok. Is it possible to run a template like that via Pulumi? I was searching for examples of this and did not find anything so I am a bit confused on how to merge these two things
c
does the
extension
resource not work for you?
Copy code
compute.Extension("domainjoin",
        virtual_machine_id=vm.id,
        publisher="Microsoft.Compute",
        type="JsonADDomainExtension",
        type_handler_version="1.3",
        auto_upgrade_minor_version=True,
        settings= json.dumps({'Name': domain_fqdn.value, 'OUPath': domain_ou_path.value, 'User': user_name.value, 'Restart': 'true', 'Options': 3}),
        protected_settings=json.dumps({'Password': user_password.value})
      )
q
I was not aware of the extension resource. I will try that out. Thanks so much!
c
Good luck 👍
q
Just thought I would let you know that I did get it working. Thank you SOOO much for all your help
c
Awesome Dave! Let us know if you have any other questions.