Skip to content

Commit

Permalink
add custom requestId header option to terraform-boot
Browse files Browse the repository at this point in the history
  • Loading branch information
WangLiNaruto committed Nov 27, 2023
1 parent 41fd84a commit 5bf359b
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public DeployResult deploy(DeployTask deployTask) {
DeployResult result = new DeployResult();
TerraformAsyncDeployFromDirectoryRequest request = getDeployRequest(deployTask);
try {
terraformApi.asyncDeployWithScripts(request);
terraformApi.asyncDeployWithScripts(request, deployTask.getId());
result.setId(deployTask.getId());
return result;
} catch (RestClientException e) {
Expand All @@ -96,7 +96,7 @@ public DeployResult destroy(DeployTask task, String stateFile) {
DeployResult result = new DeployResult();
TerraformAsyncDestroyFromDirectoryRequest request = getDestroyRequest(task, stateFile);
try {
terraformApi.asyncDestroyWithScripts(request);
terraformApi.asyncDestroyWithScripts(request, task.getId());
result.setId(task.getId());
return result;
} catch (RestClientException e) {
Expand Down Expand Up @@ -141,7 +141,8 @@ public DeployValidationResult validate(Ocl ocl) {

@Override
public String getDeployPlanAsJson(DeployTask task) {
TerraformPlan terraformPlan = terraformApi.planWithScripts(getPlanWithScriptsRequest(task));
TerraformPlan terraformPlan =
terraformApi.planWithScripts(getPlanWithScriptsRequest(task), task.getId());
return terraformPlan.getPlan();
}

Expand Down

0 comments on commit 5bf359b

Please sign in to comment.