Puppet Class: nginx::simple_tlsproxy

Defined in:
puppet/modules/nginx/manifests/simple_tlsproxy.pp

Overview

Class nginx::simple_tlsproxy

An nginx class to set up a reverse proxy with TLS termination for a local service.

This is useful whenever the underlying service either has no TLS capabilities or it has bad TLS performance/features.

Parameters:

  • backend_port (Any)
  • site_name (Any)
  • port (Any) (defaults to: 443)


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'puppet/modules/nginx/manifests/simple_tlsproxy.pp', line 9

class nginx::simple_tlsproxy( $backend_port, $site_name, $port=443,) {
    validate_string($site_name)
    include ::nginx
    include ::nginx::ssl

    diamond::collector::nginx{ $site_name:
        port => 10080,
    }

    ::base::expose_puppet_certs { '/etc/nginx':
        ensure          => present,
        provide_private => true,
        require         => Class['nginx'],
    }

    ::nginx::site { "${site_name}_tls_termination":
        ensure  => present,
        content => template('nginx/simple_tlsproxy.erb')
    }
}