Created
March 4, 2019 14:25
-
-
Save PixelRobots/0061f0cc90bb1bb75e4bbfddfeefa343 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