postgres

Creates a MySQL Aurora RDS database instance

This module creates a MySQL Aurora RDS database instance. It is made in the private subnets automatically created during environment setup and so can only be accessed in the VPC or through some proxy (e.g. VPN).

Backups

Opta will provision your database with 7 days of automatic daily backups in the form of RDS snapshots. You can find them either programmatically via the aws cli, or through the AWS web console (they will be called system snapshots, and they have a different tab than the manual ones).

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

In the modules reference example, the {module_name} would be replaced with rds

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

Name Description Default Required
instance_class This is the RDS instance type used for the Aurora cluster instances. db.t3.medium False
engine_version The version of the database to use. 5.7.mysql_aurora.2.04.2 False
multi_az Enable read-write replication across different availability zones on the same reason (doubles the cost, but needed for compliance). Can be added and updated at a later date without need to recreate. False False
safety Add deletion protection to stop accidental db deletions False False