# @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', } }