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

Commit

Permalink
Fix Exec task command line arguments for Terraform variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ayltai committed Jul 8, 2020
1 parent 47d7053 commit dc6e361
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group 'com.github.ayltai'
version '0.2.10'
version '0.2.11'

sourceCompatibility = 8
targetCompatibility = 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ protected List<String> getCommandLineArgs() {
if (!this.variables.isEmpty()) {
this.variables.forEach(variable -> {
args.addAll(variable.files.stream().map(file -> "-var-file=" + file.getAbsolutePath()).collect(Collectors.toList()));
args.addAll(variable.vars.stream().map(var -> String.format(Locale.US, "-var '%1$s=%2$s'", var.name, var.value)).collect(Collectors.toList()));

variable.vars.forEach(var -> {
args.add("-var");
args.add(String.format(Locale.US, "'%1$s=%2$s'", var.name, var.value));
});
});
}

Expand Down

0 comments on commit dc6e361

Please sign in to comment.