command: "terraform web" command #32232
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 workspaceterraform web -latest-run
opens the run details page for the most recent run in the currently-selected workspaceterraform web -run=ID
opens the run details page for the specified run IDI 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.