Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command/workspace_select: create workspace if it doesn't exist. #18934

Closed
wants to merge 5 commits into from
Closed

command/workspace_select: create workspace if it doesn't exist. #18934

wants to merge 5 commits into from

Conversation

iamnande
Copy link

Halo!

This is a pass at a flag for workspace select that creates a given workspace if it doesn't already exist.

All of the terraform repositories we run go through a CI system for actual processing. The concept of workspaces helps separate state from a single repository if multiple humans are iterating over work. Even using the best practice structure of an environment, or workspace, directory per environment we still run into the issue of manually having to create a workspace when adding environments or adding logic to the CI build to catch the error that the workspace doesn't exist.

This change adds a -create flag to the workspace select command to optionally create the workspace if it does not exist, and if it does exist - just continue as normal.

Cheers,
@iamnande

p.s. - this was a fun little aside for my brain, feel free to close/rework/etc.

@apparentlymart
Copy link
Contributor

Hi @iamnande! Thanks for working on this.

The team is largely heads-down on finish up the Terraform 0.12 development work right now so we'll come back and look at this once that work is merged down into master.

Thanks again!

@mildwonkey
Copy link
Contributor

Well hello @iamnande, I know you! I'd be happy to take a look at this - are you still interested in working on it (to resolve the conflict), or would you like me to take it over? In either case, thank you!

@mildwonkey mildwonkey self-assigned this Aug 16, 2019
@iamnande
Copy link
Author

hey there @mildwonkey! I'm down to pick it back up. I'm just coming back from a month off so i'm still figuring out how to computer again.

i can probably have a good idea of whether or not i'd like to pass it off by the weekend.

cheerio!

@hashicorp-cla
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

@mildwonkey
Copy link
Contributor

I'm going to close this since it's been quite awhile, and we've been making various changes to the workspace code so there are conflicts. Please feel free to open a new PR (or a feature request) if you're still interested. Cheers!

@mildwonkey mildwonkey closed this Aug 20, 2020
@ghost
Copy link

ghost commented Oct 11, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants