# Database Module Variables
variable "project_name" {
description = "Name of the project"
type = string
}
variable "environment" {
description = "Environment (dev, staging, prod)"
type = string
}
variable "vpc_id" {
description = "ID of the VPC"
type = string
}
variable "subnet_ids" {
description = "List of subnet IDs for the database"
type = list(string)
}
variable "security_group_id" {
description = "ID of the security group for the database"
type = string
}
variable "db_name" {
description = "Name of the database"
type = string
default = "lampdb"
}
variable "db_username" {
description = "Username for the database"
type = string
default = "admin"
}
variable "db_password" {
description = "Password for the database"
type = string
default = ""
sensitive = true
}
variable "db_instance_class" {
description = "Instance class for the RDS instance"
type = string
default = "db.t3.small"
}
variable "allocated_storage" {
description = "Allocated storage for the RDS instance (in GB)"
type = number
default = 20
}
variable "multi_az" {
description = "Whether to enable Multi-AZ for the RDS instance"
type = bool
default = true
}
variable "backup_retention_period" {
description = "Backup retention period for the RDS instance (in days)"
type = number
default = 7
}
variable "skip_final_snapshot" {
description = "Whether to skip the final snapshot when the RDS instance is deleted"
type = bool
default = false
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}