Add Vultr cloud provider integration

This commit is contained in:
Cornelis Terblanche
2026-06-03 21:32:18 +02:00
parent 2833c68af9
commit 94abbe1590
33 changed files with 2978 additions and 44 deletions
+19
View File
@@ -67,6 +67,10 @@ class ServerConnectionCheckJob implements ShouldBeEncrypted, ShouldQueue
$this->checkHetznerStatus();
}
if ($this->server->vultr_instance_id && $this->server->cloudProviderToken) {
$this->checkVultrStatus();
}
// Temporarily disable mux if requested
if ($this->disableMux) {
$this->disableSshMux();
@@ -186,6 +190,21 @@ class ServerConnectionCheckJob implements ShouldBeEncrypted, ShouldQueue
}
private function checkVultrStatus(): void
{
try {
$status = $this->server->refreshVultrState();
} catch (\Throwable) {
// Silently ignore transient Vultr API errors.
return;
}
if (in_array($status, ['stopped', 'suspended', 'deleted'], true)) {
throw new \Exception('Vultr instance is not running');
}
}
private function checkConnection(): bool
{
try {