Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add recursive config entry lookup to SSM evaluator (but not to env evaluator) #82

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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