-
-
Save aambert/56110fb208397ad4206ecf73117825d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "azurerm_virtual_machine_extension" "domjoin" { | |
| name = "domjoin" | |
| location = "${var.location}" | |
| resource_group_name = "${var.image_resource_group}" | |
| virtual_machine_name = "${var.prefix}" | |
| publisher = "Microsoft.Compute" | |
| type = "JsonADDomainExtension" | |
| type_handler_version = "1.3" | |
| # What the settings mean: https://docs.microsoft.com/en-us/windows/desktop/api/lmjoin/nf-lmjoin-netjoindomain | |
| settings = <<SETTINGS | |
| { | |
| "Name": "pixelrobots.co.uk", | |
| "OUPath": "OU=Servers,DC=pixelrobots,DC=co,DC=uk", | |
| "User": "pixelrobots.co.uk\\pr_admin", | |
| "Restart": "true", | |
| "Options": "3" | |
| } | |
| SETTINGS | |
| protected_settings = <<PROTECTED_SETTINGS | |
| { | |
| "Password": "${var.admin_password}" | |
| } | |
| PROTECTED_SETTINGS | |
| depends_on = ["azurerm_virtual_machine.vm"] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment