From e59e89705ec9d2b62c6b79876382ac41559f74f9 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Thu, 14 Nov 2024 18:43:01 +0000 Subject: [PATCH] Update windows-ad/populate_ad/run.ps1 --- windows-ad/populate_ad/run.ps1 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/windows-ad/populate_ad/run.ps1 b/windows-ad/populate_ad/run.ps1 index 220d9a4..94f0648 100644 --- a/windows-ad/populate_ad/run.ps1 +++ b/windows-ad/populate_ad/run.ps1 @@ -1,3 +1,30 @@ +<# + +data "template_file" "init" { + template = "${file("populate_ad/run.ps1.tpl")}" + + vars = { + forest_mode = "" + domain_mode = "" + domain_name = "${aws_instance.some.private_ip}" + domain_netbios_name = "" + safe_mode_password = "" + domain_admin_password = "" + } +} + +#> + +# Configure new domain +$DomainName = "${domain_name}" +$DomainNetBiosName = "${domain_netbios_name}" +$DomainMode = "${domain_mode}" +$ForestMode = "${forest_mode}" + +$SafeModePassword = ConvertTo-SecureString -AsPlainText "${safe_mode_password}" -Force +$DomainAdminPassword = ConvertTo-SecureString -AsPlainText "${domain_admin_password}" -Force + + $PSScriptRoot/install.ps1 $PSScriptRoot/create_ous.ps1 $PSScriptRoot/create_groups.ps1