mysql

Creates a MySQL database instance

This module creates a MySQL GCP Cloud SQL database. It is made with the private service access, ensuring private communication.

Linking

When linked to a k8s-service, it adds connection credentials to your container’s environment variables as:

  • {module_name}_db_user
  • {module_name}_db_password
  • {module_name}_db_name
  • {module_name}_db_host

The permission list can optionally have one entry which should be a map for renaming the default environment variable names to a user-defined value:

links:
  - db:
      - db_user: DBUSER
        db_host: DBHOST
        db_name: DBNAME
        db_password: DBPASS

If present, this map must have renames for all 4 fields.

Fields

  • instance_tier - Optional. This is the RDS instance type used for the cloud sql instance instances. Default db-f1-micro
  • safety - Optional. Set to “true”, if you want to disable the database deletion in Opta. You would have to manually set this “false” to enable DB deletion. Default False
  • engine_version - Optional. The version of the database to use. Default 5_7

Outputs

Last modified September 22, 2021: Updating latest references (62bb6e2)