Skip to content

Commit

Permalink
✨ Add recursive config entry lookup to SSM evaluator (but not to env …
Browse files Browse the repository at this point in the history
…evaluator)
  • Loading branch information
wesen committed Aug 25, 2023
1 parent e0f4ac6 commit 1fc3c4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/handlers/config/ssm-evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ func (s *SsmEvaluator) Evaluate(node interface{}) (interface{}, bool, error) {
case map[string]interface{}:
if len(value) == 1 && value["_aws_ssm"] != nil {
if ssmKey, ok := value["_aws_ssm"]; ok {
k, ok := ssmKey.(string)
v, err := EvaluateConfigEntry(ssmKey)
if err != nil {
return nil, false, fmt.Errorf("failed to evaluate SSM key: %v", err)
}
k, ok := v.(string)
if !ok {
return nil, false, fmt.Errorf("'_aws_ssm' key must have a string value")
}
Expand Down

0 comments on commit 1fc3c4e

Please sign in to comment.