Visitar URL original
Output URL of Terraform Cloud run on create task failure · Issue #700 · hashicorp/consul-terraform-sync · GitHub
Skip to content

Output URL of Terraform Cloud run on create task failure #700

Open

Description

@mkam

Description

If task creation fails when using the Terraform Cloud driver, the error message has the workspace name and the run ID of the failure, but not the URL to the run. A better experience would be to output a link to the run so users can easily find the details of the error. This is especially important for when the task inspection fails, as speculative runs are not listed in a workspace's run.

Example of Current Output:

$ consul-terraform-sync task create --task-file=task.hcl
==> Inspecting changes to resource if creating task 'test_task'...

    Generating plan that Consul-Terraform-Sync will use Terraform to execute

==> Error: unable to generate plan for 'test_task'
    400 Bad Request: unexpected run status for workspace test_task:
run-UaPbFH6VkkeWaPT5 errored, see logs for more details (Request ID:
4e470847-2ef1-eee0-12d3-1255e57fcf51)

Alternative Solutions

The run URL can be logged as part of the apply/plan or can be constructed by the CLI from the returned information:
<TFC host URL>/app/<organization>/workspaces/<workspace_name>/runs/<run_id>

Activity

  1. added
    enterpriseFeature will be delivered as a part of Enterprise binary
    on Feb 17, 2022
  2. added a commit that references this issue on Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enterpriseFeature will be delivered as a part of Enterprise binarygood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions