Create test environment with VMs - Windows Servers , one of them is a Domain Controller and the other are
member servers. Platform MS Azure.
Use for test environments , passwords are not encrypted!
!! Parameters pls. add to terraform.tfvars file !!
The Domain Controller is created first and then the member server is joined to the domain.
MK (C) Free for use! Part for AD-Forest code based on https://github.com/cfalta/activedirectory-lab?tab=BSD-3-Clause-1-ov-file - Copyright (c) 2021, Christoph Falta.
| Version | Date | Description |
|---|---|---|
| v0.9 | 04.05.2025 | Create script |
| v0.91 | 05.05.2025 | Added vars and dependency |
| v0.92 | 09.05.2025 | Modify time sleep |
| v0.93 | 10.05.2025 | Added domain join for VM2 |
| v0.94 | 10.05.2025 | Update structure and vars |
| v0.95 | 19.05.2025 | Created modules for network, compute, and Active Directory |
| v0.96 | 16.06.2025 | Added variables for compute module, count_vm variable, and vm_ids output |
| v0.97 | 17.06.2025 | Optimization - removed unused vars, commented in compute module |
| v0.98 | 25.06.2025 | Review |
| v0.99 | 26.06.2025 | Update credentials vars |
| v1.00 | 27.06.2025 | Updated README |
Creator is not responsible aboout issues and damges caused by run this code or modification. Use only for testing.
- Azure Subscription
- Terraform - https://developer.hashicorp.com/terraform/install
- Recommended - Visual Studio Code
- Create config file "provider.tf" or update maint.tf
Provider.tf example:
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.22.0" # Specify the version you want to use
}
}
required_version = ">= 1.5.7" # Specify the Terraform version you want to use
}
provider "azurerm" {
features {}
subscription_id = "your subscription id"
}
https://developer.hashicorp.com/terraform/tutorials/azure-get-started/azure-build
- terraform init
- terraform validate
- terraform plan
- terraform apply
- Write local password
- Write number of VMs max based on your limitation in Az-subscription recomended is 8.
- Write domain password
- Write domain recovery password.
Note! Passwords must be complex..
TODO: Explain how other users and developers can contribute to make your code better.
If you want to learn more about creating good readme files then refer the following guidelines. You can also seek inspiration from the below readme files: