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

Add support for the workspace show command #245

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

lafentres
Copy link
Contributor

@lafentres lafentres commented Nov 12, 2021

Description

This PR adds support for the workspace show command.

Closes #239

Related links

@lafentres lafentres added enhancement New feature or request subcommand Support for Terraform CLI subcommands, e.g. `terraform init` labels Nov 12, 2021
@lafentres lafentres self-assigned this Nov 12, 2021
@lafentres lafentres changed the title [DRAFT] Add support for the workspace show command Add support for the workspace show command Nov 15, 2021
@lafentres lafentres marked this pull request as ready for review November 15, 2021 16:07
tfexec/workspace_show.go Outdated Show resolved Hide resolved
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, my only one reservation is that we aim to also more gracefully handle version differences in tfexec and this command in particular was introduced in v0.10 hashicorp/terraform@9d7fce2

Would you therefore mind adding a version check, similar to the one we have for fmt here?

err := tf.compatible(ctx, tf0_7_7, nil)
if err != nil {
return nil, fmt.Errorf("fmt was first introduced in Terraform 0.7.7: %w", err)
}

FYI There's a more long-term issue tracking this problem for all commands #121

@lafentres
Copy link
Contributor Author

This LGTM, my only one reservation is that we aim to also more gracefully handle version differences in tfexec and this command in particular was introduced in v0.10 hashicorp/terraform@9d7fce2

Would you therefore mind adding a version check, similar to the one we have for fmt here?

err := tf.compatible(ctx, tf0_7_7, nil)
if err != nil {
return nil, fmt.Errorf("fmt was first introduced in Terraform 0.7.7: %w", err)
}

FYI There's a more long-term issue tracking this problem for all commands #121

excellent point! i've added a version check for this command and a little bit of extra testing :]

Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@lafentres lafentres merged commit f6ad074 into main Nov 17, 2021
@lafentres lafentres deleted the lafentres/add-command-workspace-show branch November 17, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request subcommand Support for Terraform CLI subcommands, e.g. `terraform init`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support terraform workspace show
2 participants