Skip to content

Commit

Permalink
Merge pull request #397 from Icinga/bug/optional-resource-params
Browse files Browse the repository at this point in the history
Parameters host and port are optional for resource::database
  • Loading branch information
lbetz authored Dec 8, 2023
2 parents 40ac39c + 097eff4 commit 12cfb59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5004,17 +5004,21 @@ Set database type to connect.

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

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

Connect to the database on the given host. For using unix domain sockets, specify 'localhost' for
MySQL and the path to the unix domain socket and the directory for PostgreSQL.

Default value: `undef`

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

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

Port number to use.

Default value: `undef`

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

Data type: `String`
Expand Down
4 changes: 2 additions & 2 deletions manifests/resource/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
define icingaweb2::resource::database (
Enum['mysql', 'pgsql', 'mssql',
'oci', 'oracle', 'ibm', 'sqlite'] $type,
Stdlib::Host $host,
String $database,
Stdlib::Port $port,
String $resource_name = $title,
Optional[Stdlib::Host] $host = undef,
Optional[Stdlib::Port] $port = undef,
Optional[String] $username = undef,
Optional[Icingaweb2::Secret] $password = undef,
Optional[String] $charset = undef,
Expand Down

0 comments on commit 12cfb59

Please sign in to comment.