{"id":16367214,"url":"https://github.com/kumarvna/terraform-azurerm-dev-test-lab","last_synced_at":"2026-01-25T06:35:09.478Z","repository":{"id":48908444,"uuid":"380790190","full_name":"kumarvna/terraform-azurerm-dev-test-lab","owner":"kumarvna","description":"Terraform module for Azure DevTest Labs to efficiently self-manage virtual machines and PaaS resources","archived":false,"fork":false,"pushed_at":"2022-06-08T07:01:39.000Z","size":373,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-23T23:36:45.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kumarvna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"https://github.com/kumarvna"}},"created_at":"2021-06-27T16:39:54.000Z","updated_at":"2022-11-09T03:32:11.000Z","dependencies_parsed_at":"2022-09-23T23:51:25.981Z","dependency_job_id":null,"html_url":"https://github.com/kumarvna/terraform-azurerm-dev-test-lab","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kumarvna/terraform-azurerm-dev-test-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarvna%2Fterraform-azurerm-dev-test-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarvna%2Fterraform-azurerm-dev-test-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarvna%2Fterraform-azurerm-dev-test-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarvna%2Fterraform-azurerm-dev-test-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kumarvna","download_url":"https://codeload.github.com/kumarvna/terraform-azurerm-dev-test-lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarvna%2Fterraform-azurerm-dev-test-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28746437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T05:12:38.112Z","status":"ssl_error","status_checked_at":"2026-01-25T05:04:50.338Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T02:49:00.617Z","updated_at":"2026-01-25T06:35:09.463Z","avatar_url":"https://github.com/kumarvna.png","language":"HCL","funding_links":["https://github.com/sponsors/https://github.com/kumarvna"],"categories":[],"sub_categories":[],"readme":"# Dev Test Labs Terraform Module\n\nThis terraform module designed to deploy Azure DevTest Labs that enables developers on teams to efficiently self-manage virtual machines (VMs) and PaaS resources without waiting for approvals. DevTest Labs creates labs consisting of pre-configured bases.\n\n## Module Usage\n\n```hcl\nmodule \"dev-test-lab\" {\n  source  = \"kumarvna/dev-test-lab/azurerm\"\n  version = \"1.0.0\"\n\n  # By default, this module will create a resource group\n  # proivde a name to use an existing resource group and set the argument \n  # to `create_resource_group = false` if you want to existing resoruce group. \n  # If you use existing resrouce group location will be the same as existing RG.\n  resource_group_name = \"rg-shared-westeurope-02\"\n  location            = \"westeurope\"\n\n  # Dev Test Labs specification\n  dev_test_lab_settings = {\n    name                            = \"mydemoproject1\"\n    storage_type                    = \"Premium\"\n    use_public_ip_address           = \"Allow\"\n    use_in_virtual_machine_creation = \"Allow\"\n  }\n\n  # This module support multiple Pre-Defined Windows Distributions.\n  # Windows Images: windows2012r2dc, windows2016dc, windows2019dc, windows2016dccore\n  # MSSQL 2017 images: mssql2017exp, mssql2017dev, mssql2017std, mssql2017ent\n  # MSSQL 2019 images: mssql2019dev, mssql2019std, mssql2019ent\n  # To use  Gallery Image, specify `gallery_image_reference` block \n  windows_virtual_machine = {\n    win2019vm1 = {\n      windows_distribution_name  = \"windows2019dc\"\n      virtual_machine_size       = \"Standard_A2_v2\"\n      admin_username             = \"azureadmin\"\n      storage_type               = \"Premium\"\n      disallow_public_ip_address = false\n    },\n    windesktop10vm1 = {\n      virtual_machine_size       = \"Standard_A2_v2\"\n      admin_username             = \"azureadmin\"\n      storage_type               = \"Premium\"\n      disallow_public_ip_address = false\n      gallery_image_reference = {\n        publisher = \"MicrosoftWindowsDesktop\"\n        offer     = \"Windows-10\"\n        sku       = \"20h2-ent\"\n        version   = \"latest\"\n      }\n    }\n  }\n\n  # This module support multiple Pre-Defined Linux Distributions.\n  # Linux images: ubuntu1804, ubuntu1604, centos75, centos77, centos81, coreos\n  # MSSQL 2019 Linux OS Images:\n  # RHEL8 images: mssql2019ent-rhel8, mssql2019std-rhel8, mssql2019dev-rhel8\n  # Ubuntu images: mssql2019ent-ubuntu1804, mssql2019std-ubuntu1804, mssql2019dev-ubuntu1804\n  # To use  Gallery Image, specify `gallery_image_reference` block \n  linux_virtual_machine = {\n    vm-linux = {\n      linux_distribution_name    = \"ubuntu1804\"\n      virtual_machine_size       = \"Standard_A2_v2\"\n      admin_username             = \"azureadmin\"\n      storage_type               = \"Premium\"\n      disallow_public_ip_address = false\n    },\n    vm-linux2 = {\n      virtual_machine_size       = \"Standard_A4_v2\"\n      admin_username             = \"azureadmin\"\n      storage_type               = \"Premium\"\n      disallow_public_ip_address = true\n      gallery_image_reference = {\n        publisher = \"RedHat\"\n        offer     = \"RHEL\"\n        sku       = \"8\"\n        version   = \"latest\"\n      }\n    },\n  }\n\n  # Generates a secure private key for Linux Servers - Recomended for Test VM's only.\n  # By default this module generates ssh key pair for linux servers. \n  # To specify custom password, set `generate_admin_ssh_key = false` and set  `admin_password`\n  # To specify own ssh key, use `admin_ssh_key_data` argument with valid key file path. \n  generate_admin_ssh_key = true\n  #  admin_password         = \"P@$$w0rd@1234!\"\n\n  # Adding TAG's to your Azure resources\n  tags = {\n    Terraform   = \"true\"\n    Environment = \"dev\"\n    Owner       = \"test-user\"\n  }\n}\n```\n\n## Default Local Administrator and the Password\n\nThis module utilizes __`azureadmin`__ as a local administrator on virtual machines. If you want to you use custom username, then specify the same by setting up the argument **`admin_username`** with a valid user string.\n\nBy default, this module generates a strong password for all virtual machines also allows you to change the length of the random password (currently 24) using the **`random_password_length = 32`** variable. If you want to set the custom password, specify the argument **`admin_password`** with a valid string.\n\nThis module also generates SSH2 Key pair for Linux servers by default, however, it is only recommended to use for dev environment. For production environments, please generate your own SSH2 key with a passphrase and input the key by providing the path to the argument **`admin_ssh_key_data`**.\n\n## Pre-Defined Windows and Linux VM Images\n\nThere are pre-defined Windows or Linux images available to deploy by setting up the argument `linux_distribution_name` or `windows_distribution_name` with this module.\n\nOS type |Available Pre-defined Images|\n--------|----------------------------|\nLinux |`ubuntu1804`, `ubuntu1604`, `centos75`, `centos77`, `centos81`, `coreos`\nWindows|`windows2012r2dc`, `windows2016dc`, `windows2019dc`, `windows2016dccore`\nMS SQL 2017|`mssql2017exp`, `mssql2017dev`, `mssql2017std`, `mssql2017ent`\nMS SQL 2019|`mssql2019dev`, `mssql2019std`, `mssql2019ent`\nMS SQL 2019 Linux (RHEL8)|`mssql2019ent-rhel8`, `mssql2019std-rhel8`, `mssql2019dev-rhel8`\nMS SQL 2019 Linux (Ubuntu)|`mssql2019ent-ubuntu1804`, `mssql2019std-ubuntu1804`, `mssql2019dev-ubuntu1804`\n\n## **`gallery_image_reference`** - Gallery images\n\nIf the pre-defined Windows or Linux variants are not sufficient then, you can specify the custom image by setting up the argument `gallery_image_reference` with appropriate values. Custom images can be used to bootstrap configurations such as preloading applications, application configurations, and other OS configurations.\n\n```hcl\nmodule \"dev-test-lab\" {\n  source  = \"kumarvna/dev-test-lab/azurerm\"\n  version = \"1.0.0\"\n\n  # .... omitted\n\n  # This module support multiple Pre-Defined Windows Distributions.\n  # Windows Images: windows2012r2dc, windows2016dc, windows2019dc, windows2016dccore\n  # MSSQL 2017 images: mssql2017exp, mssql2017dev, mssql2017std, mssql2017ent\n  # MSSQL 2019 images: mssql2019dev, mssql2019std, mssql2019ent\n  # To use  Gallery Image, specify `gallery_image_reference` block \n  windows_virtual_machine = {\n    windesktop10vm1 = {\n      virtual_machine_size       = \"Standard_A2_v2\"\n      admin_username             = \"azureadmin\"\n      storage_type               = \"Premium\"\n      disallow_public_ip_address = false\n      gallery_image_reference = {\n        publisher = \"MicrosoftWindowsDesktop\"\n        offer     = \"Windows-10\"\n        sku       = \"20h2-ent\"\n        version   = \"latest\"\n      }\n    }\n  },\n\n  # .... omitted\n}\n```\n\n## Recommended naming and tagging conventions\n\nApplying tags to your Azure resources, resource groups, and subscriptions to logically organize them into a taxonomy. Each tag consists of a name and a value pair. For example, you can apply the name `Environment` and the value `Production` to all the resources in production.\nFor recommendations on how to implement a tagging strategy, see Resource naming and tagging decision guide.\n\n\u003e**Important** :\nTag names are case-insensitive for operations. A tag with a tag name, regardless of the casing, is updated or retrieved. However, the resource provider might keep the casing you provide for the tag name. You'll see that casing in cost reports. **Tag values are case-sensitive.**\n\nAn effective naming convention assembles resource names by using important resource information as parts of a resource's name. For example, using these [recommended naming conventions](https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging#example-names), a public IP resource for a production SharePoint workload is named like this: `pip-sharepoint-prod-westus-001`.\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | \u003e= 0.13 |\n| azurerm | \u003e= 2.59.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| azurerm | \u003e= 2.59.0 |\n| random | \u003e=3.1.0 |\n| tls | \u003e=3.1.0 |\n\n## Inputs\n\nName | Description | Type | Default\n---- | ----------- | ---- | -------\n`create_resource_group`|Whether to create resource group and use it for all networking resources|string|`true`\n`resource_group_name` | The name of the resource group in which resources are created | string | `\"\"`\n`location`|The location of the resource group in which resources are created|string | `\"\"`\n`dev_test_lab_settings`|Specifies the arguments for dev test lab creation|object({})|`{}`\n`random_password_length`|The desired length of random password created by this module|number|`24`\n`linux_virtual_machine`|Manages a Linux Virtual Machine within a Dev Test Lab|map(object({}))| `null`\n`windows_virtual_machine`|Manages a Windows Virtual Machine within a Dev Test Lab|map(object({}))| `null`\n`generate_admin_ssh_key`|Generates a secure private key and encodes it as PEM|string|`true`\n`admin_ssh_key_data`|specify the path to the existing SSH key to authenticate Linux virtual machine| string| `\"\"`\n`admin_password`|The Password which should be used for the local-administrator on this Virtual Machine|string|`null`\n`linux_distribution_list`|Pre-defined Azure Linux VM images list|map(object)|`ubuntu1804`\n`linux_distribution_name`|Variable to pick an OS flavor for Linux based Virtual Machine. Possible values are `centos81`, `centos77`, `centos77`, `ubuntu1804`, `ubuntu1604`, `coreos`, `mssql2019ent-rhel8`, `mssql2019std-rhel8`, `mssql2019dev-rhel8`, `mssql2019ent-ubuntu1804`, `mssql2019std-ubuntu1804`, `mssql2019dev-ubuntu1804`|string|`ubuntu1804`\n`windows_distribution_list`|Pre-defined Azure Windows VM images list|map(object)|`\"windows2019dc\"`\n`windows_distribution_name`|Variable to pick an OS flavor for Windows based VM. Possible values are `windows2012r2dc`, `windows2016dc`, `windows2019dc`, `windows2016dccore`, `mssql2017exp`, `mssql2017dev`, `mssql2017std`, `mssql2017ent`, `mssql2019dev`, `mssql2019std`, `mssql2019ent`|string|`\"windows2019dc\"`\n`Tags`|A map of tags to add to all resources|map|`{}`\n\n## Outputs\n\n|Name | Description|\n|---- | -----------|\n`dev_test_lab_id`|The resource ID of the Dev Test Lab\n`artifacts_storage_account_id`|The ID of the Storage Account used for Artifact Storage\n`default_storage_account_id`|The ID of the Default Storage Account for this Dev Test Lab\n`default_premium_storage_account_id`|The ID of the Default Premium Storage Account for this Dev Test Lab\n`key_vault_id`|The ID of the Key used for this Dev Test Lab\n`premium_data_disk_storage_account_id`|The ID of the Storage Account used for Storage of Premium Data Disk\n`dev_test_lab_unique_identifier`|The unique immutable identifier of the Dev Test Lab\n`dev_test_lab_virtual_network_id`|The ID of the Dev Test Virtual Network\n`dev_test_lab_subnet_name`|The name of the Subnet for this Virtual Network\n`dev_test_lab_virtual_network_unique_identifier`|The unique immutable identifier of the Dev Test Virtual Network\n`private_key_pem`|The private key data in PEM format\n`public_key_pem`|The public key data in PEM format\n`public_key_openssh`|The public key data in OpenSSH `authorized_keys` format, if the selected private key format is compatible. All RSA keys are supported, and `ECDSA` keys with curves `P256`, `P384` and `P521` are supported. This attribute is empty if an incompatible ECDSA curve is selected\n`admin_password`|The Password associated with the `admin_username` used to login to this Virtual Machine\n`dev_test_lab_linux_virtual_machine_id`|The ID of the Virtual Machine\n`dev_test_lab_linux_virtual_machine_fqdn`|The FQDN of the Virtual Machine\n`dev_test_lab_linux_virtual_machine_unique_identifier`|The unique immutable identifier of the Virtual Machine\n`dev_test_lab_windows_virtual_machine_id`|The ID of the Windows Virtual Machine\n`dev_test_lab_windows_virtual_machine_fqdn`|The FQDN of the Windows Virtual Machine\n`dev_test_lab_windows_virtual_machine_unique_identifier`|The unique immutable identifier of the Windows Virtual Machine\n\n## Resource Graph\n\n![Resource Graph](graph.png)\n\n## Authors\n\nOriginally created by [Kumaraswamy Vithanala](mailto:kumarvna@gmail.com).\n\n## Other resources\n\n* [Dev Test Labs](https://docs.microsoft.com/en-us/azure/devtest-labs/)\n* [Windows Virtual Machine](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/)\n* [Linux Virtual Machine](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/)\n* [Linux VM running SQL Server](https://docs.microsoft.com/en-us/azure/azure-sql/virtual-machines/linux/sql-vm-create-portal-quickstart)\n* [Windows VM running SQL Server](https://docs.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-vm-create-portal-quickstart)\n* [Terraform AzureRM Provider Documentation](https://www.terraform.io/docs/providers/azurerm/index.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkumarvna%2Fterraform-azurerm-dev-test-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkumarvna%2Fterraform-azurerm-dev-test-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkumarvna%2Fterraform-azurerm-dev-test-lab/lists"}