-
Notifications
You must be signed in to change notification settings - Fork 2
Improve error handling #92
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
Comments
This is a design decision, and to surface these errors. You need This is documented here: https://registry.terraform.io/providers/coder/coderd/latest/docs/resources/template
cc: @ethanndickson |
Sorry, must have missed that disclaimer when I read the documentation. In my opinion an error does not belong into info but into error, but you must have had your reasons. Isn't it possible to separate the outputs and print errors in the build to error? I agree that it is not necessary to print the whole plan all the time |
Unfortunately, this is a Terraform provider restriction. e.g:
As I write this message, I realise we could just wait for the build to finish/fail and then include them all as a single warning/error respectively (or just omit the logs if successful). Update: This is much nicer, will implement |
When deploying a template via the coderd_template resource, the errors from the internal commands do not bubble up.
All I get is for example this:
I have to use debug mode in terraform to get the actual error, which is very cumbersome:
2024-09-11T14:48:56.832Z [INFO] provider.terraform-provider-coderd_v0.0.4: A data resource "coder_parameter" "ado_projects" has not been declared in the root module.: job_stage="Detecting persistent resources" log_source=provisioner tf_req_id=6f199328-b1d4-3746-8d48-3cb8af035cfe job_id=10626 tf_provider_addr=registry.terraform.io/coder/coderd tf_resource_type=coderd_template @caller=github.com/coder/terraform-provider-coderd/internal/provider/template_resource.go:954 @module=coderd created_at=2024-09-11T14:48:56.783Z level=error tf_rpc=ApplyResourceChange timestamp=2024-09-11T14:48:56.832Z
It would be great if errors from the executed commands would be visible in the output.
The text was updated successfully, but these errors were encountered: