Skip to content

Commit

Permalink
feat: Expose api_url of droplet_kit client as an env var (#111)
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Webb <dan.webb@damacus.io>
  • Loading branch information
biox and damacus committed Nov 15, 2023
1 parent 66585dc commit 21abb17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/kitchen/driver/digitalocean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class Digitalocean < Kitchen::Driver::SSHBase
default_config :firewalls, nil
default_config :vpcs, nil

default_config :api_url do
ENV["DIGITALOCEAN_API_URL"] || "https://api.digitalocean.com"
end

default_config :region do
ENV["DIGITALOCEAN_REGION"] || "nyc1"
end
Expand Down Expand Up @@ -175,7 +179,7 @@ def default_name
def client
debug_client_config

DropletKit::Client.new(access_token: config[:digitalocean_access_token])
DropletKit::Client.new(access_token: config[:digitalocean_access_token], api_url: config[:api_url])
end

def create_server
Expand Down

0 comments on commit 21abb17

Please sign in to comment.