Good evening, I’m having this problem.
And I can’t identify where the error is
Could anyone help me please.
module.dbm_aurora_postgres.aws_rds_cluster_instance.this["2"]: Refreshing state... [id=dbm-aurora-postgres-2]
╷
│ Error: only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in "name"
│
│ with module.dbm_aurora_mysql.aws_db_subnet_group.this[0],
│ on .terraform/modules/dbm_aurora_mysql/main.tf line 41, in resource "aws_db_subnet_group" "this":
│ 41: name = var.name
odule "dbm_aurora_mysql" {
source = "terraform-aws-modules/rds-aurora/aws"
engine = "aurora-mysql"
engine_version = "8.0.28"
username = "user"
port = "3306"
iam_database_authentication_enabled = true
monitoring_interval = 10
apply_immediately = true
skip_final_snapshot = true
db_parameter_group_name = "aurora-mysql8.0.28"
db_cluster_parameter_group_name = "aurora-mysql8.0.28"
database_name = "mysql"
performance_insights_enabled = true
vpc_id = module.vpc.vpc_id
subnets = module.vpc.private_subnets
create_security_group = true
security_group_tags = {
Environment = "prd"
CreatedBy = "terraform"
Project = "dbm"
Description = "security group for dbm-prd-mysql"
}
deletion_protection = false
enabled_cloudwatch_logs_exports = ["mysql"]
tags = {
Environment = "prd"
CreatedBy = "terraform"
Project = "dbm"
}
}
Main
resource "aws_db_subnet_group" "this" {
count = var.create_cluster && var.db_subnet_group_name == "" ? 1 : 0
name = var.name
description = "For Aurora cluster ${var.name}"
subnet_ids = var.subnets
tags = merge(var.tags, {
Name = local.name
})
}