terraform
terraform copied to clipboard
Can "terraform plan" and "terraform apply" have an option to not show the sentinel policies
Terraform Version
Terraform v1.9.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/tfe v0.60.0
Use Cases
When I run a plan or apply locally against a remote execution workspace, I see the sentinel policies.
I have to scroll up a few pages to see the actual plan output.
Attempted Solutions
terraform plan -var-file=tfvars/workspaces.tfvars | sed /^-----/q
This will prevent the sentinel policies from showing - but it is a pain to type it
Proposal
terraform plan -var-file=tfvars/workspaces.tfvars -show-sentinel=false
or
export TF_SHOW_SENTINEL=false
References
No response
Hi @scott-doyland-burrows,
Terraform doesn't run sentinel or know anything about its policies, so there's not really any way for it to control the output.
I'm guessing you are using the cloud backend, and executing the plan remotely? If that's the case then it probably needs to be an Cloud/TFE feature to deal with the option, since Terraform is essentially only echoing the remote process's output.
Yes, I am using the cloud backend.
I'll try and find out where to raise terraform cloud feature requests.
@scott-doyland-burrows you can find all of that information in our bug report template!
https://github.com/hashicorp/terraform/issues/new?assignees=&labels=bug%2Cnew&projects=&template=bug_report.yml
The relevant information is:
HCP Terraform or Terraform Enterprise: please email [email protected] or open a new request.
I was hoping there was a terraform flag for this
one workaround for this:
terraform plan | sed '/Organization policy check/q'
the policies are still gonna be checked but the output will not bloat the console