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
Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
Workspace name isn't detected for Terraform Cloud in subfolders.
It works only for the root of the repository.
Reproduction Steps
Setup Terraform Cloud account and sync the state of the module in arbitrary subfolder
Atlantis will use default workspace and doesn't detect name example name for the workspace from the example1/terraform.tf.
running "/usr/local/bin/terraform workspace new default" in "/home/atlantis/.atlantis/repos/xxxxxx/atlantis-example/9/default/example1": exit status 1: default workspace not supported
You can create a new workspace with the "workspace new" command.
Logs
2023-03-20 17:38:21 | {"level":"debug","ts":"2023-03-20T16:38:21.101Z","caller":"events/project_finder.go:106","msg":"no Terraform Cloud workspace explicitly configured in Terraform codes. Use default workspace (\"default\")","json":{"repo":"xxxx/atlantis-example","pull":"9"}}
Additional Context
Related to the implementation #2432, it works only for the root of the repository, but not for the subfolders.
* Bugfix: Workspace detection for Terraform Cloud doesn't work for subfolders
DetermineWorkspaceFromHCL supplied repoDir parameter therefore it
doesn't work for subfolders.
Community Note
Overview of the Issue
Workspace name isn't detected for Terraform Cloud in subfolders.
It works only for the root of the repository.
Reproduction Steps
Example:
example1/terraform.tf
Push the module
example1
to the GitHub repositoryAtlantis will use
default
workspace and doesn't detect nameexample
name for the workspace from theexample1/terraform.tf
.Logs
Additional Context
Related to the implementation #2432, it works only for the root of the repository, but not for the subfolders.
Here is a line with the issue
atlantis/server/events/project_command_builder.go
Line 398 in 1674663
repoDir is always the same for all projects.
The text was updated successfully, but these errors were encountered: