Skip to content
Terraform script to deploy AD-based environment on Azure
HCL Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore dependencis Dec 24, 2019
Architecture.png Create Architecture.png Dec 5, 2019
LICENSE update Nov 24, 2019 update Nov 24, 2019


Terraform IaC to deploy small AD env in Azure


Architecture overview


Disruption is a code for Terraform to deploy a small AD domain-based environment in Azure. The environment contains two domain controllers (Windows Server 2012), Fileserver + Web server (Windows Server 2019), Windows 7 client, Windows 10 client, and kali Linux machine. They are connected to the same subnet. Each windows machine has some packages being installing during deployment (the list can be viewed and modified here: chocolist). All the needed configurations (Domain creation, DC promotion, joining the machines to the domain and more are automated and part of the deployment. However, there are more improvments to be added (creating OUs, Users, and stuff like that. I'll might get to it in the future, or, you will submit a pull request :))

Deployment instructions

  1. Have Terraform installed on your machine - Terraform (I'm not covering the instruction for that part as it's already widely covered on the internet)
  2. Duplicate the and remove the 'template' from the duplicated file name.
  3. Fill in the details in the file you just created, those variables are used during the deployment.
  4. Have a coffee or something, this takes ~45 minutes to complete the deployment fully
  5. When the deployment is done Terraform will print all the IPs (public and private) - note that the public IPs will be configured to allow external connections only from the deploying machine public IP and the rules allow port 80, 3389 and 22.
  6. Make sure to destroy the environment to avoid being charged a considerable amount of money.

Issues, bugs and other code-issues

Yeah, I know, this code isn't the best. I'm fine with it as I'm not a developer and this is part of my learning process. If there is an option to do some of it better, please, let me know.

Not how many, but where.

You can’t perform that action at this time.