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

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

Open
mkam opened this issue Feb 17, 2022 · 0 comments
Open

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

mkam opened this issue Feb 17, 2022 · 0 comments
Labels
enterprise Feature will be delivered as a part of Enterprise binary good first issue Good for newcomers

Comments

@mkam
Copy link
Contributor

mkam commented Feb 17, 2022

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>

@mkam mkam added the enterprise Feature will be delivered as a part of Enterprise binary label Feb 17, 2022
@mkam mkam added the good first issue Good for newcomers label May 9, 2022
sarahethompson pushed a commit that referenced this issue Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enterprise Feature will be delivered as a part of Enterprise binary good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant