Skip to content

Commit

Permalink
Add timeout to terraform import command (nebari-dev#949)
Browse files Browse the repository at this point in the history
* Update terraform.py

* black fix

Co-authored-by: Dan Lester <dan@ideonate.com>

Merging now because it's a very useful fix!
  • Loading branch information
tylerpotts authored Dec 2, 2021
1 parent c8853ad commit 309d5f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qhub/provider/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def output(directory=None):

def tfimport(addr, id, directory=None):
logger.info(f"terraform import directory={directory} addr={addr} id={id}")
command = ["import", addr, id]
command = ["timeout", "30s", "--signal=9", "import", addr, id]
with timer(logger, "terraform import"):
run_terraform_subprocess(
command, cwd=directory, prefix="terraform", strip_errors=True
Expand Down

0 comments on commit 309d5f5

Please sign in to comment.