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.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes
.gitignore
1-network.tf
10-machines_config.tf
2-public-ips.tf dependencis Dec 24, 2019
3-secgroup_storage.tf
4-dc1.tf
5-dc2.tf
6-fileserver.tf
7-client10.tf
8-client7.tf
9-kali.tf
Architecture.png Create Architecture.png Dec 5, 2019
LICENSE
README.md
choco_packages.tf update Nov 24, 2019
main.tf
outputs.tf
variables.tf.template
whatismyip.sh update Nov 24, 2019

README.md

Disruption

Terraform IaC to deploy small AD env in Azure

Architecture

Architecture overview

Details

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 variables.tf.template and remove the 'template' from the duplicated file name.
  3. Fill in the details in the variables.tf 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.