Skip to content

Commit

Permalink
Format document, db.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
takano32 committed Feb 22, 2024
1 parent bc9ce25 commit a6124aa
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ resource "random_string" "snapshot_suffix" {
}

resource "aws_rds_cluster" "this" {
cluster_identifier = "${var.prefix}-${var.environment}"
database_name = "wordpress"
engine = "aurora-mysql"
engine_version = "8.0.mysql_aurora.3.04.0"
enable_http_endpoint = false
master_username = var.db_master_username
master_password = var.db_master_password
backup_retention_period = var.db_backup_retention_days
preferred_backup_window = var.db_backup_window
storage_encrypted = true
cluster_identifier = "${var.prefix}-${var.environment}"
database_name = "wordpress"
engine = "aurora-mysql"
engine_version = "8.0.mysql_aurora.3.04.0"
enable_http_endpoint = false
master_username = var.db_master_username
master_password = var.db_master_password
backup_retention_period = var.db_backup_retention_days
preferred_backup_window = var.db_backup_window
storage_encrypted = true
enabled_cloudwatch_logs_exports = ["audit"]

serverlessv2_scaling_configuration {
min_capacity = 3
max_capacity = 12
}

db_subnet_group_name = aws_db_subnet_group.this.name
vpc_security_group_ids = [aws_security_group.db.id]
availability_zones = [data.aws_availability_zones.this.names[0], data.aws_availability_zones.this.names[1], data.aws_availability_zones.this.names[2]]
tags = var.tags
db_subnet_group_name = aws_db_subnet_group.this.name
vpc_security_group_ids = [aws_security_group.db.id]
availability_zones = [data.aws_availability_zones.this.names[0], data.aws_availability_zones.this.names[1], data.aws_availability_zones.this.names[2]]
tags = var.tags

skip_final_snapshot = true
apply_immediately = true
skip_final_snapshot = true
apply_immediately = true
}

resource "aws_rds_cluster_instance" "cluster_instances" {
engine = "aurora-mysql"
engine_version = "8.0.mysql_aurora.3.04.0"
cluster_identifier = "${var.prefix}-${var.environment}"
instance_class = "db.serverless"
engine = "aurora-mysql"
engine_version = "8.0.mysql_aurora.3.04.0"
cluster_identifier = "${var.prefix}-${var.environment}"
instance_class = "db.serverless"

# Enhanced monitoring
monitoring_interval = 30
Expand Down

0 comments on commit a6124aa

Please sign in to comment.