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

tfexec: Add (Terraform).SetLog() method #291

Merged
merged 4 commits into from
May 18, 2022

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Apr 13, 2022

Closes #290

@bflad bflad added the enhancement New feature or request label Apr 13, 2022
@radeksimko radeksimko self-requested a review May 11, 2022 09:32
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks good to me but can you also add a test which confirms the right ENV vars are being set after SetLog is called?

https://github.com/hashicorp/terraform-exec/blob/main/tfexec/terraform_test.go

Thanks!

@bflad bflad force-pushed the bflad-tfexec-terraform-setlog branch from 10402aa to 47e6c29 Compare May 18, 2022 00:25
@bflad
Copy link
Contributor Author

bflad commented May 18, 2022

Rebased and pushed up environment variable testing for both SetLog and SetLogPath. Please let me know if you'd like anything else. 👍

Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@radeksimko radeksimko merged commit 660d58b into main May 18, 2022
@radeksimko radeksimko deleted the bflad-tfexec-terraform-setlog branch May 18, 2022 06:47
rstandt pushed a commit to rstandt/terraform-exec that referenced this pull request Jun 21, 2022
* tfexec: Add (Terraform).SetLog() method

Reference: hashicorp#290

* tfexec: Add testing for SetLog

* tfexec: Add SetLogPath testing

* tfexec: Ensure SetLog version compatibility is 0.15 minimum, testing updates for darwin/arm64
bflad added a commit to hashicorp/terraform-plugin-sdk that referenced this pull request Jun 30, 2022
…erraform during acceptance testing on versions 0.15 and later

Reference: hashicorp/terraform-exec#291
Reference: #992

This allows the acceptance testing framework to appropriately set the `TF_LOG` environment variable via `terraform-exec`, if Terraform is version 0.15 or later. Otherwise, defaults to `TRACE` similar to before when `TF_ACC_LOG_PATH` or `TF_LOG_PATH_MASK` environment variables are set.
bflad added a commit to hashicorp/terraform-plugin-sdk that referenced this pull request Jul 1, 2022
…erraform during acceptance testing on versions 0.15 and later

Reference: hashicorp/terraform-exec#291
Reference: #992

This allows the acceptance testing framework to appropriately set the `TF_LOG` environment variable via `terraform-exec`, if Terraform is version 0.15 or later. Otherwise, defaults to `TRACE` similar to before when `TF_ACC_LOG_PATH` or `TF_LOG_PATH_MASK` environment variables are set.
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

Successfully merging this pull request may close these issues.

Support Configurable TF_LOG environment variable >= Terraform CLI 0.15
2 participants