|
| 1 | +--- |
| 2 | +name: Azure Virtual Machine Starterkit |
| 3 | +supportedPlatforms: |
| 4 | + - azure |
| 5 | +description: | |
| 6 | + The Azure Virtual Machine Starterkit provides application teams with a pre-configured Azure environment. It includes a dedicated project, an Azure tenant, and a virtual machine for quick provisioning and testing. |
| 7 | +--- |
| 8 | + |
| 9 | +# Azure Virtual Machine Starterkit Building Block |
| 10 | + |
| 11 | +This documentation is intended as a reference documentation for cloud foundation or platform engineers using this module. |
| 12 | + |
| 13 | +## Overview |
| 14 | + |
| 15 | +The Azure VM Starterkit building block automates the creation of a complete Azure virtual machine environment including: |
| 16 | + |
| 17 | +- **meshStack Project**: A dedicated project for organizing and managing the VM resources |
| 18 | +- **Azure Tenant**: An Azure subscription tenant configured with the specified landing zone |
| 19 | +- **Virtual Machine Building Block**: Automatically deploys an Azure VM with chosen specifications |
| 20 | + |
| 21 | +## Features |
| 22 | + |
| 23 | +- Single unified project (no dev/prod separation) |
| 24 | +- Flexible VM configuration (Linux or Windows) |
| 25 | +- Optional public IP assignment |
| 26 | +- Automatic project admin assignment for the creator |
| 27 | +- Customizable project tags |
| 28 | + |
| 29 | +## Use Cases |
| 30 | + |
| 31 | +- Quick VM provisioning for development or testing |
| 32 | +- Sandbox environments for experimentation |
| 33 | +- Training and learning environments |
| 34 | +- Proof-of-concept workloads |
| 35 | +- CI/CD build agents |
| 36 | + |
| 37 | +<!-- BEGIN_TF_DOCS --> |
| 38 | +## Requirements |
| 39 | + |
| 40 | +| Name | Version | |
| 41 | +|------|---------| |
| 42 | +| <a name="requirement_meshstack"></a> [meshstack](#requirement\_meshstack) | 0.9.0 | |
| 43 | + |
| 44 | +## Modules |
| 45 | + |
| 46 | +No modules. |
| 47 | + |
| 48 | +## Resources |
| 49 | + |
| 50 | +| Name | Type | |
| 51 | +|------|------| |
| 52 | +| [meshstack_building_block_v2.azure_vm](https://registry.terraform.io/providers/meshcloud/meshstack/0.9.0/docs/resources/building_block_v2) | resource | |
| 53 | +| [meshstack_project.vm_project](https://registry.terraform.io/providers/meshcloud/meshstack/0.9.0/docs/resources/project) | resource | |
| 54 | +| [meshstack_project_user_binding.creator_admin](https://registry.terraform.io/providers/meshcloud/meshstack/0.9.0/docs/resources/project_user_binding) | resource | |
| 55 | +| [meshstack_tenant_v4.vm_tenant](https://registry.terraform.io/providers/meshcloud/meshstack/0.9.0/docs/resources/tenant_v4) | resource | |
| 56 | + |
| 57 | +## Inputs |
| 58 | + |
| 59 | +| Name | Description | Type | Default | Required | |
| 60 | +|------|-------------|------|---------|:--------:| |
| 61 | +| <a name="input_azure_vm_definition_version_uuid"></a> [azure\_vm\_definition\_version\_uuid](#input\_azure\_vm\_definition\_version\_uuid) | UUID of the Azure Virtual Machine building block definition version. | `string` | n/a | yes | |
| 62 | +| <a name="input_creator"></a> [creator](#input\_creator) | Information about the creator of the resources who will be assigned Project Admin role | <pre>object({<br> type = string<br> identifier = string<br> displayName = string<br> username = optional(string)<br> email = optional(string)<br> euid = optional(string)<br> })</pre> | n/a | yes | |
| 63 | +| <a name="input_full_platform_identifier"></a> [full\_platform\_identifier](#input\_full\_platform\_identifier) | Full platform identifier of the Azure platform. | `string` | n/a | yes | |
| 64 | +| <a name="input_landing_zone_identifier"></a> [landing\_zone\_identifier](#input\_landing\_zone\_identifier) | Azure Landing zone identifier for the tenant. | `string` | n/a | yes | |
| 65 | +| <a name="input_name"></a> [name](#input\_name) | This name will be used for the created project and VM | `string` | n/a | yes | |
| 66 | +| <a name="input_project_tags_yaml"></a> [project\_tags\_yaml](#input\_project\_tags\_yaml) | YAML configuration for project tags. Expected structure:<pre>yaml<br>key1:<br> - "value1"<br> - "value2"<br>key2:<br> - "value3"</pre> | `string` | `"{}"` | no | |
| 67 | +| <a name="input_vm_admin_password"></a> [vm\_admin\_password](#input\_vm\_admin\_password) | The admin password for Windows VM (required for Windows). | `string` | `null` | no | |
| 68 | +| <a name="input_vm_admin_username"></a> [vm\_admin\_username](#input\_vm\_admin\_username) | The admin username for the VM. | `string` | `"azureuser"` | no | |
| 69 | +| <a name="input_vm_enable_public_ip"></a> [vm\_enable\_public\_ip](#input\_vm\_enable\_public\_ip) | Whether to create and assign a public IP address to the VM. | `bool` | `false` | no | |
| 70 | +| <a name="input_vm_location"></a> [vm\_location](#input\_vm\_location) | The Azure region where the VM will be deployed. | `string` | `"westeurope"` | no | |
| 71 | +| <a name="input_vm_os_type"></a> [vm\_os\_type](#input\_vm\_os\_type) | The operating system type (Linux or Windows). | `string` | `"Linux"` | no | |
| 72 | +| <a name="input_vm_size"></a> [vm\_size](#input\_vm\_size) | The size of the virtual machine. | `string` | `"Standard_B1s"` | no | |
| 73 | +| <a name="input_vm_ssh_public_key"></a> [vm\_ssh\_public\_key](#input\_vm\_ssh\_public\_key) | SSH public key for Linux VM authentication (required for Linux). | `string` | `null` | no | |
| 74 | +| <a name="input_workspace_identifier"></a> [workspace\_identifier](#input\_workspace\_identifier) | The identifier of the meshStack workspace | `string` | n/a | yes | |
| 75 | + |
| 76 | +## Outputs |
| 77 | + |
| 78 | +| Name | Description | |
| 79 | +|------|-------------| |
| 80 | +| <a name="output_project_name"></a> [project\_name](#output\_project\_name) | Name of the created meshStack project | |
| 81 | +| <a name="output_summary"></a> [summary](#output\_summary) | Summary with next steps and insights into created resources | |
| 82 | +| <a name="output_tenant_uuid"></a> [tenant\_uuid](#output\_tenant\_uuid) | UUID of the created Azure tenant | |
| 83 | +| <a name="output_vm_building_block_uuid"></a> [vm\_building\_block\_uuid](#output\_vm\_building\_block\_uuid) | UUID of the Azure VM building block | |
| 84 | +<!-- END_TF_DOCS --> |
| 85 | + |
| 86 | +## Configuration Examples |
| 87 | + |
| 88 | +### Basic Linux VM |
| 89 | + |
| 90 | +```hcl |
| 91 | +module "vm_starterkit" { |
| 92 | + source = "./modules/azure/azure-virtual-machine/starterkit/buildingblock" |
| 93 | +
|
| 94 | + workspace_identifier = "my-workspace" |
| 95 | + name = "my-dev-vm" |
| 96 | + full_platform_identifier = "azure.my-platform" |
| 97 | + landing_zone_identifier = "my-landing-zone" |
| 98 | +
|
| 99 | + # Building block UUID (obtain from your meshStack setup) |
| 100 | + azure_vm_definition_version_uuid = "..." |
| 101 | +
|
| 102 | + creator = { |
| 103 | + type = "User" |
| 104 | + identifier = "user123" |
| 105 | + displayName = "John Doe" |
| 106 | + username = "jdoe" |
| 107 | + } |
| 108 | +
|
| 109 | + vm_os_type = "Linux" |
| 110 | + vm_size = "Standard_B2s" |
| 111 | + vm_location = "westeurope" |
| 112 | + vm_ssh_public_key = file("~/.ssh/id_rsa.pub") |
| 113 | + vm_enable_public_ip = true |
| 114 | +} |
| 115 | +``` |
| 116 | + |
| 117 | +### Windows VM |
| 118 | + |
| 119 | +```hcl |
| 120 | +module "vm_starterkit" { |
| 121 | + source = "./modules/azure/azure-virtual-machine/starterkit/buildingblock" |
| 122 | +
|
| 123 | + workspace_identifier = "my-workspace" |
| 124 | + name = "my-win-vm" |
| 125 | + full_platform_identifier = "azure.my-platform" |
| 126 | + landing_zone_identifier = "my-landing-zone" |
| 127 | +
|
| 128 | + # Building block UUID |
| 129 | + azure_vm_definition_version_uuid = "..." |
| 130 | +
|
| 131 | + creator = { |
| 132 | + type = "User" |
| 133 | + identifier = "user456" |
| 134 | + displayName = "Jane Smith" |
| 135 | + username = "jsmith" |
| 136 | + } |
| 137 | +
|
| 138 | + vm_os_type = "Windows" |
| 139 | + vm_size = "Standard_D2s_v3" |
| 140 | + vm_location = "northeurope" |
| 141 | + vm_admin_password = var.windows_admin_password |
| 142 | + vm_enable_public_ip = true |
| 143 | +} |
| 144 | +``` |
| 145 | + |
| 146 | +## Notes |
| 147 | + |
| 148 | +- The resource group will be automatically created by the Azure VM building block |
| 149 | +- Ensure SSH public key is provided for Linux VMs |
| 150 | +- Ensure admin password is provided for Windows VMs |
| 151 | +- Public IP is disabled by default for security |
| 152 | +- Project tags can be customized using YAML format |
0 commit comments