Skip to content

Commit

Permalink
updates for sumo dev rds provisioning (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Parfitt committed Nov 29, 2017
1 parent 531b60c commit f19c3c4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
28 changes: 23 additions & 5 deletions apps/sumo/infra/multi_region/tf/main.tf
Expand Up @@ -15,7 +15,7 @@ terraform {
#########################################
# Redis
#########################################

/*
module "redis-stage" {
source = "redis"
redis_name = "stage"
Expand All @@ -33,12 +33,29 @@ module "redis-prod" {
subnets = "${var.subnets}"
nodes_security_group = "${var.nodes_security_group}"
}

*/

#########################################
# MySQL
#########################################
module "mysql-dev" {
source = "rds"
mysql_env = "dev"
# DBName must begin with a letter and contain only alphanumeric characters
mysql_db_name = "sumo_dev"
mysql_username = "root"
mysql_password = "${var.mysql_dev_password}"
mysql_identifier = "sumo-dev"
mysql_instance_class = "db.t2.small"
mysql_backup_retention_days = 0
mysql_security_group_name = "sumo_rds_sg_dev"
mysql_storage_gb = 250
mysql_storage_type = "gp2"
vpc_id = "${var.vpc_id}"
vpc_cidr = "${var.vpc_cidr}"
}

/*
module "mysql-stage" {
source = "rds"
mysql_env = "stage"
Expand All @@ -49,8 +66,8 @@ module "mysql-stage" {
mysql_identifier = "sumo-stage"
mysql_instance_class = "db.t2.small"
mysql_backup_retention_days = 0
mysql_security_group_name = "sumo_rds_sg"
mysql_storage_gb = 100
mysql_security_group_name = "sumo_rds_sg_stage"
mysql_storage_gb = 250
mysql_storage_type = "gp2"
vpc_id = "${var.vpc_id}"
vpc_cidr = "${var.vpc_cidr}"
Expand All @@ -67,9 +84,10 @@ module "mysql-prod" {
mysql_instance_class = "db.m4.xlarge"
mysql_backup_retention_days = 7
mysql_security_group_name = "sumo_rds_sg_prod"
mysql_storage_gb = 200
mysql_storage_gb = 250
mysql_storage_type = "gp2"
vpc_id = "${var.vpc_id}"
vpc_cidr = "${var.vpc_cidr}"
}
*/

4 changes: 2 additions & 2 deletions apps/sumo/infra/multi_region/tf/rds/rds.tf
Expand Up @@ -53,7 +53,7 @@ variable "mysql_backup_window" {
}

variable "mysql_maintenance_window" {
default = "Sun:11:30-Sun:11:59"
default = "Sun:11:29-Sun:11:59"
}

variable "mysql_storage_encrypted" {
Expand Down Expand Up @@ -121,6 +121,6 @@ resource "aws_security_group" "sumo_rds_sg" {
}

tags {
Name = "sumo_rds_sg"
Name = "${var.mysql_security_group_name}"
}
}
4 changes: 4 additions & 0 deletions apps/sumo/infra/multi_region/tf/variables.tf
Expand Up @@ -6,9 +6,13 @@ variable "nodes_security_group" {}

variable "vpc_id" {}

variable "mysql_dev_password" {}

/*
variable "mysql_stage_password" {}
variable "mysql_prod_password" {}
*/

variable "vpc_cidr" {}

0 comments on commit f19c3c4

Please sign in to comment.