You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to Atmos v1.55.0 and #515, atmos terraform init and atmos terraform workspace would select the correct Terraform workspace for the component and stack, allowing further terraform commands to work correctly without needing atmos to wrap them.
Now, atmos terraform init leaves the selected workspace as-is and atmos terraform workspace does nothing. This has lead me to come close to applying changes to the wrong environment and I fear that soon I will not catch onto the situation and make the bad changes by mistake.
Expected Behavior
atmos terraform workspace by definition should select the Terraform workspace using terraform workspace select, leaving the workspace selected for future terraform commands (without Atmos).
I would also like atmos terraform init to resume its previous behavior of selected the workspace, so that I do not have to explicitly run atmos terraform workspace to select the workspace, as was the case before v1.55.
Steps to Reproduce
terraform workspace select default
atmos terraform workspace <component> -s <stack>
terraform workspace list
Output will show that the default workspace is still selected.
Screenshots
No response
Environment
No response
Additional Context
The justification for the change in #515 was that it was more efficient than running 2 commands, one to switch to the workspace and another to create it if it did not exist. Since Terraform 1.4, terraform workspace select has an -or-create option allowing you to restore the old behavior with a single command:
terraform workspace select -or-create <workspace>
However, if you want to continue to support older versions of Terraform, you can simply revert the change in #515. IMHO, the lack of persistence of workspace selection is not worth the minimal (if any) efficiency improvement. The create command is only run rarely, and under the hood Terraform must be running the same logic anyway.
The text was updated successfully, but these errors were encountered:
Describe the Bug
Prior to Atmos v1.55.0 and #515,
atmos terraform init
andatmos terraform workspace
would select the correct Terraform workspace for the component and stack, allowing furtherterraform
commands to work correctly without needingatmos
to wrap them.Now,
atmos terraform init
leaves the selected workspace as-is andatmos terraform workspace
does nothing. This has lead me to come close to applying changes to the wrong environment and I fear that soon I will not catch onto the situation and make the bad changes by mistake.Expected Behavior
atmos terraform workspace
by definition should select the Terraform workspace usingterraform workspace select
, leaving the workspace selected for futureterraform
commands (without Atmos).I would also like
atmos terraform init
to resume its previous behavior of selected the workspace, so that I do not have to explicitly runatmos terraform workspace
to select the workspace, as was the case before v1.55.Steps to Reproduce
terraform workspace select default
atmos terraform workspace <component> -s <stack>
terraform workspace list
Output will show that the default workspace is still selected.
Screenshots
No response
Environment
No response
Additional Context
The justification for the change in #515 was that it was more efficient than running 2 commands, one to switch to the workspace and another to create it if it did not exist. Since Terraform 1.4,
terraform workspace select
has an-or-create
option allowing you to restore the old behavior with a single command:However, if you want to continue to support older versions of Terraform, you can simply revert the change in #515. IMHO, the lack of persistence of workspace selection is not worth the minimal (if any) efficiency improvement. The create command is only run rarely, and under the hood Terraform must be running the same logic anyway.
The text was updated successfully, but these errors were encountered: