Skip to content

Commit 6f23ef1

Browse files
authored
Add DB Proxy (#49)
* Add DB Proxy feature for both RDS and Aurora * Fixing var naming * Fixing "" to bool values * Index and name changes * Fix resource name * Adding missing indexes due to conditionals * Trying other approach * Alternative #2 * Skipping check * Fixes here and there * Typo in var name * 1liner * Adding some dep * Ignoring count for now * lower resource id for db * Changing input * Fixing engine family name * Fixing not null * Fixing secret for proxy connection * Fixing skip final snapshot * Fixing var check * Fixes * Fixes 2 * Logic invert * Changing the way * fix 2 * Debug * Output var value * debug 2 * Not null * Forcing deletion * Forcing a name * Removing * Debugging cleanup * Cleanup, summary fix * Output var fix * Lifecycle fixes * Alternative summary out * Option #2
1 parent 6fdc99b commit 6f23ef1

File tree

15 files changed

+851
-81
lines changed

15 files changed

+851
-81
lines changed

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,26 +223,33 @@ The following inputs can be used as `step.with` keys
223223
#### **RDS Inputs**
224224
| Name | Type | Description |
225225
|------------------|---------|------------------------------------|
226-
| `aws_rds_db_enable`| Boolean | Set to `true` to enable an RDS DB|
226+
| `aws_rds_db_enable`| Boolean | Set to `true` to enable an RDS DB. |
227+
| `aws_rds_db_proxy`| Boolean | Set to `true` to add a RDS DB Proxy. |
227228
| `aws_rds_db_name`| String | The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance. |
229+
| `aws_rds_db_user`| String | Username for the db. Defaults to `dbuser`. |
228230
| `aws_rds_db_engine`| String | Which Database engine to use. Defaults to `postgres`. |
229231
| `aws_rds_db_engine_version`| String | Which Database engine version to use. |
230232
| `aws_rds_db_security_group_name`| String | The name of the database security group. Defaults to `SG for ${aws_resource_identifier} - RDS`. |
233+
| `aws_rds_db_allowed_security_groups` | String | Comma separated list of security groups to add to the DB SG. |
234+
| `aws_rds_db_ingress_allow_all` | Boolean | Allow incoming traffic from 0.0.0.0/0. Defaults to `true`. |
235+
| `aws_rds_db_publicly_accessible` | Boolean | Allow the database to be publicly accessible. Defaults to `false`. |
231236
| `aws_rds_db_port`| String | Port where the DB listens to. |
232237
| `aws_rds_db_subnets`| String | Specify which subnets to use as a list of strings. Example: `i-1234,i-5678,i-9101`. |
233238
| `aws_rds_db_allocated_storage`| String | Storage size. Defaults to `10`. |
234239
| `aws_rds_db_max_allocated_storage`| String | Max storage size. Defaults to `0` to disable auto-scaling. |
235240
| `aws_rds_db_instance_class`| String | DB instance server type. Defaults to `db.t3.micro`. |
236-
| `aws_rds_db_user`| String | Username for the db. Defaults to `dbuser`. |
237-
| `aws_rds_cloudwatch_logs_exports`| String | Set of log types to enable for exporting to CloudWatch logs. Defaults to `postgresql`. MySQL and MariaDB: `audit, error, general, slowquery`. PostgreSQL: `postgresql, upgrade`. MSSQL: `agent , error`. Oracle: `alert, audit, listener, trace`. |
238-
| `aws_rds_additional_tags` | JSON | Add additional tags to the terraform [default tags](https://www.hashicorp.com/blog/default-tags-in-the-terraform-aws-provider), any tags put here will be added to RDS provisioned resources.|
241+
| `aws_rds_db_final_snapshot` | String | If wanted, add a snapshot name. Leave emtpy if not. |
242+
| `aws_rds_db_restore_snapshot_identifier` | String | Name of the snapshot to create the databse from. |
243+
| `aws_rds_db_cloudwatch_logs_exports`| String | Set of log types to enable for exporting to CloudWatch logs. Defaults to `postgresql`. MySQL and MariaDB: `audit, error, general, slowquery`. PostgreSQL: `postgresql, upgrade`. MSSQL: `agent , error`. Oracle: `alert, audit, listener, trace`. |
244+
| `aws_rds_db_additional_tags` | JSON | Add additional tags to the terraform [default tags](https://www.hashicorp.com/blog/default-tags-in-the-terraform-aws-provider), any tags put here will be added to RDS provisioned resources.|
239245
<hr/>
240246
<br/>
241247

242248
#### **Aurora Inputs**
243249
| Name | Type | Description |
244250
|------------------|---------|------------------------------------|
245251
| `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). |
252+
| `aws_aurora_proxy`| Boolean | Set to `true` to add an Aurora DB Proxy |
246253
| `aws_aurora_engine` | String | Which Database engine to use. Default is `aurora-postgresql`.|
247254
| `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) |
248255
| `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).|
@@ -261,6 +268,26 @@ The following inputs can be used as `step.with` keys
261268
<hr/>
262269
<br/>
263270

271+
#### **DB Proxy Inputs**
272+
| Name | Type | Description |
273+
|------------------|---------|------------------------------------|
274+
| `aws_db_proxy_enable` | Boolean | Set to `true` to enable a database proxy. |
275+
| `aws_db_proxy_name` | String | Name of the database proxy. Defaults to `aws_resource_identifier` |
276+
| `aws_db_proxy_database_id` | String | Specify the ID of the databse to use. |
277+
| `aws_db_proxy_cluster` | Boolean | Set to true if you are creating this for an RDS Cluster. Defaults to `false`. |
278+
| `aws_db_proxy_secret_name` | String | AWS Secrets manager containing database details and credentials. |
279+
| `aws_db_proxy_client_password_auth_type` | String | Overrides auth type. Using `MYSQL_NATIVE_PASSWORD`, `POSTGRES_SCRAM_SHA_256`, and `SQL_SERVER_AUTHENTICATION` depending on the database family. |
280+
| `aws_db_proxy_tls` | Boolean | Make TLS a requirement for connections. Defaults to `true`.|
281+
| `aws_db_proxy_security_group_name` | String | Name for the proxy security group. Defaults to `aws_resource_identifier`. |
282+
| `aws_db_proxy_database_security_group_allow` | Boolean | If true, will add an incoming rule from every security group associated with the DB. |
283+
| `aws_db_proxy_allowed_security_group` | String | Comma separated list fo allowed security groups to add.|
284+
| `aws_db_proxy_allow_all_incoming` | Boolean | Allow all incoming traffic to the DB Proxy. Mind that the proxy is only available from the internal network except manually exposed. Defaults to `ƒalse`.|
285+
| `aws_db_proxy_cloudwatch_enable` | Boolean | Toggle Cloudwatch logs. Will be stored in `/aws/rds/proxy/rds_proxy.name`. |
286+
| `aws_db_proxy_cloudwatch_retention_days` | String | Number of days to retain cloudwatch logs. Defaults to `14`. |
287+
| `aws_db_proxy_additional_tags` | JSON | Add additional tags to the ter added to aurora provisioned resources.|
288+
<hr/>
289+
<br/>
290+
264291
#### **Docker Inputs**
265292
| Name | Type | Description |
266293
|------------------|---------|------------------------------------|

action.yaml

Lines changed: 117 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,15 @@ inputs:
308308
aws_rds_db_enable:
309309
description: 'Set to true to enable an RDS DB.'
310310
required: false
311+
aws_rds_db_proxy:
312+
description: 'Set to true to add a RDS DB Proxy'
313+
required: false
311314
aws_rds_db_name:
312315
description: 'The name of the database to create when the DB instance is created.'
313316
required: false
317+
aws_rds_db_user:
318+
description: 'Username for the db. Defaults to dbuser.'
319+
required: false
314320
aws_rds_db_engine:
315321
description: 'Which Database engine to use. Default is postgres'
316322
required: false
@@ -320,6 +326,15 @@ inputs:
320326
aws_rds_db_security_group_name:
321327
description: 'The name of the database security group. Defaults to SG for aws_resource_identifier - RDS.'
322328
required: false
329+
aws_rds_db_allowed_security_groups:
330+
description: 'Comma separated list of security groups to add to the DB SG'
331+
required: false
332+
aws_rds_db_ingress_allow_all:
333+
description: 'Allow incoming traffic from 0.0.0.0/0.'
334+
required: false
335+
aws_rds_db_publicly_accessible:
336+
description: 'Allow the database to be publicly accessible.'
337+
required: false
323338
aws_rds_db_port:
324339
description: ' Port where the DB listens to.'
325340
required: false
@@ -335,20 +350,26 @@ inputs:
335350
aws_rds_db_instance_class:
336351
description: 'DB instance server type. Defaults to db.t3.micro.'
337352
required: false
338-
aws_rds_db_user:
339-
description: 'Username for the db. Defaults to dbuser.'
353+
aws_rds_db_final_snapshot:
354+
description: 'Generates a snapshot of the database before deletion.'
355+
required: false
356+
aws_rds_db_restore_snapshot_identifier:
357+
description: 'Name of the snapshot to restore the database from.'
340358
required: false
341-
aws_rds_cloudwatch_logs_exports:
359+
aws_rds_db_cloudwatch_logs_exports:
342360
description: 'Set of log types to enable for exporting to CloudWatch logs.'
343361
required: false
344-
aws_rds_additional_tags:
362+
aws_rds_db_additional_tags:
345363
description: 'A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`'
346364
required: false
347365

348366
# AWS Aurora
349367
aws_aurora_enable:
350368
description: 'Set to "true" to enable a postgres database'
351369
required: false
370+
aws_aurora_proxy:
371+
description: 'Set to true to add a RDS DB Proxy'
372+
required: false
352373
aws_aurora_engine:
353374
description: 'Which Database engine to use'
354375
required: false
@@ -395,6 +416,50 @@ inputs:
395416
description: 'A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`'
396417
required: false
397418

419+
# RDS Proxy
420+
aws_db_proxy_enable:
421+
description: 'Toggle DB Proxy creation'
422+
required: false
423+
aws_db_proxy_name:
424+
description: 'DB Proxy name'
425+
required: false
426+
aws_db_proxy_database_id:
427+
description: 'Database ID to create proxy for'
428+
required: false
429+
aws_db_proxy_cluster:
430+
description: 'Define if Database is a cluster or not'
431+
required: false
432+
aws_db_proxy_secret_name:
433+
description: 'Name of the secret containing DB parameters to connect to'
434+
required: false
435+
aws_db_proxy_client_password_auth_type:
436+
description: 'Auth type to use, will use the following, depending on DB the family. MYSQL_NATIVE_PASSWORD, POSTGRES_SCRAM_SHA_256, and SQL_SERVER_AUTHENTICATION'
437+
required: false
438+
aws_db_proxy_tls:
439+
description: 'Toogle TLS enforcement for connection'
440+
required: false
441+
aws_db_proxy_security_group_name:
442+
description: 'Name for the proxy security group. Default to aws_resource_identifier if none.'
443+
required: false
444+
aws_db_proxy_database_security_group_allow:
445+
description: 'Will add an incoming rule from every security group associated with the DB'
446+
required: false
447+
aws_db_proxy_allowed_security_group:
448+
description: 'Comma separated list of SG Ids to add.'
449+
required: false
450+
aws_db_proxy_allow_all_incoming:
451+
description: 'Allow all incoming traffic to the DB Proxy. Mind that the proxy is only available from the internal network except manually exposed.'
452+
required: false
453+
aws_db_proxy_cloudwatch_enable:
454+
description: 'Toggle Cloudwatch logs. Will be stored in /aws/rds/proxy/rds_proxy.name'
455+
required: false
456+
aws_db_proxy_cloudwatch_retention_days:
457+
description: 'Number of days to retain logs'
458+
required: false
459+
aws_db_proxy_additional_tags:
460+
description: 'A list of strings that will be added to created resources'
461+
required: false
462+
398463
# Docker
399464
docker_install:
400465
description: 'Define if docker should be installed. After this, docker-compose up will be excecuted.'
@@ -676,6 +741,23 @@ outputs:
676741
db_secret_details_name:
677742
description: "ECS DNS URL"
678743
value: ${{ steps.deploy.outputs.db_secret_details_name }}
744+
db_proxy_rds_endpoing:
745+
description: "Database proxy endpoint"
746+
value: ${{ steps.deploy.outputs.db_proxy_rds }}
747+
# Aurora
748+
aurora_db_endpoint:
749+
description: "ECS ALB DNS Record"
750+
value: ${{ steps.deploy.outputs.aurora_endpoint }}
751+
aurora_db_secret_details_name:
752+
description: "ECS DNS URL"
753+
value: ${{ steps.deploy.outputs.aurora_secret_details_name }}
754+
aurora_proxy_endpoint:
755+
description: "Database proxy endpoint"
756+
value: ${{ steps.deploy.outputs.db_proxy_aurora }}
757+
# DB Proxy
758+
db_proxy_endpoint:
759+
description: "Database proxy endpoint"
760+
value: ${{ steps.deploy.outputs.db_proxy_endpoint }}
679761
# ECS
680762
ecs_load_balancer_dns:
681763
description: "ECS ALB DNS Record"
@@ -819,21 +901,28 @@ runs:
819901

820902
# AWS RDS
821903
AWS_RDS_DB_ENABLE: ${{ inputs.aws_rds_db_enable }}
904+
AWS_RDS_DB_PROXY: ${{ inputs.aws_rds_db_proxy }}
822905
AWS_RDS_DB_NAME: ${{ inputs.aws_rds_db_name }}
906+
AWS_RDS_DB_USER: ${{ inputs.aws_rds_db_user }}
823907
AWS_RDS_DB_ENGINE: ${{ inputs.aws_rds_db_engine }}
824908
AWS_RDS_DB_ENGINE_VERSION: ${{ inputs.aws_rds_db_engine_version }}
825909
AWS_RDS_DB_SECURITY_GROUP_NAME: ${{ inputs.aws_rds_db_security_group_name }}
910+
AWS_RDS_DB_ALLOWED_SECURITY_GROUPS: ${{ inputs.aws_rds_db_allowed_security_groups }}
911+
AWS_RDS_DB_INGRESS_ALLOW_ALL: ${{ inputs.aws_rds_db_ingress_allow_all }}
912+
AWS_RDS_DB_PUBLICLY_ACCESSIBLE: ${{ inputs.aws_rds_db_publicly_accessible }}
826913
AWS_RDS_DB_PORT: ${{ inputs.aws_rds_db_port }}
827914
AWS_RDS_DB_SUBNETS: ${{ inputs.aws_rds_db_subnets }}
828915
AWS_RDS_DB_ALLOCATED_STORAGE: ${{ inputs.aws_rds_db_allocated_storage }}
829916
AWS_RDS_DB_MAX_ALLOCATED_STORAGE: ${{ inputs.aws_rds_db_max_allocated_storage }}
830917
AWS_RDS_DB_INSTANCE_CLASS: ${{ inputs.aws_rds_db_instance_class }}
831-
AWS_RDS_DB_USER: ${{ inputs.aws_rds_db_user }}
832-
AWS_RDS_CLOUDWATCH_LOGS_EXPORTS: ${{ inputs.aws_rds_cloudwatch_logs_exports }}
833-
AWS_RDS_ADDITIONAL_TAGS: ${{ inputs.aws_rds_additional_tags }}
918+
AWS_RDS_DB_FINAL_SNAPSHOT: ${{ inputs.aws_rds_db_final_snapshot }}
919+
AWS_RDS_DB_RESTORE_SNAPSHOT_IDENTIFIER: ${{ inputs.aws_rds_db_restore_snapshot_identifier }}
920+
AWS_RDS_DB_CLOUDWATCH_LOGS_EXPORTS: ${{ inputs.aws_rds_db_cloudwatch_logs_exports }}
921+
AWS_RDS_DB_ADDITIONAL_TAGS: ${{ inputs.aws_rds_db_additional_tags }}
834922

835923
# AWS AURORA
836924
AWS_AURORA_ENABLE: ${{ inputs.aws_aurora_enable }}
925+
AWS_AURORA_PROXY: ${{ inputs.aws_aurora_proxy }}
837926
AWS_AURORA_ENGINE: ${{ inputs.aws_aurora_engine }}
838927
AWS_AURORA_ENGINE_VERSION: ${{ inputs.aws_aurora_engine_version }}
839928
AWS_AURORA_DATABASE_GROUP_FAMILY: ${{ inputs.aws_aurora_database_group_family }}
@@ -850,6 +939,22 @@ runs:
850939
AWS_AURORA_DATABASE_FINAL_SNAPSHOT: ${{ inputs.aws_aurora_database_final_snapshot }}
851940
AWS_AURORA_ADDITIONAL_TAGS: ${{ inputs.aws_aurora_additional_tags }}
852941

942+
# AWS DB PROXY
943+
AWS_DB_PROXY_ENABLE: ${{ inputs.aws_db_proxy_enable }}
944+
AWS_DB_PROXY_NAME : ${{ inputs.aws_db_proxy_name }}
945+
AWS_DB_PROXY_DATABASE_ID : ${{ inputs.aws_db_proxy_database_id }}
946+
AWS_DB_PROXY_CLUSTER : ${{ inputs.aws_db_proxy_cluster }}
947+
AWS_DB_PROXY_SECRET_NAME : ${{ inputs.aws_db_proxy_secret_name }}
948+
AWS_DB_PROXY_CLIENT_PASSWORD_AUTH_TYPE : ${{ inputs.aws_db_proxy_client_password_auth_type }}
949+
AWS_DB_PROXY_TLS : ${{ inputs.aws_db_proxy_tls }}
950+
AWS_DB_PROXY_SECURITY_GROUP_NAME : ${{ inputs.aws_db_proxy_security_group_name }}
951+
AWS_DB_PROXY_DATABASE_SECURITY_GROUP_ALLOW : ${{ inputs.aws_db_proxy_database_security_group_allow }}
952+
AWS_DB_PROXY_ALLOWED_SECURITY_GROUP : ${{ inputs.aws_db_proxy_allowed_security_group }}
953+
AWS_DB_PROXY_ALLOW_ALL_INCOMING : ${{ inputs.aws_db_proxy_allow_all_incoming }}
954+
AWS_DB_PROXY_CLOUDWATCH_ENABLE : ${{ inputs.aws_db_proxy_cloudwatch_enable }}
955+
AWS_DB_PROXY_CLOUDWATCH_RETENTION_DAYS : ${{ inputs.aws_db_proxy_cloudwatch_retention_days }}
956+
AWS_DB_PROXY_ADDITIONAL_TAGS: ${{ inputs.aws_db_proxy_additional_tags }}
957+
853958
# Docker
854959
DOCKER_INSTALL: ${{ inputs.docker_install }}
855960
DOCKER_REMOVE_ORPHANS: ${{ inputs.docker_remove_orphans }}
@@ -967,6 +1072,11 @@ runs:
9671072
AWS_ELB_LISTEN_PORT: ${{ inputs.aws_elb_listen_port }}
9681073
RDS_ENDPOINT: ${{ steps.deploy.outputs.db_endpoint }}
9691074
RDS_SECRETS_NAME: ${{ steps.deploy.outputs.db_secret_details_name }}
1075+
RDS_PROXY: ${{ steps.deploy.outputs.db_proxy_rds }}
1076+
AURORA_ENDPOINT: ${{ steps.deploy.outputs.aurora_endpoint }}
1077+
AURORA_SECRETS_NAME: ${{ steps.deploy.outputs.aurora_secret_details_name }}
1078+
AURORA_PROXY: ${{ steps.deploy.outputs.db_proxy_aurora }}
1079+
DB_PROXY: ${{ steps.deploy.outputs.db_proxy_endpoint }}
9701080
ECS_ALB_DNS: ${{ steps.deploy.outputs.ecs_load_balancer_dns }}
9711081
ECS_DNS: ${{ steps.deploy.outputs.ecs_dns_record }}
9721082
ECR_REPO_ARN: ${{ steps.deploy.outputs.ecr_repository_arn }}

operations/_scripts/deploy/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ if [[ $(alpha_only "$TF_STATE_BUCKET_DESTROY") == true ]] && ! [[ $(alpha_only "
7979
[[ $(alpha_only "$AWS_EFS_ENABLE") == true ]] ||
8080
[[ $(alpha_only "$AWS_EC2_INSTANCE_CREATE") == true ]] ||
8181
[[ $(alpha_only "$AWS_ECS_ENABLE") == true ]] ||
82+
[[ $(alpha_only "$AWS_DB_PROXY_ENABLE") == true ]] ||
8283
[[ $(alpha_only "$AWS_ECR_REPO_CREATE") == true ]] ||
8384
[[ $(alpha_only "$AWS_EKS_CREATE") == true ]]; then
8485
export TF_STATE_BUCKET_DESTROY="false"

operations/_scripts/deploy/summary.sh

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
# AWS_ELB_LISTEN_PORT
1414
# RDS_ENDPOINT
1515
# RDS_SECRETS_NAME
16+
# RDS_PROXY
17+
# AURORA_ENDPOINT
18+
# AURORA_SECRETS_NAME
19+
# AURORA_PROXY
20+
# DB_PROXY
1621
# ECS_ALB_DNS
1722
# ECS_DNS
1823
# ECR_REPO_ARN
@@ -33,7 +38,9 @@
3338
# 9 - success, destroy infrastructure
3439
# 10 - success, ECR created
3540
# 11 - success. RDS created
36-
# 12 - success, ECS created
41+
# 12 - success, Aurora created
42+
# 13 - success, DB Proxy created
43+
# 14 - success, ECS created
3744
# 500 - cancelled
3845

3946
# Function to process and return the result as a string
@@ -87,14 +94,31 @@ if [[ $SUCCESS == 'success' ]]; then
8794
elif [[ -n $RDS_ENDPOINT ]] && [[ -n $RDS_SECRETS_NAME ]]; then
8895
SUMMARY_CODE=11
8996
result_string="## Deploy Complete! :rocket:
90-
RDS Endpoint: ${RDS_ENDPOINT}
97+
RDS URL: ${RDS_ENDPOINT}
9198
RDS Details Secret Manager name: ${RDS_SECRETS_NAME}"
92-
elif [[ -n $ECS_ALB_DNS ]] && ![[ -n $ECS_DNS ]]; then
99+
if [[ -n $RDS_PROXY ]]; then
100+
result_string+="
101+
RDS Proxy URL: ${RDS_PROXY}"
102+
fi
103+
elif [[ -n $AURORA_ENDPOINT ]] && [[ -n $AURORA_SECRETS_NAME ]]; then
93104
SUMMARY_CODE=12
94105
result_string="## Deploy Complete! :rocket:
106+
Aurora URL: ${AURORA_ENDPOINT}
107+
Aurora Details Secret Manager name: ${AURORA_SECRETS_NAME}"
108+
if [[ -n $AURORA_PROXY ]]; then
109+
result_string+="
110+
Aurora Proxy URL: ${AURORA_PROXY}"
111+
fi
112+
elif [[ -n $DB_PROXY ]]; then
113+
SUMMARY_CODE=13
114+
result_string="## Deploy Complete! :rocket:
115+
DB Proxy URL: ${DB_PROXY}"
116+
elif [[ -n $ECS_ALB_DNS ]] && ![[ -n $ECS_DNS ]]; then
117+
SUMMARY_CODE=14
118+
result_string="## Deploy Complete! :rocket:
95119
ECS LB Endpoint: ${ECS_ALB_DNS}"
96120
elif [[ -n $ECS_ALB_DNS ]] && [[ -n $ECS_DNS ]]; then
97-
SUMMARY_CODE=12
121+
SUMMARY_CODE=14
98122
result_string="## Deploy Complete! :rocket:
99123
ECS LB Endpoing: ${ECS_ALB_DNS}
100124
ECS Public DNS: ${ECS_DNS}"

operations/_scripts/generate/generate_bitops_config.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ if ([[ $(alpha_only "$AWS_EC2_INSTANCE_CREATE") == true ]] ||
8181
[[ $(alpha_only "$AWS_EFS_ENABLE") == true ]] ||
8282
[[ $(alpha_only "$AWS_AURORA_ENABLE") == true ]] ||
8383
[[ $(alpha_only "$AWS_RDS_DB_ENABLE") == true ]] ||
84-
[[ $(alpha_only "$AWS_ECS_ENABLE") == true ]]) &&
84+
[[ $(alpha_only "$AWS_ECS_ENABLE") == true ]] ||
85+
[[ $(alpha_only "$AWS_DB_PROXY_ENABLE") == true ]]) &&
8586
[[ "$(alpha_only $TF_STACK_DESTROY)" != "true" ]]; then
8687
# random_integer.az_select needs to be created before the "full stack" to avoid a potential state dependency locks
8788
targets="$targets
@@ -130,7 +131,7 @@ bitops:
130131
create_bitops_terraform_config aws false targets
131132
fi
132133
else
133-
if [[ $(alpha_only "$AWS_EC2_INSTANCE_CREATE") != "" ]] || [[ $(alpha_only "$AWS_EFS_ENABLE") != "" ]] || [[ "$AWS_AURORA_ENABLE" != "" ]] || [[ "$AWS_RDS_DB_ENABLE" != "" ]] || [[ "$AWS_ECS_ENABLE" != "" ]]; then
134+
if [[ $(alpha_only "$AWS_EC2_INSTANCE_CREATE") != "" ]] || [[ $(alpha_only "$AWS_EFS_ENABLE") != "" ]] || [[ "$AWS_AURORA_ENABLE" != "" ]] || [[ "$AWS_RDS_DB_ENABLE" != "" ]] || [[ "$AWS_ECS_ENABLE" != "" ]] || [[ "$AWS_RDS_PROXY_ENABLE" != "" ]]; then
134135
add_terraform_module aws
135136
create_bitops_terraform_config aws true targets
136137
fi

operations/_scripts/generate/generate_provider.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ provider \"aws\" {
6666
done
6767
}
6868

69-
generate_provider_aws aws ec2,r53,elb,efs,vpc,rds,aurora,ecs
69+
generate_provider_aws aws ec2,r53,elb,efs,vpc,rds,aurora,ecs,db_proxy
7070
generate_provider_aws ecr ecr
7171
generate_provider_aws eks
7272

0 commit comments

Comments
 (0)