Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
feat: added warnings for missing resporces declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
ghen committed Oct 19, 2022
1 parent 1e74413 commit f18f984
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/humanitec/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package humanitec

import (
"fmt"
"log"
"os"
"regexp"
"strings"
Expand Down Expand Up @@ -47,7 +48,11 @@ func (r resourcesMap) mapVar(ref string) string {
envVar = fmt.Sprintf("%s.%s.%s", scope, resName, propName)
}
return fmt.Sprintf("${%s}", envVar)
} else {
log.Printf("Warning: Can not resolve '%s'. Property '%s' is not declared for '%s'.", ref, propName, resName)
}
} else {
log.Printf("Warning: Can not resolve '%s'. Resource '%s' is not declared.", ref, resName)
}
}

Expand Down

0 comments on commit f18f984

Please sign in to comment.