feat(terraform): Add variables configuration
This commit is contained in:
79
terraform/aws-infrastructure/variables.tf
Normal file
79
terraform/aws-infrastructure/variables.tf
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
# Terraform Variables Configuration
|
||||||
|
# See README.md for usage examples
|
||||||
|
|
||||||
|
variable "aws_region" {
|
||||||
|
description = "AWS region"
|
||||||
|
type = string
|
||||||
|
default = "us-east-1"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "environment" {
|
||||||
|
description = "Environment (dev/staging/production)"
|
||||||
|
type = string
|
||||||
|
validation {
|
||||||
|
condition = contains(["dev", "staging", "production"], var.environment)
|
||||||
|
error_message = "Must be dev, staging, or production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "project_name" {
|
||||||
|
description = "Project name for resource naming"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vpc_cidr" {
|
||||||
|
description = "VPC CIDR block"
|
||||||
|
type = string
|
||||||
|
default = "10.0.0.0/16"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "enable_nat_gateway" {
|
||||||
|
description = "Enable NAT Gateway"
|
||||||
|
type = bool
|
||||||
|
default = true
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "instance_type" {
|
||||||
|
description = "EC2 instance type"
|
||||||
|
type = string
|
||||||
|
default = "t3.medium"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "asg_min_size" {
|
||||||
|
description = "ASG minimum size"
|
||||||
|
type = number
|
||||||
|
default = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "asg_max_size" {
|
||||||
|
description = "ASG maximum size"
|
||||||
|
type = number
|
||||||
|
default = 10
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "db_username" {
|
||||||
|
description = "Database username"
|
||||||
|
type = string
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "db_password" {
|
||||||
|
description = "Database password"
|
||||||
|
type = string
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "db_instance_class" {
|
||||||
|
description = "RDS instance class"
|
||||||
|
type = string
|
||||||
|
default = "db.t3.medium"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "alert_email_addresses" {
|
||||||
|
description = "Email addresses for alerts"
|
||||||
|
type = list(string)
|
||||||
|
default = []
|
||||||
|
}
|
||||||
|
|
||||||
|
# See full variables list in documentation
|
||||||
|
# For complete configuration examples see environments/
|
||||||
Reference in New Issue
Block a user