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
feat: complete Phase 1-2 of instance name parameterization
- Add .tfvars extension support to template engine
- Create variables template wrapper infrastructure
- Add variables.tfvars.tera template with {{instance_name}} placeholder
- Export variables module from LXD template wrappers
- Update refactor plan with progress status
This completes the foundational template infrastructure needed
for dynamic instance name parameterization in OpenTofu templates.
Copy file name to clipboardExpand all lines: docs/refactors/instance-name-parameterization.md
+84-18Lines changed: 84 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,35 @@
2
2
3
3
## Overview
4
4
5
-
This refactor aims t## 🔄 Design Updates
5
+
This refactor aims to eliminate hardcoded "torrust-vm" instance names throughout the codebase and replace them with parameterized values. The goal is to enable dynamic instance naming for different environments and support running multiple instances simultaneously.
6
+
7
+
## 📊 Progress Status
8
+
9
+
### ✅ Completed Phases
10
+
11
+
-**Phase 1**: Foundation - OpenTofu Variables Infrastructure
12
+
13
+
- ✅ Step 1a: Created OpenTofu variables template (`variables.tfvars`)
14
+
- ✅ Step 1b: Updated OpenTofu client for variables file support
15
+
16
+
-**Phase 2**: Template Parameterization
17
+
- ✅ Step 2a: Converted variables.tfvars to Tera template with `{{instance_name}}` placeholder
18
+
- ✅ Step 2b: Created template wrapper infrastructure (`VariablesTemplate`, `VariablesContext`)
19
+
20
+
### 🔄 Current Phase
21
+
22
+
-**Phase 2c**: Integrate Variables Template Rendering (In Progress)
23
+
- 🔄 Add `VariablesTemplate` rendering to `RenderOpenTofuTemplatesStep`
24
+
- 🔄 Pass `instance_name` context from provision workflow
25
+
- 🔄 Replace static `variables.tfvars` with dynamic rendering
26
+
27
+
### 📋 Remaining Phases
28
+
29
+
-**Phase 3**: Context Integration - Add instance_name to workflow context
0 commit comments