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

Expose terraform CLI logs as part of the Workspace Status #61

Open
ytsarev opened this issue Jun 16, 2022 · 3 comments
Open

Expose terraform CLI logs as part of the Workspace Status #61

ytsarev opened this issue Jun 16, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ytsarev
Copy link
Collaborator

ytsarev commented Jun 16, 2022

What problem are you facing?

Currently, it is hard to debug the terraform issues as the provider-terraform-controller exposes only brief error as the k8s event.

In cases when we need a full terraform CLI output to get more context of the error we need to kubectl exec -it into pod, copy the /tf/${workspace-uuid} directory and reproduce the error in isolation.

It takes time and is generally brittle and inconvenient.

How could Crossplane help solve your problem?

Possible solution:

@ytsarev ytsarev added the enhancement New feature or request label Jun 16, 2022
@ytsarev ytsarev self-assigned this Jun 16, 2022
@ytsarev ytsarev changed the title Expose terraform CLI as part of the Workspace Status Expose terraform CLI logs as part of the Workspace Status Jun 16, 2022
@bobh66
Copy link
Collaborator

bobh66 commented Jul 7, 2022

@ytsarev - what would you think about using Events for this type of information? I'm seeing some updates to workspaces that I don't expect and I was thinking that it would be useful to have the "diff" output from terraform plan available as an Event on the Workspace object so we can see why it thinks it needs to be updated. I don't know if there are size limitations to the Event text that would cause issues.

@ytsarev
Copy link
Collaborator Author

ytsarev commented Jul 7, 2022

@bobh66 yes, Events would be ideal, the question is how and what to capture into the Event. Currently it is concise error output, putting the whole log is too much, maybe we can find a way to capture the enough log context around the error - that would be ideal

@ytsarev
Copy link
Collaborator Author

ytsarev commented Nov 6, 2022

Looks like we should attack #24 first and if we catch enough error context there, the full logs will be redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants