semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Problem: Opentofu workspaces not supported with backend http

Open Khaz66 opened this issue 1 year ago • 5 comments

Issue

I tried to launch my opentofu code with semaphore UI. In my organization, we use our own git to store the tf.state so we use a backend http.

When i launch the task i have a message :

image

It seems that the backend http doesn't support workspaces. Would it be possible to make the use of a workspace optionnal ?

Impact

Other

Installation method

Binary

Database

MySQL

Browser

Firefox

Semaphore Version

2.10.22-e44910d-1721658299

Ansible Version

No response

Logs & errors

No response

Manual installation - system information

No response

Configuration

No response

Additional information

OpenTofu v1.8.1

Khaz66 avatar Sep 04 '24 06:09 Khaz66

I have the same issue. Haven't found any workarounds

jriberg avatar Sep 23 '24 14:09 jriberg

I made a fix here in this PR. I'm using my branch right now in my own environment.

Pull Request

jriberg avatar Sep 24 '24 12:09 jriberg

you can tryout my updated docker image from dockerhub

jriberg avatar Sep 25 '24 11:09 jriberg

I've been having the same error when trying to use terraform remote state (HCP backend) since it uses a custom workspace I would think.

zancres avatar Sep 26 '24 14:09 zancres

@zancres please try my image that I linked above, it have my fix in it and works good for me both at home and at the company I'm working for at the moment

jriberg avatar Sep 26 '24 17:09 jriberg

@fiftin Please tell me are there any chances to fix this bug soon? The change proposed by @jriberg looks reasonable, maybe there could also be an option not to choose workspace at all, in the job definition. Best regards.

salustre avatar Dec 01 '24 17:12 salustre

@fiftin Please tell me are there any chances to fix this bug soon? The change proposed by @jriberg looks reasonable, maybe there could also be an option not to choose workspace at all, in the job definition. Best regards.

The PR solves one problem and create another.

The ability to turn off workspaces looks not very good for me.

I think we need to check if workspaces works for a repo.

fiftin avatar Dec 01 '24 21:12 fiftin

I believe there's still no support for workspaces, when using the http backend.

salustre avatar Dec 01 '24 22:12 salustre

Some workaround should be implemented for sure, because in the current state the opentofu/terraform functionality i pretty much useless for http backend users.

salustre avatar Dec 05 '24 18:12 salustre

It is now corrected in the new version thank you.

Khaz66 avatar Jan 25 '25 13:01 Khaz66