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: "terraform web" command #32232

Closed
wants to merge 1 commit into from
Closed

command: "terraform web" command #32232

wants to merge 1 commit into from

Conversation

apparentlymart
Copy link
Member

@apparentlymart apparentlymart commented Nov 16, 2022

This is a small utility command to help bridge from Terraform CLI to the Terraform Cloud web UI.

When used in a configuration that has a Terraform Cloud configuration, it will ask the Cloud integration for a URL that represents a requested "target object" and then try to open that URL in a web browser. If launching a browser isn't possible for any reason then it'll just print out the URL it would've opened to, so that the user can hopefully still follow the link from their terminal or copy it into their browser's URL bar.

  • terraform web opens the main landing page for the currently-selected workspace
  • terraform web -latest-run opens the run details page for the most recent run in the currently-selected workspace
  • terraform web -run=ID opens the run details page for the specified run ID

I imagine there are other "target objects" that could be useful to support here later too, but since each one of these imposes a new compatibility constraint on Terraform Cloud's web UI (because of the hard-coded URL patterns and the need to keep offering a suitable page to link to) I've kept this minimal to start, mainly just to have something to play with and gather feedback on.

Draft CHANGELOG entry

NEW FEATURES:

  • terraform web: Open pages related to the current working directory in the Terraform Cloud web UI.

This is a small utility command to help bridge from Terraform CLI to the
Terraform Cloud web UI.

When used in a configuration that has a Terraform Cloud configuration, it
will ask the Cloud integration for a URL that represents a requested
"target object" and then try to open that URL in a web browser. If
launching a browser isn't possible for any reason then it'll just print
out the URL it would've opened to, so that the user can still hopefully
follow the link from their terminal or copy it into their browser's URL
bar.
@apparentlymart apparentlymart added enhancement cli cloud Related to Terraform Cloud's integration with Terraform labels Nov 16, 2022
@apparentlymart apparentlymart self-assigned this Nov 16, 2022
@apparentlymart
Copy link
Member Author

Our Terraform Cloud colleagues have indicated a preference to have most Terraform Cloud-specific functionality live under a terraform cloud subcommand whose implementation lives in a separate plugin that can evolve independently of Terraform CLI, since Terraform Cloud is a SaaS product and thus evolves on quite a different rhythm to Terraform CLI itself.

With that in mind, I think functionality like what I implemented here would be more at home in their plugin, so that they can add new possibilities to the plugin and have them become available for use more-or-less immediately, rather than having to wait for a subsequent Terraform CLI release.

Therefore I'm going to close this. Some of the early infrastructure for the separate terraform cloud subcommands was added in #33463, and I expect further work on that will continue in other PRs.

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cli cloud Related to Terraform Cloud's integration with Terraform enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant