All 29 tests pass. Here's a summary of what was implemented:
Changes
New file: machine/providers/vultr.py — Full Vultr provider implementing the CloudProvider interface:
- Instance management: create_vm, get_vm, destroy_vm, list_vms using the vultr-python library
- SSH keys: get_ssh_key, list_ssh_keys — looks up keys by name (Vultr uses IDs internally)
- DNS: create_dns_record, delete_dns_record, get_dns_records, list_domains using the library's generic HTTP methods (DNS isn't wrapped by the library)
- Validation: validate_region against known Vultr regions, validate_image checks that the OS ID is numeric (Vultr uses numeric os_id values, not slug strings like DO)
- User data: Automatically base64-encodes user_data as required by Vultr's API (unlike DO which accepts raw strings)
Modified: machine/providers/__init__.py — Added "vultr" to KNOWN_PROVIDERS and the factory dispatch.
Modified: pyproject.toml — Added vultr-python>=0.1.5 dependency.
Config format
A Vultr config would look like:
vultr:
api-key: ${VULTR_API_KEY}
ssh-key: my-key-name
machine-size: vc2-1c-1gb
image: 2136 # Vultr uses numeric os_id (e.g. 2136 = Ubuntu 24.04)
region: ewr
dns-zone: example.com # optional
machines:
web-server:
new-user-name: deploy