Skip to content

Conversation

annalisabazzi
Copy link
Contributor

@annalisabazzi annalisabazzi commented Jun 12, 2023

Hey guys, this should fix #349
I'm no go expert so that's the warning, however.. I tested it and it seems to for work me.
I got as far as the plan because I wasn't able to run apply because of #362 - if you have something already in place there to test a quick apply that would do, my current setup doesn't allow me to proceed without tfvars.

Note: I added a function to reformat the workspace list, it may be a bit overkill because I'm using 'contains' for the lookup so the spaces, newlines, star, don't really bother it.. I decided to return a space trimmed comma separated string, but it could also be totally ditched, up to you.. it'd work anyway

@motatoes
Copy link
Contributor

Thank you for this contribution @annalisabazzi !

@motatoes motatoes merged commit c5eb10a into diggerhq:develop Jun 14, 2023
ben-of-codecraft pushed a commit to ben-of-codecraft/digger that referenced this pull request May 21, 2024
…ggerhq#354)

* fix: tf plan, list workspaces, select if it exists, new if it does not
breardon2011 pushed a commit that referenced this pull request Sep 17, 2025
* fix: tf plan, list workspaces, select if it exists, new if it does not
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

terraform workspace fails to plan/apply when workspace already exists

2 participants