@@ -29,17 +29,17 @@ The configuration system follows these core architectural principles:
2929graph TD
3030 A[CLI Layer] --> B[config.ConfigProvider Interface]
3131 B --> C[file.FileConfigProvider Implementation]
32-
32+
3333 C --> D[Raw YAML Parsing]
3434 C --> E[Resolution Engine]
3535 C --> F[Validation Engine]
3636 C --> G[Template Resolution]
37-
37+
3838 D --> H[YAML Configuration File]
3939 E --> H
4040 F --> H
4141 G --> H
42-
42+
4343 style A fill:#e1f5fe
4444 style B fill:#f3e5f5
4545 style C fill:#f1f8e9
@@ -54,13 +54,13 @@ graph TD
5454type ConfigProvider interface {
5555 // LoadConfig loads configuration for a specific context
5656 LoadConfig (ctx context.Context , context string ) (*Config, error )
57-
57+
5858 // ListContexts returns all available contexts
5959 ListContexts () ([]string , error )
60-
60+
6161 // GetStack returns stack configuration for specific stack and context
6262 GetStack (stackName, context string ) (*StackConfig, error )
63-
63+
6464 // Validate checks configuration for consistency and errors
6565 Validate () error
6666}
@@ -151,8 +151,8 @@ Dynamic references to CloudFormation stack outputs:
151151parameters :
152152 VpcId :
153153 type : stack-output
154- stack_name : vpc-stack
155- output_key : VpcId
154+ stack : vpc-stack
155+ output : VpcId
156156` ` `
157157
158158#### **List Parameters**
@@ -163,8 +163,8 @@ parameters:
163163 SecurityGroupIds:
164164 - sg-baseline123 # Literal value
165165 - type: stack-output # Dynamic resolution
166- stack_name : security-stack
167- output_key : WebSGId
166+ stack : security-stack
167+ output : WebSGId
168168 - sg-additional456 # Another literal
169169
170170 # Simple literal list
@@ -178,7 +178,7 @@ parameters:
178178
1791791. **YAML Parsing** - `yamlParameterValue.UnmarshalYAML()` detects parameter type :
180180 - Scalar nodes → Literal parameters
181- - Mapping nodes → Resolver parameters
181+ - Mapping nodes → Resolver parameters
182182 - Sequence nodes → List parameters
183183
1841842. **Configuration Conversion** - `ToConfigParameterValue()` creates unified `ParameterValue` structures
@@ -197,8 +197,8 @@ List parameters resolve to comma-separated strings compatible with CloudFormatio
197197SecurityGroupIds:
198198 - sg-123
199199 - type: stack-output
200- stack_name : vpc-stack
201- output_key : WebSGId # Resolves to "sg-456"
200+ stack : vpc-stack
201+ output : WebSGId # Resolves to "sg-456"
202202
203203# Resolved Parameter Value
204204SecurityGroupIds: "sg-123,sg-456"
@@ -224,19 +224,19 @@ stacks:
224224 SecurityGroupIds:
225225 - sg-base
226226 - type: stack-output
227- stack_name : security
228- output_key : WebSGId
227+ stack : security
228+ output : WebSGId
229229 contexts:
230230 prod:
231231 parameters:
232232 SecurityGroupIds:
233233 - sg-prod-base # Different baseline for prod
234234 - type: stack-output
235- stack_name : security
236- output_key : WebSGId
235+ stack : security
236+ output : WebSGId
237237 - type: stack-output # Additional monitoring SG
238- stack_name : monitoring
239- output_key : MonitoringSGId
238+ stack : monitoring
239+ output : MonitoringSGId
240240` ` `
241241
242242# ## Error Handling
@@ -254,7 +254,7 @@ The system is designed for extensibility with new resolution types:
254254// Future resolver types can be added easily
255255switch paramValue.ResolutionType {
256256case "literal": // Existing
257- case "stack-output": // Existing
257+ case "stack-output": // Existing
258258case "list": // Existing
259259case "ssm-parameter": // Future: Systems Manager parameters
260260case "secrets-manager": // Future: Secrets Manager values
@@ -320,7 +320,7 @@ type yamlParameterValue struct {
320320
321321 // For complex resolution
322322 Resolver *yamlParameterResolver
323-
323+
324324 // For list parameters - detected from YAML arrays
325325 ListItems []*yamlParameterValue
326326 IsListValue bool
@@ -338,7 +338,7 @@ graph LR
338338 A[YAML: templates/vpc.yaml] --> B[resolveTemplatePath]
339339 B --> C[Absolute Path: /project/templates/vpc.yaml]
340340 C --> D[file:// URI: file:///project/templates/vpc.yaml]
341-
341+
342342 style A fill:#fff3e0
343343 style D fill:#e8f5e8
344344```
@@ -351,10 +351,10 @@ Parameters are resolved using a three-level inheritance hierarchy:
351351graph TD
352352 A[Global Parameters<br/>file.Config.*] --> B[Stack Parameters<br/>file.Stack.Parameters]
353353 B --> C[Context Parameters<br/>file.ContextOverride.Parameters]
354-
354+
355355 A -.->|inherited by| B
356356 B -.->|overridden by| C
357-
357+
358358 style A fill:#ffebee
359359 style B fill:#f3e5f5
360360 style C fill:#e8f5e8
@@ -369,11 +369,11 @@ graph TD
369369 A[Global Tags<br/>file.Config.Tags] --> B[Context Tags<br/>file.Context.Tags]
370370 B --> C[Stack Tags<br/>file.Stack.Tags]
371371 C --> D[Context Override Tags<br/>file.ContextOverride.Tags]
372-
372+
373373 A -.->|merged with| B
374374 B -.->|merged with| C
375375 C -.->|overridden by| D
376-
376+
377377 style A fill:#ffebee
378378 style B fill:#fff3e0
379379 style C fill:#f3e5f5
@@ -387,16 +387,16 @@ flowchart TD
387387 A[Start: Stack Configuration] --> B[Apply Stack Defaults]
388388 B --> C[Apply Global Defaults]
389389 C --> D{Context Override Exists?}
390-
390+
391391 D -->|Yes| E[Merge Context Parameters<br/>Context Wins]
392392 D -->|No| H[Resolve Template Path]
393-
393+
394394 E --> F[Merge Context Tags<br/>Context Wins]
395395 F --> G[Replace Dependencies & Capabilities<br/>if specified]
396396 G --> H[Convert Template Path to URI<br/>file:// scheme for file paths]
397-
397+
398398 H --> I[Return Resolved StackConfig]
399-
399+
400400 style A fill:#e3f2fd
401401 style I fill:#e8f5e8
402402 style D fill:#fff9c4
@@ -422,14 +422,14 @@ contexts:
422422 tags :
423423 Environment : dev
424424 CostCenter : engineering
425-
425+
426426 staging :
427427 account : " 123456789012"
428428 region : us-east-1
429429 tags :
430430 Environment : staging
431431 CostCenter : engineering
432-
432+
433433 prod :
434434 account : " 987654321098"
435435 region : us-east-1
@@ -445,15 +445,15 @@ stacks:
445445 # Simple literal parameters (traditional syntax)
446446 VpcCidr : 10.0.0.0/16
447447 EnableDnsHostnames : " true"
448-
448+
449449 # List parameter with mixed resolution types
450450 SecurityGroupIds :
451451 - sg-baseline123 # Literal value
452452 - type : stack-output # Dynamic from stack output
453- stack_name : security-stack
454- output_key : WebSGId
453+ stack : security-stack
454+ output : WebSGId
455455 - sg-additional456 # Another literal
456-
456+
457457 # Simple list of literals
458458 AllowedPorts :
459459 - " 80"
@@ -471,23 +471,23 @@ stacks:
471471 SecurityGroupIds :
472472 - sg-dev-baseline
473473 - type : stack-output
474- stack_name : dev-security
475- output_key : DevWebSGId
474+ stack : dev-security
475+ output : DevWebSGId
476476 prod :
477477 parameters :
478478 VpcCidr : 10.2.0.0/16
479479 # Production includes additional security groups
480480 SecurityGroupIds :
481481 - sg-prod-baseline
482482 - type : stack-output
483- stack_name : security-stack
484- output_key : WebSGId
483+ stack : security-stack
484+ output : WebSGId
485485 - type : stack-output
486- stack_name : monitoring-stack
487- output_key : MonitoringSGId
486+ stack : monitoring-stack
487+ output : MonitoringSGId
488488 tags :
489489 Component : prod-networking
490-
490+
491491 - name : database
492492 template : templates/rds.yaml
493493 depends_on : [vpc]
@@ -496,14 +496,14 @@ stacks:
496496 # Database subnets from VPC stack
497497 DBSubnetGroupSubnetIds :
498498 - type : stack-output
499- stack_name : vpc
500- output_key : DatabaseSubnet1Id
499+ stack : vpc
500+ output : DatabaseSubnet1Id
501501 - type : stack-output
502- stack_name : vpc
503- output_key : DatabaseSubnet2Id
502+ stack : vpc
503+ output : DatabaseSubnet2Id
504504 - type : stack-output
505- stack_name : vpc
506- output_key : DatabaseSubnet3Id
505+ stack : vpc
506+ output : DatabaseSubnet3Id
507507 contexts :
508508 prod :
509509 parameters :
@@ -764,10 +764,10 @@ The configuration system follows the testing patterns established in [ADR 0011](
764764func createTempConfigFile (t *testing .T , content string ) string {
765765 tmpDir := t.TempDir ()
766766 tmpFile := tmpDir + " /stackaroo.yaml"
767-
767+
768768 err := os.WriteFile (tmpFile, []byte (content), 0644 )
769769 require.NoError (t, err)
770-
770+
771771 return tmpFile
772772}
773773```
@@ -809,4 +809,4 @@ func createTempConfigFile(t *testing.T, content string) string {
809809- IDE plugins for configuration validation
810810- CI/CD pipeline integration
811811- Configuration drift detection
812- - Automated parameter discovery from templates
812+ - Automated parameter discovery from templates
0 commit comments