Skip to content

Commit

Permalink
Add parameter_group_name_prefix_enabled variable
Browse files Browse the repository at this point in the history
  • Loading branch information
aknysh committed Oct 6, 2023
1 parent fd4115c commit f0d2f8b
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 28 deletions.
9 changes: 5 additions & 4 deletions examples/complete/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ stage = "test"

name = "rds-cluster"

# https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.SupportAurora
instance_type = "db.t3.medium"

cluster_family = "aurora-mysql8.0"

engine = "aurora-mysql"

engine_mode = "provisioned"

cluster_size = 1

deletion_protection = false

autoscaling_enabled = false

engine = "aurora-mysql"

engine_mode = "provisioned"

db_name = "test_db"

admin_user = "admin"
Expand Down
16 changes: 10 additions & 6 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@ provider "aws" {
}

module "vpc" {
source = "cloudposse/vpc/aws"
version = "2.1.0"
source = "cloudposse/vpc/aws"
version = "2.1.0"

ipv4_primary_cidr_block = "172.16.0.0/16"
context = module.this.context

context = module.this.context
}

module "subnets" {
source = "cloudposse/dynamic-subnets/aws"
version = "2.4.1"
source = "cloudposse/dynamic-subnets/aws"
version = "2.4.1"

availability_zones = var.availability_zones
vpc_id = module.vpc.vpc_id
igw_id = [module.vpc.igw_id]
ipv4_cidr_block = [module.vpc.vpc_cidr_block]
nat_gateway_enabled = false
nat_instance_enabled = false
context = module.this.context

context = module.this.context
}

module "rds_cluster" {
Expand Down
3 changes: 2 additions & 1 deletion examples/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ variable "region" {
}

variable "availability_zones" {
type = list(string)
type = list(string)
description = "Availability zones"
}

variable "instance_type" {
Expand Down
17 changes: 9 additions & 8 deletions examples/postgres/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ stage = "test"

name = "rds-cluster"

instance_type = "db.m5d.large"
# https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.SupportAurora
instance_type = "db.t3.large"

cluster_family = "postgres14"
cluster_family = "aurora-postgresql15"

cluster_size = 1
engine_version = "15.3"

deletion_protection = false
engine = "aurora-postgresql"

autoscaling_enabled = false
engine_mode = "provisioned"

engine = "postgres"
cluster_size = 1

engine_mode = "provisioned"
deletion_protection = false

engine_version = "14.7"
autoscaling_enabled = false

db_name = "test_db"

Expand Down
11 changes: 8 additions & 3 deletions examples/serverlessv2_postgres/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
enabled = true

region = "us-east-2"

availability_zones = ["us-east-2a", "us-east-2b"]
Expand All @@ -10,13 +8,20 @@ stage = "test"

name = "rds-cluster"

engine = "aurora-postgresql"

cluster_family = "aurora-postgresql13"

engine_version = "13.6"

instance_type = "db.serverless"

cluster_size = 1

deletion_protection = false

autoscaling_enabled = false


db_name = "test_db"

admin_user = "postgres"
Expand Down
9 changes: 4 additions & 5 deletions examples/serverlessv2_postgres/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ module "subnets" {
module "rds_cluster_aurora_serverlessv2_postgres_13" {
source = "../../"

engine = "aurora-postgresql"
cluster_family = "aurora-postgresql13"
engine_version = "13.6"
instance_type = var.instance_type
engine = var.engine
cluster_family = var.cluster_family
engine_version = var.engine_version
cluster_size = var.cluster_size
admin_user = var.admin_user
admin_password = var.admin_password
db_name = var.db_name
instance_type = "db.serverless"
vpc_id = module.vpc.vpc_id
subnets = module.subnets.private_subnet_ids
security_groups = [module.vpc.vpc_default_security_group_id]
Expand All @@ -45,6 +45,5 @@ module "rds_cluster_aurora_serverlessv2_postgres_13" {
min_capacity = var.min_capacity
}


context = module.this.context
}
24 changes: 23 additions & 1 deletion examples/serverlessv2_postgres/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,29 @@ variable "region" {
}

variable "availability_zones" {
type = list(string)
type = list(string)
description = "Availability zones"
}

variable "cluster_family" {
type = string
description = "The family of the DB cluster parameter group"
}

variable "engine" {
type = string
description = "The name of the database engine to be used for this DB cluster. Valid values: `aurora`, `aurora-mysql`, `aurora-postgresql`"
}

variable "engine_version" {
type = string
default = ""
description = "The version of the database engine to use. See `aws rds describe-db-engine-versions` "
}

variable "instance_type" {
type = string
description = "Instance type to use"
}

variable "cluster_size" {
Expand Down

0 comments on commit f0d2f8b

Please sign in to comment.