[PR #5735/fc2b1aac backport][stable-5] terraform: bugfix: init command when default workspace doesn't exists (#5776)

terraform: bugfix: init command when default workspace doesn't exists (#5735)

* feat: init when default workspace doesn't exists

* doc: add changelogs fragment and docs update

* fix: changelog formating fix

(cherry picked from commit fc2b1aac4a)

Co-authored-by: Teodor Janez Podobnik <48418580+dorkamotorka@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2023-01-07 10:53:05 +01:00 committed by GitHub
commit 8d94d16eec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -0,0 +1,3 @@
bugfixes:
- terraform - fix ``current`` workspace never getting appended to the ``all`` key in the ``workspace_ctf`` object (https://github.com/ansible-collections/community.general/pull/5735).
- terraform - fix ``terraform init`` failure when there are multiple workspaces on the remote backend and when ``default`` workspace is missing by setting ``TF_WORKSPACE`` environmental variable to the value of ``workspace`` when used (https://github.com/ansible-collections/community.general/pull/5735).