Skip to content

Commit

Permalink
Timeout increased
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergii Lypnytskyi committed Sep 30, 2020
1 parent 0648e90 commit 5efe1ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/infra/terraform_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def create_resource(self):
# Terraform apply
_cmd_apply = f"terraform apply -no-color -var-file={aws_vars_path} -var-file={resource_vars_path} -auto-approve"
yield f"RUNNING: Actually CREATING resource. This may take time... {_cmd_apply}", None
err_code_apply, outp = shell_run(_cmd_apply, cwd=self.work_dir, timeout=900)
err_code_apply, outp = shell_run(_cmd_apply, cwd=self.work_dir, timeout=2000)
for s in outp:
self.logger.info(s)
yield f"Terraform apply: {s}", None
Expand All @@ -90,7 +90,7 @@ def create_resource(self):
_cmd_destroy = f"terraform destroy -no-color" \
f" -var-file={aws_vars_path} -var-file={resource_vars_path} -auto-approve"
yield f"RUNNING: DESTROYING partially created resource. This may take time... {_cmd_destroy}", None
err_code_destroy, outp = shell_run(_cmd_destroy, cwd=self.work_dir, timeout=900)
err_code_destroy, outp = shell_run(_cmd_destroy, cwd=self.work_dir, timeout=2000)
for s in outp:
self.logger.info(s)
self.logger.info(f"Terraform destroy complete. Errcode: {err_code_destroy}")
Expand Down Expand Up @@ -141,7 +141,7 @@ def destroy_resource(self):
_cmd_destroy = f"terraform destroy -no-color" \
f" -var-file={aws_vars_path} -var-file={resource_vars_path} -auto-approve"
yield f"RUNNING: Actually DESTROYING resources. This may take time... {_cmd_destroy}", None
err_code_destroy, outp = shell_run(_cmd_destroy, cwd=self.work_dir, timeout=900)
err_code_destroy, outp = shell_run(_cmd_destroy, cwd=self.work_dir, timeout=2000)
for s in outp:
self.logger.info(s)
yield f"Terraform destroy: {s}", None
Expand Down

0 comments on commit 5efe1ba

Please sign in to comment.