Create database for legacy CC Search system
-# The development database is in a different region than the rest of the infrastructure in order to make use of
-# Amazon Glue and other AWS analytics services not yet rolled out to us-west-1.
+# Database for the old ccsearch Django app
provider "aws" {
- region = "us-east-1"
+ region = "us-west-1"
}
# Secrets must be passed in externally
@@ -10,7 +9,8 @@ variable "database_password" {
}
resource "aws_db_instance" "cccsearch-postgres-legacy" {
- instance_class = "db.t2.large"
+ name = "ccsearch-legacy-dev"
+ instance_class = "db.t2.small"
engine = "postgres"
engine_version = "10.3"
port = 5432
@@ -18,12 +18,14 @@ resource "aws_db_instance" "cccsearch-postgres-legacy" {
username = "deploy"
password = "${var.database_password}"
publicly_accessible = false
- vpc_security_group_ids = ["sg-1fea4057", "sg-3778d37f"]
+ vpc_security_group_ids = ["sg-2e7f764c"]
apply_immediately = false
backup_retention_period = 7 # days
backup_window = "07:16-07:46" # utc time
auto_minor_version_upgrade = true
storage_encrypted = false
- db_subnet_group_name = "default-vpc-b741b4cc"
+ db_subnet_group_name = "default"
parameter_group_name = "default.postgres10"
+ allocated_storage = 100
+ final_snapshot_identifier = "deleteme"
}
