-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathinfluxdb_label.rb
63 lines (61 loc) · 1.52 KB
/
influxdb_label.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# frozen_string_literal: true
require 'puppet/resource_api'
Puppet::ResourceApi.register_type(
name: 'influxdb_label',
docs: <<-EOS,
@summary Manages labels in InfluxDB
@example
influxdb_label {'puppetlabs/influxdb':
ensure => present,
org => 'puppetlabs',
}
EOS
features: ['canonicalize', 'simple_get_filter'],
attributes: {
ensure: {
type: 'Enum[present, absent]',
desc: 'Whether the label should be present or absent on the target system.',
default: 'present',
},
name: {
type: 'String',
desc: 'Name of the label',
behavior: :namevar,
},
org: {
type: 'String',
desc: 'Organization the label belongs to',
},
properties: {
type: 'Optional[Hash]',
desc: 'Key/value pairs associated with the label',
},
host: {
type: 'Optional[String]',
desc: 'The host running InfluxDB',
behavior: :parameter
},
port: {
type: 'Optional[Integer]',
desc: 'Port used by the InfluxDB service',
default: 8086,
behavior: :parameter,
},
token: {
type: 'Optional[Sensitive[String]]',
desc: 'Administrative token used for authenticating API calls',
behavior: :parameter,
},
token_file: {
type: 'Optional[String]',
desc: 'File on disk containing an administrative token',
behavior: :parameter,
},
use_ssl: {
type: 'Boolean',
desc: 'Whether to enable SSL for the InfluxDB service',
default: true,
behavior: :parameter,
}
},
)