Skip to content

Commit

Permalink
remove the deprecated config::resource class
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Oct 18, 2023
1 parent 5cce7f2 commit e016f65
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 406 deletions.
170 changes: 0 additions & 170 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
* [`icingaweb2::config::groupbackend`](#icingaweb2--config--groupbackend): Groups of users can be stored either in a database, LDAP or ActiveDirectory. This defined type configures backends
that store groups.
* [`icingaweb2::config::navigation`](#icingaweb2--config--navigation): Navigate defines a menu entry, host- or service action.
* [`icingaweb2::config::resource`](#icingaweb2--config--resource): Create and remove Icinga Web 2 resources. Resources may be referenced in other configuration sections.
* [`icingaweb2::config::role`](#icingaweb2--config--role): Roles define a set of permissions that may be applied to users or groups.
* [`icingaweb2::inisection`](#icingaweb2--inisection): Manage settings in INI configuration files.
* [`icingaweb2::module`](#icingaweb2--module): Download, enable and configure Icinga Web 2 modules.
Expand Down Expand Up @@ -4413,175 +4412,6 @@ Filter to restrict the result of the content. Only valid for actions.

Default value: `undef`

### <a name="icingaweb2--config--resource"></a>`icingaweb2::config::resource`

Create and remove Icinga Web 2 resources. Resources may be referenced in other configuration sections.

#### Examples

##### Create a MySQL DB resource:

```puppet
icingaweb2::config::resource{ 'my-sql':
type => 'db',
db_type => 'mysql',
host => 'localhost',
port => '3306',
db_name => 'icingaweb2',
db_username => 'icingaweb2',
db_password => 'supersecret',
}
```

##### Create a LDAP resource:

```puppet
icingaweb2::config::resource{ 'my-ldap':
type => 'ldap',
host => 'localhost',
port => 389,
ldap_root_dn => 'ou=users,dc=icinga,dc=com',
ldap_bind_dn => 'cn=icingaweb2,ou=users,dc=icinga,dc=com',
ldap_bind_pw => 'supersecret',
}
```

#### Parameters

The following parameters are available in the `icingaweb2::config::resource` defined type:

* [`resource_name`](#-icingaweb2--config--resource--resource_name)
* [`type`](#-icingaweb2--config--resource--type)
* [`host`](#-icingaweb2--config--resource--host)
* [`port`](#-icingaweb2--config--resource--port)
* [`db_type`](#-icingaweb2--config--resource--db_type)
* [`db_name`](#-icingaweb2--config--resource--db_name)
* [`db_username`](#-icingaweb2--config--resource--db_username)
* [`db_password`](#-icingaweb2--config--resource--db_password)
* [`db_charset`](#-icingaweb2--config--resource--db_charset)
* [`ldap_root_dn`](#-icingaweb2--config--resource--ldap_root_dn)
* [`ldap_bind_dn`](#-icingaweb2--config--resource--ldap_bind_dn)
* [`ldap_bind_pw`](#-icingaweb2--config--resource--ldap_bind_pw)
* [`ldap_encryption`](#-icingaweb2--config--resource--ldap_encryption)
* [`ldap_timeout`](#-icingaweb2--config--resource--ldap_timeout)

##### <a name="-icingaweb2--config--resource--resource_name"></a>`resource_name`

Data type: `String`

Name of the resources. Resources are referenced by their name in other configuration sections.

Default value: `$title`

##### <a name="-icingaweb2--config--resource--type"></a>`type`

Data type: `Enum['db', 'ldap']`

Supported resource types are `db` and `ldap`.

##### <a name="-icingaweb2--config--resource--host"></a>`host`

Data type: `Optional[String]`

Connect to the database or ldap server on the given host. For using unix domain sockets, specify 'localhost' for
MySQL and the path to the unix domain socket directory for PostgreSQL. When using the 'ldap' type you can also
provide multiple hosts separated by a space.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--port"></a>`port`

Data type: `Optional[Stdlib::Port]`

Port number to use.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--db_type"></a>`db_type`

Data type:

```puppet
Optional[Enum['mysql', 'pgsql', 'mssql',
'oci', 'oracle', 'ibm', 'sqlite']]
```

Set database type to connect.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--db_name"></a>`db_name`

Data type: `Optional[String]`

The database to use. Only valid if `type` is `db`.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--db_username"></a>`db_username`

Data type: `Optional[String]`

The username to use when connecting to the server. Only valid if `type` is `db`.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--db_password"></a>`db_password`

Data type: `Optional[Icingaweb2::Secret]`

The password to use when connecting to the server. Only valid if `type` is `db`.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--db_charset"></a>`db_charset`

Data type: `Optional[String]`

The character set to use for the database connection. Only valid if `type` is `db`.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--ldap_root_dn"></a>`ldap_root_dn`

Data type: `Optional[String]`

Root object of the tree, e.g. 'ou=people,dc=icinga,dc=com'. Only valid if `type` is `ldap`.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--ldap_bind_dn"></a>`ldap_bind_dn`

Data type: `Optional[String]`

The user to use when connecting to the server. Only valid if `type` is `ldap`.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--ldap_bind_pw"></a>`ldap_bind_pw`

Data type: `Optional[Icingaweb2::Secret]`

The password to use when connecting to the server. Only valid if `type` is `ldap`.

Default value: `undef`

##### <a name="-icingaweb2--config--resource--ldap_encryption"></a>`ldap_encryption`

Data type: `Enum['none', 'starttls', 'ldaps']`

Type of encryption to use: none (default), starttls, ldaps. Only valid if `type` is `ldap`.

Default value: `'none'`

##### <a name="-icingaweb2--config--resource--ldap_timeout"></a>`ldap_timeout`

Data type: `Integer`

Timeout for the ldap connection.

Default value: `5`

### <a name="icingaweb2--config--role"></a>`icingaweb2::config::role`

Roles define a set of permissions that may be applied to users or groups.
Expand Down
129 changes: 0 additions & 129 deletions manifests/config/resource.pp

This file was deleted.

6 changes: 6 additions & 0 deletions spec/REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Reference

<!-- DO NOT EDIT: This document was generated by Puppet Strings -->

## Table of Contents

Loading

0 comments on commit e016f65

Please sign in to comment.