diff --git a/octopus-samples-instances/aws-base-infrastructure-terraform/rds.tf b/octopus-samples-instances/aws-base-infrastructure-terraform/rds.tf index 97424c6..f2f78a0 100644 --- a/octopus-samples-instances/aws-base-infrastructure-terraform/rds.tf +++ b/octopus-samples-instances/aws-base-infrastructure-terraform/rds.tf @@ -3,6 +3,19 @@ resource "aws_db_subnet_group" "samples_rds_subnet_group" { subnet_ids = aws_subnet.solutions-public-sb.*.id } +resource "aws_db_parameter_group" "solutions_mariadb" { + name = "solutions_mariadb" + family = "mariadb10.6" + parameter { + name = "character_set_server" + value = "utf8" + } + + parameter { + name = "character_set_client" + value = "utf8" + } +} resource "aws_db_instance" "mariadb_rds_instance" { allocated_storage = 10 @@ -15,6 +28,21 @@ resource "aws_db_instance" "mariadb_rds_instance" { skip_final_snapshot = true db_subnet_group_name = aws_db_subnet_group.samples_rds_subnet_group.name vpc_security_group_ids = [aws_security_group.samples_security_group.id] + parameter_group_name = aws_db_parameter_group.solutions_mariadb.name +} + +resource "aws_db_parameter_group" "solutions_mysql" { + name = "solutions_mysql" + family = "mysql8.0" + parameter { + name = "character_set_server" + value = "utf8" + } + + parameter { + name = "character_set_client" + value = "utf8" + } } resource "aws_db_instance" "mysql_rds_instance" { @@ -28,6 +56,21 @@ resource "aws_db_instance" "mysql_rds_instance" { skip_final_snapshot = true db_subnet_group_name = aws_db_subnet_group.samples_rds_subnet_group.name vpc_security_group_ids = [aws_security_group.samples_security_group.id] + parameter_group_name = aws_db_parameter_group.solutions_mysql.name +} + +resource "aws_db_parameter_group" "solutions_postgresql" { + name = "solutions_postgresql" + family = "postgres14" + parameter { + name = "character_set_server" + value = "utf8" + } + + parameter { + name = "character_set_client" + value = "utf8" + } } resource "aws_db_instance" "postgresql_rds_instance" { @@ -41,6 +84,7 @@ resource "aws_db_instance" "postgresql_rds_instance" { skip_final_snapshot = true db_subnet_group_name = aws_db_subnet_group.samples_rds_subnet_group.name vpc_security_group_ids = [aws_security_group.samples_security_group.id] + parameter_group_name = aws_db_parameter_group.solutions_postgresql.name } resource "aws_db_instance" "mssql_rds_instance" {