diff --git a/REFERENCE.md b/REFERENCE.md
index 155ad164..a8cfef50 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -5004,17 +5004,21 @@ Set database type to connect.
##### `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`
+
##### `port`
-Data type: `Stdlib::Port`
+Data type: `Optional[Stdlib::Port]`
Port number to use.
+Default value: `undef`
+
##### `database`
Data type: `String`
diff --git a/manifests/resource/database.pp b/manifests/resource/database.pp
index 95c14bc3..28c1c0a4 100644
--- a/manifests/resource/database.pp
+++ b/manifests/resource/database.pp
@@ -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,