auto/terraform: straight up return a string for logs
This commit is contained in:
parent
3e4862e142
commit
f96bbcf49d
1 changed files with 2 additions and 6 deletions
|
@ -29,7 +29,7 @@ class TerraformAutomation(BaseAutomation):
|
|||
def tf_apply(self, *,
|
||||
refresh: bool = True,
|
||||
parallelism: Optional[int] = None,
|
||||
lock_timeout: int = 15) -> Tuple[int, List[Dict[str, Any]]]:
|
||||
lock_timeout: int = 15) -> Tuple[int, str]:
|
||||
if not parallelism:
|
||||
parallelism = self.parallelism
|
||||
tf = subprocess.run(
|
||||
|
@ -43,11 +43,7 @@ class TerraformAutomation(BaseAutomation):
|
|||
],
|
||||
cwd=self.working_directory(),
|
||||
stdout=subprocess.PIPE)
|
||||
logs = []
|
||||
for line in tf.stdout.decode('utf-8').split('\n'):
|
||||
if line.strip():
|
||||
logs.append(json.loads(line))
|
||||
return tf.returncode, str(logs)
|
||||
return tf.returncode, tf.stdout.decode('utf-8')
|
||||
|
||||
def tf_generate(self):
|
||||
raise NotImplementedError()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue