Open ecthelion77 opened 1 year ago
This is interesting - the http backend does not support workspaces, it only allows the workspace name "default". The provider uses workspaces for separation of user data, one workspace per Workspace object, with the UUID as the name of the workspace, and it selects the current workspace name before doing any work on it.
Somehow the provider would need to "know" that the Workspace is using an HTTP backend and not try to select the workspace by name. I don't think we have done much with remote backends yet (obviously). @negz @ytsarev - any thoughts?
@bobh66 I tested provider-terraform with remote s3 backend back in Absa, and it worked out of the box...
I didn't dig much into this specific case but maybe we can set the workspace name dynamically via https://developer.hashicorp.com/terraform/language/settings/backends/http#address ?
@ytsarev I think the problem is caused by the "terraform workspace select" command that the provider uses to set the workspace to the UUID value. That command seems to fail when the backend is http because only the default workspace is allowed for that backend. If we allowed the user to somehow indicate that terraform workspace select should not be called, we risk having multiple Workspaces using the same "default" backend if it is configured improperly. Or we ignore the error for that specific case, but that doesn't seem like a good idea either.
Other than not supporting the http backend I don't have any good workarounds - ideas?
What happened?
When i try to use an http backend for state on gitlab, I have the following error message in my workspace object :
Configuration is working well when
How can we reproduce it?
Provider config
Workspace config :
backend.tfvars :
What environment did it happen in?