You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `aws_postgres_enable` | Boolean | Set to `true` to enable a postgres database. |
199
-
| `aws_postgres_engine` | String | Which Database engine to use. Default is `aurora-postgresql`.|
200
-
| `aws_postgres_engine_version` | String | Specify Postgres version. More information [here](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html). Default is `11.17`. |
201
-
| `aws_postgres_database_group_family` | String | Specify aws database group family. Default is `aurora-postgresql11`. See [this](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-db-parameter-group.html).|
202
-
| `aws_postgres_instance_class` | String | Define the size of the instances in the DB cluster. Default is `db.t3.medium`. |
203
-
| `aws_postgres_security_group_name` | String | The name of the Postgres security group. Defaults to `SG for ${aws_resource_identifier} - PG`. |
204
-
| `aws_postgres_subnets` | String | Specify which subnets to use as a list of strings. Example: `i-1234,i-5678,i-9101`. |
205
-
| `aws_postgres_cluster_name` | String | Specify a cluster name. Will be created if it does not exist. Defaults to `aws_resource_identifier`. |
206
-
| `aws_postgres_database_name` | String | Specify a database name. Will be created if it does not exist. Defaults to `aws_resource_identifier`. |
207
-
| `aws_postgres_database_port` | String | Specify a listening port for the database. Default is `5432`.|
208
-
| `aws_postgres_restore_snapshot` | String | Restore a snapshot to the DB. Should be set only once. Changes in this value will destroy and recreate the database completely. |
209
-
| `aws_postgres_snapshot_name` | String | Specify a database name. Will be created if it does not exist. Won't overwrite. |
210
-
| `aws_postgres_snapshot_overwrite` | Boolean | Set to true to overwrite the snapshot. |
211
-
| `aws_postgres_database_protection` | Boolean | Protects the database from deletion. Default is `false`.|
212
-
| `aws_postgres_database_final_snapshot` | Boolean | Creates a snapshot before deletion. If a string is passed, it will be used as snapsthot name. Defaults to `false`.|
198
+
| `aws_aurora_enable` | Boolean | Set to `true` to enable an [Aurora database](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html). (Postgres or MySQL). |
199
+
| `aws_aurora_engine` | String | Which Database engine to use. Default is `aurora-postgresql`.|
200
+
| `aws_aurora_engine_version` | String | Specify database version. More information [Postgres](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html) or [MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/Welcome.html). Default is `11.17`. (Postgres) |
201
+
| `aws_aurora_database_group_family` | String | Specify aws database group family. Default is `aurora-postgresql11`. See [this](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-db-parameter-group.html).|
202
+
| `aws_aurora_instance_class` | String | Define the size of the instances in the DB cluster. Default is `db.t3.medium`. |
203
+
| `aws_aurora_security_group_name` | String | The name of the database security group. Defaults to `SG for ${aws_resource_identifier} - Aurora`. |
204
+
| `aws_aurora_subnets` | String | Specify which subnets to use as a list of strings. Example: `i-1234,i-5678,i-9101`. |
205
+
| `aws_aurora_cluster_name` | String | Specify a cluster name. Will be created if it does not exist. Defaults to `aws_resource_identifier`. |
206
+
| `aws_aurora_database_name` | String | Specify a database name. Will be created if it does not exist. Defaults to `aws_resource_identifier`. |
207
+
| `aws_aurora_database_port` | String | Specify a listening port for the database. Default is `5432`.|
208
+
| `aws_aurora_restore_snapshot` | String | Restore a snapshot to the DB. Should be set only once. Changes in this value will destroy and recreate the database completely. |
209
+
| `aws_aurora_snapshot_name` | String | Specify a database name. Will be created if it does not exist. Won't overwrite. |
210
+
| `aws_aurora_snapshot_overwrite` | Boolean | Set to true to overwrite the snapshot. |
211
+
| `aws_aurora_database_protection` | Boolean | Protects the database from deletion. Default is `false`.|
212
+
| `aws_aurora_database_final_snapshot` | Boolean | Creates a snapshot before deletion. If a string is passed, it will be used as snapsthot name. Defaults to `false`.|
213
213
<hr/>
214
214
<br/>
215
215
@@ -284,9 +284,11 @@ An example EFS Zone mapping;
284
284
}
285
285
```
286
286
287
-
## Adding external Postgres database (AWS RDS)
287
+
## Adding external Aurora database (AWS RDS)
288
288
289
-
If `aws_postgres_enable` is set to `true`, this action will deploy an RDS cluster for Postgres.
289
+
If `aws_aurora_enable` is set to `true`, this action will deploy a RDS Aurora cluster using Postgres as a default.
290
+
291
+
See [this Terraform provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster) and [this other AWS doc](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-db-parameter-group.html) to set up most of the variables.
290
292
291
293
### Environment variables
292
294
The following environment variables are added to the `.env` file in your app's `docker-compose.yaml` file.
@@ -304,17 +306,18 @@ services:
304
306
The available environment variables are:
305
307
| Variable | Description |
306
308
|----------|-------------|
307
-
| `POSTGRES_CLUSTER_ENDPOINT` (and `PGHOST`) | Writer endpoint for the cluster |
308
-
| `POSTGRES_CLUSTER_PORT` (and `PGPORT`) | The database port |
Specifically, the following resources will be created:
350
353
- AWS Security Group
351
354
- AWS Security Group Rule - Allows access to the cluster's db port: `5432`
352
-
- AWS RDS Aurora Postgres
353
-
- Includes a single database (set by the input: `aws_postgres_database_name`. defaults to `root`)
355
+
- AWS RDS Aurora
356
+
- Includes a single database (set by the input: `aws_aurora_database_name`. defaults to `root`)
354
357
355
358
Additional details about the cluster that's created:
356
359
- Automated backups (7 Days)
@@ -359,7 +362,7 @@ Additional details about the cluster that's created:
359
362
- Monitoring enabled
360
363
- Sends logs to AWS Cloudwatch
361
364
362
-
> _**For more details**, see [operations/deployment/terraform/postgres.tf](operations/deployment/terraform/postgres.tf)_
365
+
> _**For more details**, see [link-to-be-updated](operations/deployment/terraform/postgres.tf)_
363
366
364
367
## Made with BitOps
365
368
[BitOps](https://bitops.sh) allows you to define Infrastructure-as-Code for multiple tools in a central place. This action uses a BitOps [Operations Repository](https://bitops.sh/operations-repo-structure/) to set up the necessary Terraform and Ansible to create infrastructure and deploy to it.
Copy file name to clipboardExpand all lines: action.yaml
+30-30Lines changed: 30 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -253,49 +253,49 @@ inputs:
253
253
required: false
254
254
255
255
# AWS RDS
256
-
aws_postgres_enable:
256
+
aws_aurora_enable:
257
257
description: 'Set to "true" to enable a postgres database'
258
258
required: false
259
-
aws_postgres_engine:
259
+
aws_aurora_engine:
260
260
description: 'Which Database engine to use'
261
261
required: false
262
-
aws_postgres_engine_version:
262
+
aws_aurora_engine_version:
263
263
description: 'Specify Postgres version'
264
264
required: false
265
-
aws_postgres_database_group_family:
265
+
aws_aurora_database_group_family:
266
266
description: 'Postgres database group family'
267
267
required: false
268
-
aws_postgres_instance_class:
268
+
aws_aurora_instance_class:
269
269
description: 'Define the size of the instances in the DB cluster'
270
270
required: false
271
-
aws_postgres_security_group_name:
271
+
aws_aurora_security_group_name:
272
272
description: 'The name of the Postgres security group'
273
273
required: false
274
-
aws_postgres_subnets:
274
+
aws_aurora_subnets:
275
275
description: 'Specify which subnets to use as a list of strings. Example: `i-1234,i-5678,i-9101`'
276
276
required: false
277
-
aws_postgres_cluster_name:
277
+
aws_aurora_cluster_name:
278
278
description: 'Specify a cluster name. Will be created if it does not exist'
279
279
required: false
280
-
aws_postgres_database_name:
280
+
aws_aurora_database_name:
281
281
description: 'Specify a database name. Will be created if it does not exist'
282
282
required: false
283
-
aws_postgres_database_port:
283
+
aws_aurora_database_port:
284
284
description: 'Postgres database port'
285
285
required: false
286
-
aws_postgres_restore_snapshot:
286
+
aws_aurora_restore_snapshot:
287
287
description: 'Restore a snapshot to the DB. Should be used only once. Changes in this value will destroy and recreate the database completely.'
288
288
required: false
289
-
aws_postgres_snapshot_name:
289
+
aws_aurora_snapshot_name:
290
290
description: 'Takes a snapshot of the cluster using that name. If none definded, no snapshot will be made. If snap already exists, no new one will be created.'
291
291
required: false
292
-
aws_postgres_snapshot_overwrite:
292
+
aws_aurora_snapshot_overwrite:
293
293
description: 'If the snapshot name is the same as an existing one, will destroy and create a new one.'
294
294
required: false
295
-
aws_postgres_database_protection:
295
+
aws_aurora_database_protection:
296
296
description: 'Protects the database from deletion.'
297
297
required: false
298
-
aws_postgres_database_final_snapshot:
298
+
aws_aurora_database_final_snapshot:
299
299
description: 'Generates a snapshot of the database before deletion.'
0 commit comments