Skip to content

Commit

Permalink
Avoid indefinite hang in case of missing variable values (#46)
Browse files Browse the repository at this point in the history
__NODOCS__
  • Loading branch information
isaac-s authored Feb 1, 2021
1 parent 2432202 commit 4344b7e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
10 changes: 6 additions & 4 deletions cloudify_tf/terraform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 4344b7e

Please sign in to comment.