The provider is available for auto-installation using
devsy provider add azure
devsy provider use azureFollow the on-screen instructions to complete the setup.
Needed variables will be:
- AZURE_SUBSCRIPTION_ID
- AZURE_RESOURCE_GROUP
- AZURE_REGION
Authentication is obtained using Azure's Default Credential authenticator, which uses the CLI tool, the environment, or certificates. See the Azure CLI auth docs for setup options.
The identity running devsy workspace up needs to provision the VM, its
networking resources, and a role assignment that lets the VM stop itself
when the inactivity timer fires. The simplest setup is Owner (or
Contributor + User Access Administrator) on the target resource
group. Specifically the provider needs:
Microsoft.Compute/virtualMachines/*(VM lifecycle)Microsoft.Network/*(vnet, subnet, NSG, public IP, NIC)Microsoft.Authorization/roleAssignments/write— used once per VM to grant the VM's system-assigned managed identity the Virtual Machine Contributor role scoped to itself, so${AZURE_PROVIDER} stopinvoked from inside the VM can deallocate.
After the initial setup, just use:
devsy workspace up .You'll need to wait for the machine and environment setup.
This provider has the following options:
| NAME | REQUIRED | DESCRIPTION | DEFAULT |
|---|---|---|---|
| AZURE_SUBSCRIPTION_ID | true | The azure subscription id | |
| AZURE_RESOURCE_GROUP | true | The azure resource group name | |
| AZURE_REGION | true | The azure region to use | |
| AZURE_INSTANCE_SIZE | false | The machine type to use. | Standard_D4s_v3 |
| AZURE_IMAGE | false | The disk image to use. | Canonical:0001-com-ubuntu-server-jammy:22_04-lts-gen2:latest |
| AZURE_DISK_SIZE | false | The disk size in GB. | 40 |
| AZURE_DISK_TYPE | false | The disk type to use. | StandardSSD_LRS |
| AZURE_CUSTOM_DATA | false | Cloud-init file or base64-encoded string | |
| AZURE_TAGS | false | Comma-separated key=value tags |
Options can be set in env or via the CLI:
devsy provider set-options -o AZURE_IMAGE=Vendor:Offer:SKU:VersionTo build and test the provider locally, use task task build:provider:dev. The provider file is created in ./dist/provider.yaml.