You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: create foundation for instance name parameterization
- Create OpenTofu variables template with instance_name variable
- Update main.tf to use var.instance_name instead of hardcoded 'torrust-vm'
- Refactor OpenTofu client to accept extra_args parameter for reusability
- Update infrastructure steps to pass -var-file=variables.tfvars explicitly
- Fix variable naming: use instance_name instead of container_name for VMs
- Maintain generic client design while supporting variables file functionality
All tests pass and e2e validation successful with new parameterized approach.
Copy file name to clipboardExpand all lines: docs/refactors/instance-name-parameterization.md
+83-2Lines changed: 83 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,90 @@
2
2
3
3
## Overview
4
4
5
-
This refactor aims to eliminate the hardcoded "torrust-vm" instance name throughout the codebase and make it configurable from the top-level main function in `src/bin/e2e_tests.rs`.
5
+
This refactor aims t## 🔄 Design Updates
6
6
7
-
## Motivation
7
+
### Variable Naming Convention
8
+
9
+
-**Variable name**: `instance_name` (not `container_name`) - since we're provisioning VM instances
10
+
-**Scope**: Focus on instance name parameterization only
11
+
-**Static variables**: Keep `image` and other variables static for now (not Tera templated)
12
+
13
+
## 🎯 Implementation Plan
14
+
15
+
### Phase 1: Foundation - OpenTofu Variables Infrastructure
16
+
17
+
**Goal**: Establish OpenTofu variables file pattern and integration
0 commit comments