71be2abd2e
- Terraform modules: VPC, EC2, RDS, S3, CloudFront, Route53, Lambda, IAM, Security Groups - Ansible playbooks for server configuration - Scripts: create-test-environment.sh, destroy-test-environment.sh, validate-environment.sh - Documentation: README, QUICKSTART, AGENTS - Jenkins pipeline for automated deployment - Jenkins pipeline for environment destruction
103 lines
2.2 KiB
Terraform
103 lines
2.2 KiB
Terraform
# Variables para duplicación de SACC v4
|
|
# =====================================
|
|
|
|
# Entorno
|
|
variable "environment" {
|
|
description = "Entorno de despliegue (test, dev, staging)"
|
|
type = string
|
|
default = "test"
|
|
}
|
|
|
|
# Región AWS
|
|
variable "aws_region" {
|
|
description = "Región AWS para despliegue"
|
|
type = string
|
|
default = "mx-central-1"
|
|
}
|
|
|
|
# VPC
|
|
variable "vpc_cidr" {
|
|
description = "CIDR block para la VPC"
|
|
type = string
|
|
default = "10.3.0.0/16"
|
|
}
|
|
|
|
variable "availability_zones" {
|
|
description = "Zonas de disponibilidad"
|
|
type = list(string)
|
|
default = ["mx-central-1a", "mx-central-1b"]
|
|
}
|
|
|
|
# EC2
|
|
variable "ami_id" {
|
|
description = "AMI de Ubuntu 22.04 LTS"
|
|
type = string
|
|
default = "ami-0f553e2869648134e"
|
|
}
|
|
|
|
variable "instance_type" {
|
|
description = "Tipo de instancia EC2"
|
|
type = string
|
|
default = "t3.small"
|
|
}
|
|
|
|
variable "key_name" {
|
|
description = "Nombre del key pair SSH"
|
|
type = string
|
|
default = "sacc4-test-key"
|
|
}
|
|
|
|
variable "my_ip" {
|
|
description = "Tu IP pública para acceso SSH (formato: xxx.xxx.xxx.xxx/32)"
|
|
type = string
|
|
}
|
|
|
|
# RDS
|
|
variable "db_name" {
|
|
description = "Nombre de la base de datos"
|
|
type = string
|
|
default = "sacc4_test"
|
|
}
|
|
|
|
variable "db_username" {
|
|
description = "Usuario administrador de la base de datos"
|
|
type = string
|
|
default = "sacc4_admin"
|
|
}
|
|
|
|
variable "db_password" {
|
|
description = "Contraseña de la base de datos (cambiar!)"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "rds_instance_class" {
|
|
description = "Clase de instancia RDS"
|
|
type = string
|
|
default = "db.t3.micro"
|
|
}
|
|
|
|
variable "rds_allocated_storage" {
|
|
description = "Almacenamiento RDS en GB"
|
|
type = number
|
|
default = 20
|
|
}
|
|
|
|
# S3 / CloudFront
|
|
variable "s3_bucket_name" {
|
|
description = "Nombre único del bucket S3 para frontend"
|
|
type = string
|
|
default = "sacc4-frontend-test-ccsoft"
|
|
}
|
|
|
|
variable "domain_name" {
|
|
description = "Dominio para la aplicación"
|
|
type = string
|
|
default = "test-sacc.ccsoft.mx"
|
|
}
|
|
|
|
variable "certificate_arn" {
|
|
description = "ARN del certificado SSL en ACM"
|
|
type = string
|
|
default = ""
|
|
} |