@@ -16,13 +16,14 @@ This refactor aims to eliminate hardcoded "torrust-vm" instance names throughout
16
16
- ** Phase 2** : Template Parameterization
17
17
- ✅ Step 2a: Converted variables.tfvars to Tera template with ` {{instance_name}} ` placeholder
18
18
- ✅ Step 2b: Created template wrapper infrastructure (` VariablesTemplate ` , ` VariablesContext ` )
19
+ - ✅ Step 2c: Integrated Variables Template Rendering into workflow
19
20
20
21
### 🔄 Current Phase
21
22
22
- - ** Phase 2c ** : Integrate Variables Template Rendering (In Progress )
23
- - 🔄 Add ` VariablesTemplate ` rendering to ` RenderOpenTofuTemplatesStep `
23
+ - ** Phase 3 ** : Context Integration - Add instance_name to workflow context (Next Priority )
24
+ - 🔄 Add ` instance_name ` field to ` TofuContext ` struct
24
25
- 🔄 Pass ` instance_name ` context from provision workflow
25
- - 🔄 Replace static ` variables.tfvars ` with dynamic rendering
26
+ - 🔄 Replace hardcoded "torrust-vm" values with dynamic context
26
27
27
28
### 📋 Remaining Phases
28
29
@@ -82,13 +83,18 @@ This refactor aims to eliminate hardcoded "torrust-vm" instance names throughout
82
83
83
84
** Goal** : Add variables template rendering to infrastructure workflow
84
85
85
- #### Step 2c: Add variables rendering to workflow
86
-
87
- - 🔄 Add ` VariablesTemplate ` rendering to ` RenderOpenTofuTemplatesStep `
88
- - 🔄 Pass ` instance_name ` context from provision workflow
89
- - 🔄 Replace static ` variables.tfvars ` with dynamic rendering
90
- - ** Status** : Template wrapper ready, needs integration into workflow
91
- - ** Validation** : E2E tests should show dynamic instance naming
86
+ #### Step 2c: Integrate Variables Template Rendering into workflow ✅
87
+
88
+ - ✅ Added ` VariablesTemplate ` imports to ` TofuTemplateRenderer `
89
+ - ✅ Added ` instance_name ` field to ` TofuTemplateRenderer ` struct
90
+ - ✅ Updated ` TofuTemplateRenderer::new() ` to accept ` instance_name ` parameter
91
+ - ✅ Created ` render_variables_template() ` method for dynamic rendering
92
+ - ✅ Updated ` render_tera_templates() ` to call variables template rendering
93
+ - ✅ Removed ` variables.tfvars ` from static template files list
94
+ - ✅ Added hardcoded "torrust-vm" values for backward compatibility
95
+ - ✅ Updated all test constructors to include ` instance_name ` parameter
96
+ - ** Status** : Variables template now dynamically renders with ` instance_name = "torrust-vm" `
97
+ - ** Validation** : ✅ All linters + unit tests + e2e tests passed
92
98
93
99
### Phase 3: Context Integration
94
100
0 commit comments