🚀 Terratest Web UI
Terratest Web UI es una interfaz web moderna y minimalista para ejecutar y gestionar tests de Terraform en contenedores Docker efímeros. Proporciona una experiencia visual intuitiva para desarrolladores que necesitan probar infraestructura como código de forma aislada y reproducible.
✨ Características
- 🎨 Interfaz moderna con diseño dark minimalista
- 🐳 Ejecución en Docker - Contenedores efímeros para cada test
- 📊 Visualización de resultados - Vista JSON raw + resumen visual
- 🔐 Soporte para credenciales - SSH, Terraform Cloud, AWS
- 📁 Gestión de jobs - Historial, navegación de archivos, logs con colores
- 🖼️ Gestión de imágenes Docker - Construir, seleccionar y eliminar imágenes
- ⚡ API REST con FastAPI para integración
- 🎯 Modales personalizados - Confirmaciones elegantes sin alerts nativos
📦 Instalación
Desde PyPI (cuando se publique)
pip install terratest
Desde código fuente
git clone https://github.com/yourusername/terratest.git
cd terratest
pip install -e .
Con Poetry
poetry add terratest
🚀 Uso Rápido
Iniciar Web UI
terratest web
Abre tu navegador en http://localhost:8765
CLI
# Ejecutar un módulo de Terraform
terratest run ./examples/basic
# Ver ayuda
terratest --help
🐳 Requisitos
- Python 3.12+
- Docker instalado y corriendo
- (Opcional) Poetry para desarrollo
📖 Configuración
SSH para Repositorios Privados
- Click en el icono de configuración ⚙️
- Habilita "Autenticación SSH"
- Especifica el path a tus claves SSH (opcional, usa
~/.sshpor defecto)
Terraform Cloud
- Abre configuración
- Ingresa tu Token de Terraform Cloud
- Especifica Organización y Workspace
AWS Credentials
- Abre configuración
- Ingresa Access Key ID y Secret Access Key
- (Opcional) Session Token para credenciales temporales
🏗️ Estructura del Proyecto
terratest/
├── terratest/
│ ├── cli/ # Comandos CLI
│ ├── core/ # Lógica de negocio
│ ├── web/ # Web UI
│ │ ├── static/ # HTML, CSS, JS
│ │ └── routes/ # API endpoints
│ ├── utils/ # Utilidades
│ └── models/ # Modelos de datos
├── docker/ # Dockerfiles
├── examples/ # Ejemplos de Terraform
└── tests/ # Tests unitarios
🎨 Capturas
Dashboard Principal
- Lista de jobs ejecutados ordenados por fecha
- Botones para ejecutar, eliminar y refrescar
- Indicador de estado de imagen Docker
Visualización de Resultados
- Split view: JSON raw a la izquierda, resumen visual a la derecha
- Plan summary con contadores (add/change/destroy)
- Lista de recursos con tipos y acciones
- Outputs de Terraform
Navegación de Archivos
- Breadcrumb navigation
- Visor de logs con colores (errores en rojo, warnings en naranja)
- Limpieza automática de códigos ANSI
🛠️ Desarrollo
Setup
# Clonar repositorio
git clone https://github.com/yourusername/terratest.git
cd terratest
# Instalar dependencias
poetry install
# Activar entorno virtual
poetry shell
# Correr en modo desarrollo
poetry run terratest web
Construir Imagen Docker
docker build -t terratest/terraform:latest -f docker/Dockerfile.terraform .
Tests
pytest tests/
📝 Roadmap
- Publicar en PyPI
- Tests de integración completos
- Soporte para múltiples versiones de Terraform
- Webhooks para notificaciones
- Exportar resultados a PDF/HTML
- Integración con CI/CD
- Soporte para providers adicionales (Azure, GCP)
🤝 Contribuciones
¡Las contribuciones son bienvenidas! Por favor:
- Fork el proyecto
- Crea una rama para tu feature (
git checkout -b feature/AmazingFeature) - Commit tus cambios (
git commit -m 'Add some AmazingFeature') - Push a la rama (
git push origin feature/AmazingFeature) - Abre un Pull Request
📄 Licencia
Distribuido bajo la licencia MIT. Ver LICENSE para más información.
👤 Autor
Yorlin
🙏 Agradecimientos
- FastAPI por el framework web
- Typer por la CLI
- Docker SDK for Python
- Font Awesome por los iconos
Metadata
Release files for terratest 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| terratest-0.1.1.tar.gz | 36.9 kB | Without provenance | Details for terratest-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| terratest-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for terratest-0.1.1-py3-none-any.whl |
Total release size: 78.8 kB
Release files / terratest-0.1.1.tar.gz
| Download URL | terratest-0.1.1.tar.gz |
|---|---|
| Size | 36.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e3399ce582f589b285f895beac0fa1b6d493c55e43484843e3c097cc318cf32
|
|
BLAKE2b-256 checksum How to use checksums |
14c2f999848c6926a77269dcb613b0a32c05a05986683507cdab190774ce1ffc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / terratest-0.1.1-py3-none-any.whl
| Download URL | terratest-0.1.1-py3-none-any.whl |
|---|---|
| Size | 41.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f9af9aa365577531e2816c05c54929333a29873cae1d4f671af2a0f6854295b
|
|
BLAKE2b-256 checksum How to use checksums |
381902c5a4cf4ca5224adfa3ae9e6a79d28f30af5429d24f195393588b8c668c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for terratest 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.