From 7af38b07e8485d199225b9b12f2f99f566b8b934 Mon Sep 17 00:00:00 2001 From: marycrawford Date: Thu, 25 Jul 2024 22:41:07 -0700 Subject: [PATCH] push draft rds --- .gitignore | 2 + .../aws/implementation/modules/rds/main.tf | 2 +- .../implementation/modules/rds/variables.tf | 39 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 terraform/aws/implementation/modules/rds/variables.tf diff --git a/.gitignore b/.gitignore index 4bd3c00a..eaa6f049 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,5 @@ terraform.tfstate.backup credentials.json .bash_profile awscli-bundle/ + +.secrets.txt diff --git a/terraform/aws/implementation/modules/rds/main.tf b/terraform/aws/implementation/modules/rds/main.tf index a6ce93cc..ebee5d1a 100644 --- a/terraform/aws/implementation/modules/rds/main.tf +++ b/terraform/aws/implementation/modules/rds/main.tf @@ -10,5 +10,5 @@ resource "aws_db_instance" "query-templates" { vpc_security_group_ids = var.private_subnet_ids #parameter_group_name = aws_db_parameter_group.education.name publicly_accessible = false - #skip_final_snapshot = true + skip_final_snapshot = true } diff --git a/terraform/aws/implementation/modules/rds/variables.tf b/terraform/aws/implementation/modules/rds/variables.tf new file mode 100644 index 00000000..efa9614e --- /dev/null +++ b/terraform/aws/implementation/modules/rds/variables.tf @@ -0,0 +1,39 @@ +variable "db_username" { + type = string + description = "Username of RDS Instance" + default = "tefcaViewerDbUser" +} + +variable "db_password" { + type = string + description = "Password of RDS Instance" + # TODO: Turn on sensitive once the database is fully up and save real pwd + # as a variable to ingest from the pipeline (i.e. Github Secrets) + sensitive = true + +} + + +variable "private_subnet_ids" { + type = list(string) + description = "List of private subnet IDs" + default = ["176.24.1.0/24", "176.24.3.0/24"] +} + +# Note: only lowercase alphanumeric characters and hyphens allowed in "identifier" +variable "db_identifier" { + type = string + description = "Identifier Name of RDS Instance" + default = "query-templates" +} + +variable "region" { + type = string + default = "us-east-1" +} + +# variable "vpc_id" { +# type = string +# description = "ID of the VPC" +# default = "176.24.0.0/16" +# }