-
Notifications
You must be signed in to change notification settings - Fork 87
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
🚸 : mandatory variables #129
Conversation
1dc3756
to
be6a949
Compare
ffb9972
to
4c9395f
Compare
3d4c3f0
to
2dd6033
Compare
// getting the module | ||
var module = this.moduleRepository.findById(stack.getModuleId()).orElseThrow(); | ||
|
||
for(TerraformVariable variable : module.getVariables()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not a java stream with operators filter
and anyMatch
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, using allMatch :
return module.getVariables().stream()
.filter(TerraformVariable::isMandatory)
.allMatch(variable -> {
var variableValue = stack.getVariableValues().get(variable.getName());
return variableValue != null && !variableValue.isBlank();
});
// getting the module | ||
var module = this.moduleRepository.findById(stack.getModuleId()).orElseThrow(); | ||
|
||
for(TerraformVariable variable : module.getVariables()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here I guess
27bba94
to
a82f1e4
Compare
a82f1e4
to
c30568e
Compare
No description provided.