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

Write Terraform CLI logs to container stdout #257

Closed
wants to merge 8 commits into from

Conversation

suramasamy
Copy link
Contributor

Description of your changes

Added optional field enableTerraformCLILogging to the Workspace resource to enable writing of Terraform CLI logs to the container stdout in JSON format to assist with debugging and to view detailed information about Terraform operations.

Fixes #163

I have:

  • Run make reviewable to ensure this PR is ready for review.
  • Run make e2e with UPTEST_EXAMPLE_LIST="examples/workspace-enable-logging.yaml"

How has this code been tested

  • On the local cluster, applied the Workspace resource present in the examples workspace-enable-logging.yaml
  • Observed that the container logs has the expected Terraform Plan and Apply logs
  • Made changes to the Workspace YAML and re-applied
  • Observed that the container logs are updated with new Terraform Plan and Apply logs
  • Changed enableTerraformCLILogging to false, made few other Terraform code changes in the Workspace YAML and re-applied
  • Observed that the container logs doesn't have the new Terraform Plan and Apply logs
  • Toggled enableTerraformCLILogging to true and re-applied the Workspace
  • Deleted the Workspace resource, Observed that the container logs has the expected Terraform Destroy logs.

suvaanshkumar and others added 6 commits April 8, 2024 13:45
Signed-off-by: Katrina Ronquillo <katrina.ronq@mail.com>
Signed-off-by: Suvaansh Kumar <suvaanshkumar@gmail.com>
Signed-off-by: Suvaansh Kumar <suvaanshkumar@gmail.com>
Signed-off-by: Katrina Ronquillo <katrina.ronq@mail.com>
Signed-off-by: Suresh Ramasamy <suramasamy@guidewire.com>
…ging

Signed-off-by: Suresh Ramasamy <suramasamy@guidewire.com>
@Upbound-CLA
Copy link

Upbound-CLA commented Apr 10, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ suramasamy
✅ suvaanshkumar
✅ katronquillo
❌ savkumar


savkumar seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

savkumar and others added 2 commits April 10, 2024 16:40
Signed-off-by: Suvaansh Kumar <suvaanshkumar@gmail.com>
Signed-off-by: Suresh Ramasamy <suramasamy@guidewire.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform apply logs
4 participants