Building a Windows 2016 Domain Controller using Ansible + Terrraform on AWS
git clone https://github.com/d1vious/building-a-windows-dc-terraform && cd building-a-windows-dc-terraform
clone project and cd into the project dir- Setup your variables for your environment under terraform.tfvars, set your own password, and public IP in the whitelist
- Run
terraform init
and thenterraform apply
make sure that you configure terraform first
brew install terraform
install terraform CLI on OSX other platformsbrew install awscli
install aws CLI on OSX otherwise see: guide- Get AWS API token
aws configure
- Set terraform variables under terraform/terraform.tfvars
if on OSX please first set the following env variable: export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
otherwise you will see the following errors when running Ansible:
aws_instance.windows_2016_dc (local-exec): TASK [Gathering Facts] *********************************************************
aws_instance.windows_2016_dc (local-exec): objc[7843]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
aws_instance.windows_2016_dc (local-exec): objc[7843]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
aws_instance.windows_2016_dc: Still creating