{"id":16481462,"url":"https://github.com/wsmelton/az-lab-dbatools","last_synced_at":"2026-04-22T16:37:00.025Z","repository":{"id":147902223,"uuid":"571290128","full_name":"wsmelton/az-lab-dbatools","owner":"wsmelton","description":"Azure Bicep deployment for creating a lab of SQL Server","archived":false,"fork":false,"pushed_at":"2023-01-31T01:38:17.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T07:17:20.443Z","etag":null,"topics":["azure","bicep","dbatools","deployment","powershell"],"latest_commit_sha":null,"homepage":"","language":"Bicep","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wsmelton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-27T18:58:16.000Z","updated_at":"2022-12-03T22:20:47.000Z","dependencies_parsed_at":"2023-05-21T21:15:07.101Z","dependency_job_id":null,"html_url":"https://github.com/wsmelton/az-lab-dbatools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wsmelton/az-lab-dbatools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmelton%2Faz-lab-dbatools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmelton%2Faz-lab-dbatools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmelton%2Faz-lab-dbatools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmelton%2Faz-lab-dbatools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wsmelton","download_url":"https://codeload.github.com/wsmelton/az-lab-dbatools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsmelton%2Faz-lab-dbatools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32145870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T15:33:03.595Z","status":"ssl_error","status_checked_at":"2026-04-22T15:30:42.712Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["azure","bicep","dbatools","deployment","powershell"],"created_at":"2024-10-11T13:07:31.634Z","updated_at":"2026-04-22T16:36:55.017Z","avatar_url":"https://github.com/wsmelton.png","language":"Bicep","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dbatools Azure Lab Deployment\n\nThis repository contains an Azure Bicep deployment that will provide a quick start lab to work with SQL Server and testing or developing against the [dbatools module](https://github.com/dataplat/dbatools).\n\n\u003e **Note**: The Virtual Machines created using this deployment includes an auto-shutdown trigger for 7PM (19:00) your local time.\n\n![screenshot of auto-shutdown config](https://user-images.githubusercontent.com/11204251/205464340-a0f6d8b6-879f-423b-951d-d49a0aff698a.png)\n\n## Why no Deploy to Azure button?\n\nThe [Deploy to Azure](https://azure.microsoft.com/en-gb/blog/deploy-to-azure-button-for-azure-websites-2/) button is commonly used with repositories on GitHub. It is not commonly used internally with companies that are creating the DevOps process and writing CI/CD deployments. The intention is to show and provide a real-world deployment for SQL Server and resources in Azure.\n\n## Deployment Process\n\nA PSD1 file is used to input parameters to the Bicep template.\n\n- baseName: [required] value used in naming resources\n- location: [required] region to deploy to in Azure\n- tenantId: [required] Azure Tenant ID\n- subscriptionId: [required] Azure Subscription ID\n- tags: [optional] Hashtable object of tag key/value pairs to assign to the resources\n\nThe subscription and tenant values are used to validate the context for Azure PowerShell session.\n\n## Deploy Script\n\n```mermaid\nflowchart\n    PSD1 --\u003e|deploy-parameters.psd1| deploy.ps1\n    AdminPassword --\u003e|SecureString for VMs| deploy.ps1\n    deploy.ps1 -.-\u003e GetResourceGroup\n    GetResourceGroup -.-\u003e | Not found | NewResourceGroup\n    NewResourceGroup --\u003e ResourceGroup\n    GetResourceGroup --\u003e ResourceGroup\n    ResourceGroup --\u003e NewResourceGroupDeployment\n    NewResourceGroupDeployment -.-\u003e Outputs\n```\n\n## Bicep\n\n[Bicep](https://github.com/azure/bicep) is a domain-specific language used to more easily define a resource to be deployed and configured in Azure. During the deployment process Azure Resource Manager (ARM) commands convert Bicep into an ARM template. If you have worked with creating ARM templates you will find that the syntax around string manipulation, calculations, and generating variables is much simplier in Bicep.\n\n```mermaid\nflowchart\n    inputs --\u003e main\n    main --\u003e keyvault\n    main --\u003e virtualNetwork\n    keyvault --\u003e secrets\n    main --\u003e | Windows 11+tools | devVM\n    main --\u003e | SQL 2022 | sqlVM\n    main --\u003e | SQL 2019 | sqlVM\n    virtualNetwork -.-\u003e sqlVM\n    virtualNetwork -.-\u003e devVM\n    secrets -.-\u003e sqlVM\n    secrets -.-\u003e devVM\n```\n\nThe structure of this deployment is using a module structure. Bicep templates can be reused as a module by adjusting to accept parameter inputs. The SQL VM module is written where you can provide a count input and it will loop over creating that number of VMs for you. By default you will only get one each of the following running Windows Server 2022.\n\n- SQL Server 2022 Developer Edition\n- SQL Server 2019 Developer Edition\n\n## Getting Started\n\nClone the repository and then create the file `deploy-parameters.psd1` in the root directory. You can see sample content below for the PSD1 file.\n\n```powershell\n@{\n    tenantId       = '00000000-0000-000b-aa0a-000a000c0000'\n    subscriptionId = '00000000-0000-000b-aa0a-000a000c0000'\n    location       = 'eastus'\n    baseName       = 'lab'\n    emailAddress   = '\u003can email address\u003e'\n    vmCount        = 1\n    adminUser      = 'labadmin'\n    timezone       = 'Central Standard Time'\n    userId         = '00000000-0000-000b-aa0a-000a000c0000'\n}\n```\n\n\u003e **Note**: The User ID should by the ObjectID of your Azure AD account. This account requires Contributor role to either the subscription **or** a current Resource Group in the Azure Subscription\n\nThe [deploy.ps1](deploy.ps1) script is the entry point for deploying these resources to an Azure Subscription.\n\n![output of calling deploy.ps1 script](https://user-images.githubusercontent.com/11204251/205462991-e2da086c-9768-47e3-a6e4-35de8be11b79.png)\n\nIf everything completes successfully you will see output as below:\n\n![output of deployment](https://user-images.githubusercontent.com/11204251/205463587-8ef6ae93-a34a-436d-91d7-958e6ee0bcae.png)\n\nYou can use `Get-AzResource` to list out what exist in the Resource Group after the deployment completes.\n\n![output of Get-AzResource](https://user-images.githubusercontent.com/11204251/205463620-1cc8ffc0-5af0-4977-ba14-e5f9c9f3942d.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsmelton%2Faz-lab-dbatools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwsmelton%2Faz-lab-dbatools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsmelton%2Faz-lab-dbatools/lists"}