terraform workspace list failure warns instead of fails (#65044)
* terraform workspace list failure warns instead of fails Fixes #64788 * add a changelog fragment
This commit is contained in:
parent
e711d01ed1
commit
b580f2929d
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- terraform module - fixes usage for providers not supporting workspaces
|
|
@ -209,7 +209,7 @@ def get_workspace_context(bin_path, project_path):
|
|||
command = [bin_path, 'workspace', 'list', '-no-color']
|
||||
rc, out, err = module.run_command(command, cwd=project_path)
|
||||
if rc != 0:
|
||||
module.fail_json(msg="Failed to list Terraform workspaces:\r\n{0}".format(err))
|
||||
module.warn("Failed to list Terraform workspaces:\r\n{0}".format(err))
|
||||
for item in out.split('\n'):
|
||||
stripped_item = item.strip()
|
||||
if not stripped_item:
|
||||
|
|
Loading…
Reference in a new issue