# Generated by Chef, local modifications will be overwritten

<%# TODO: Breaking change, remove defaults -%>
<%
  # Apply default transformations to @instances, an ImmutableArray
  instances = @instances.to_a

  instances.each do |instance|
    # The `server` key renders as a `host` value
    # `if` test future-proofs the key from being modified if users change to
    # using `host` as their key.
    instance['host'] = instance.delete 'server' if instance['server']

    # If `port` is unspecified, set to 5432
    instance['port'] = 5432 if instance['port'].nil?
  end
-%>
<%= JSON.parse(({'instances' => instances}).to_json).to_yaml %>

init_config:
# Nothing to configure here
