Skip to content

Commit

Permalink
(#108) influx_auth: fix creation using resource name
Browse files Browse the repository at this point in the history
  • Loading branch information
lennardk committed Feb 23, 2024
1 parent ee0f7d6 commit fcd53fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/provider/influxdb_auth/influxdb_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def create(context, name, should)
if p['resource'].key?('name') && !p['resource'].key?('id')
resname = p['resource']['name']
restype = p['resource']['type']
response = influx_get("/api/v2/#{restype}", params: { 'name': resname })
response = influx_get("/api/v2/#{restype}?name=#{resname}")
if response.key?(restype)
p['resource']['id'] = response[restype][0]['id']
else
Expand Down

0 comments on commit fcd53fa

Please sign in to comment.