+ if $upstream_db_server {
+ if !$upstream_db_port {
+ fail ('Also need a port if we have a upstream_db_server')
+ }
+ @@postgres::cluster::hba_entry { "snapshot-replica-to-${::fqdn}":
+ tag => "postgres::cluster::${upstream_db_port}::hba::${upstream_db_server}",
+ pg_port => $upstream_db_port,
+ database => 'replication',
+ user => $upstream_db_role,
+ address => $base::public_addresses,
+ }
+ }