blob: bc5046a271cdfef78b8891726ba7221380fe037d (
plain)
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
|
# @summary Manage the database posts for concourse.
#
# A single database is needed for each cluster.
# This resource sets up up postgres database for a given cluster.
#
# @param username
# Username used to connect to the postgres instance
# Cluster specific.
# @param password
# Password used to connect to the postgres instance.
# Cluster specific.
# @param db_name
# Name of the database to use for this cluster.
# @param cluster
# Name of the cluster in question. Changes all other values's defaults.
define concourse::database (
String $cluster = $concourse::default_cluster,
String $username = $concourse::configured_clusters[$cluster]['postgres_user'],
Variant[String, Sensitive[String]] $password = $concourse::configured_clusters[$cluster]['postgres_password'],
String $db_name = $concourse::configured_clusters[$cluster]['db_name'],
) {
postgresql::server::db { $db_name:
user => $username,
password => $password,
grant => 'ALL',
comment => 'Concourse CI',
}
}
|