Resource Type: pg_database

Defined in:
lib/puppet/type/pg_database.rb
Providers:
simple

Overview

With this type you can create,delete and manage Postgres databases. Here is an example on how you could use this:

pg_database { 'my_database@instance':
  ensure            => 'present',
  allow_connections => true,
  connection_limit  => -1,
  owner             => 'my_custom_role,
}

The ‘pg_database` type recognises all of the options you also have when using SQL to create a user or a role.

Properties

  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent

Parameters

  • provider

    The specific backend to use for this ‘pg_database` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.