davidalger.cloud_sql_proxy

Ansible Role: Cloud SQL Proxy

Build Status

This role installs Cloud SQL Proxy on RHEL / CentOS 7 and includes scripts to ensure cloud-sql-proxy.service remains active.

Requirements

You need a Cloud SQL instance for the proxy to connect to.

Role Variables

cloud_sql_proxy_connection_name: <project_id>:<region>:<instance_name>

This is the connection name for your Cloud SQL instance. You can find more details on this page or in the Cloud Console under your Cloud SQL instance.

For example, if you use tf-project-298d32a1:us-central1:tf-master-db1 as the connection name, the unix socket will be located at /var/run/cloud-sql-proxy/tf-project-298d32a1:us-central1:tf-master-db1.

cloud_sql_proxy_tcp_port: <tcp_port>

If you set this variable, the Cloud SQL Proxy will listen on a local TCP port instead of a unix socket.

Dependencies

There are no dependencies.

Example Playbook

- hosts: web-servers
  vars:
    cloud_sql_proxy_connection_name: tf-project-298d32a1:us-central1:tf-master-db1

  roles:
    - { role: davidalger.cloud_sql_proxy, tags: database }

License

This project is licensed under the MIT license. Check the LICENSE file for details.

Author Information

This role was created by David Alger in 2018.

Informazioni sul progetto

Cloud SQL Proxy for Linux.

Installa
ansible-galaxy install davidalger.cloud_sql_proxy
Licenza
mit
Download
1.3k
Proprietario
Principal SRE, Software Engineer, Infrastructure, DevOps, Magento Master, Cloud Architect, AWS, GCP, Terraform, Ansible, Kubernetes