From 4344b7ea65f5954fe66bb944c7baa6e8f2e604e5 Mon Sep 17 00:00:00 2001 From: Isaac Date: Mon, 1 Feb 2021 12:57:22 +0200 Subject: [PATCH] Avoid indefinite hang in case of missing variable values (#46) __NODOCS__ --- CHANGELOG.txt | 2 ++ cloudify_tf/terraform/__init__.py | 10 ++++++---- plugin.yaml | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0345782..0ec2106 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,5 @@ +0.15.1: + - Added '-input=false' to avoid indefinite hang in case of missing variables. 0.14.4: - Handle existing binary on the manager. - Mask AWS credentials if provided through environment variables. diff --git a/cloudify_tf/terraform/__init__.py b/cloudify_tf/terraform/__init__.py index df054ed..03ae830 100644 --- a/cloudify_tf/terraform/__init__.py +++ b/cloudify_tf/terraform/__init__.py @@ -86,7 +86,7 @@ def version(self): return self.execute(self._tf_command(['version']), True) def init(self, additional_args=None): - cmdline = ['init', '-no-color'] + cmdline = ['init', '-no-color', '-input=false'] if self.plugins_dir: cmdline.append('--plugin-dir=%s' % self.plugins_dir) command = self._tf_command(cmdline) @@ -95,17 +95,19 @@ def init(self, additional_args=None): return self.execute(command) def destroy(self): - command = self._tf_command(['destroy', '-auto-approve', '-no-color']) + command = self._tf_command(['destroy', '-auto-approve', '-no-color', + '-input=false']) with self._vars_file(command): return self.execute(command) def plan(self): - command = self._tf_command(['plan', '-no-color']) + command = self._tf_command(['plan', '-no-color', '-input=false']) with self._vars_file(command): return self.execute(command) def apply(self): - command = self._tf_command(['apply', '-auto-approve', '-no-color']) + command = self._tf_command(['apply', '-auto-approve', '-no-color', + '-input=false']) with self._vars_file(command): return self.execute(command) diff --git a/plugin.yaml b/plugin.yaml index 364d19b..d1165a2 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -2,7 +2,7 @@ plugins: tf: executor: central_deployment_agent package_name: cloudify-terraform-plugin - package_version: '0.15.0' + package_version: '0.15.1' dsl_definitions: