Terraform deploy Microsoft Entra Domain Services for lab environment
Find a file
2025-08-11 16:54:13 -07:00
main.tf Initial commit 2025-08-11 16:42:37 -07:00
outputs.tf Initial commit 2025-08-11 16:42:37 -07:00
README.md update README 2025-08-11 16:54:13 -07:00
secret-example.tfvars add secret-example.tfvars 2025-08-11 16:49:29 -07:00
variables.tf Initial commit 2025-08-11 16:42:37 -07:00

Terraform Deploy Microsoft Entra Directory Services for lab

  • use azurerm and azuread providers

Creates the following resources:

  • Resource Group
  • Virtual Network
  • Subnet
  • Network Security Group
  • Azure Active Directory Domain Service (old name for Entra DS), standard SKU

Sets up NSG association with subnet

To ensure that the Azure-managed domain controllers for the Entra DS domain are on the desired subnet, only create one subnet with this Terraform. Other subnets can be created later.

Usage

Change secret-example.tfvars to secret.tfvars and update values accordingly.

Deploy with:

terraform init
terraform validate
terraform apply -var-file="secret.tfvars"

Destroy with:

terraform destroy