Skip to content

Commit

Permalink
Check for nil SSM stanza and return
Browse files Browse the repository at this point in the history
  • Loading branch information
asebastian committed Mar 5, 2019
1 parent 2ea17bb commit 7ff5481
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/secret/ssm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ func GetSSMSecret(k string, v []byte) (string, error) {
return "", err
}

if j["$ssm"] == nil {
return "", errors.New("$ssm is nil, this is most likely due to an indentation problem")
}

var region string
var service string
if _, ok := j["$ssm"].(map[string]interface{})["service"]; ok {
Expand Down

0 comments on commit 7ff5481

Please sign in to comment.