mirror of
https://github.com/puppetlabs/vmpooler-dns-gcp.git
synced 2026-01-26 02:58:42 -05:00
Fix auth
This commit is contained in:
parent
cbb3ad3904
commit
9bef22abe6
1 changed files with 7 additions and 4 deletions
|
|
@ -45,6 +45,10 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
|
|
||||||
# main configuration options
|
# main configuration options
|
||||||
|
def project
|
||||||
|
dns_config['project']
|
||||||
|
end
|
||||||
|
|
||||||
def zone_name
|
def zone_name
|
||||||
dns_config['zone_name']
|
dns_config['zone_name']
|
||||||
end
|
end
|
||||||
|
|
@ -80,12 +84,11 @@ module Vmpooler
|
||||||
retry_factor = global_config[:config]['retry_factor'] || 10
|
retry_factor = global_config[:config]['retry_factor'] || 10
|
||||||
try = 1
|
try = 1
|
||||||
begin
|
begin
|
||||||
scopes = ['https://www.googleapis.com/auth/cloud-platform']
|
Google::Cloud::Dns.configure do |config|
|
||||||
|
config.project_id = project
|
||||||
Google::Auth.get_application_default(scopes)
|
end
|
||||||
|
|
||||||
dns = Google::Cloud::Dns.new
|
dns = Google::Cloud::Dns.new
|
||||||
# dns.authorization = authorization
|
|
||||||
|
|
||||||
metrics.increment('connect.open')
|
metrics.increment('connect.open')
|
||||||
dns
|
dns
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue