Open trinithunder opened 1 month ago
Example Faraday request for provisioning a VPS:
response = Faraday.post("https://api.hetzner.cloud/v1/servers") do |req| req.headers['Authorization'] = "Bearer #{your_api_token}" req.body = { name: "new-server", server_type: "cx11", # Adjust based on the server type needed image: "ubuntu-20.04" }.to_json end
Use Hetzner Cloud API to manage VPS creation, deletion, and modification. Integrate Faraday to make API requests for server provisioning. Depending on the API responses, you can either allocate a single VPS per account or install multiple user accounts on one server.