Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
prettier-plugin-terraform-formatter
Advanced tools
Prettier plugin for formatting Terraform files using terraform fmt.
A Prettier plugin that formats Terraform files using the terraform fmt command.
npm i -D prettier prettier-plugin-terraform-formatter
Note that the Terraform tool itself is not installed by this tool -- it will attempt to shell out to your local Terraform installation each time it decides to format a file. You can install Terraform from the official docs, or use a version manager like tfenv or tfswitch.
If the formatter can't find or can't execute your local Terraform, the formatter will ignore tf files silently. You can adjust this behavior using the Options below.
{
"terraformStrictError": false
}
By default, the formatter will shell out to your local terraform installation. It will treat status code 2
as a syntax error, and any other status code as a failure to launch terraform, which it will ignore. You can change this option to true
to treat all non-zero exit codes as a failure.
WARNING: Be careful! By turning on this option, you'll require everyone on your team to install Terraform, even those people that don't normally edit Terraform files (if they happen to resolve merge conflicts locally, for example, and a Terraform file has updated, they could get stuck attempting to run Prettier in a pre-commit hook or similar situation). Only turn this on if you truly want the absence of Terraform to be a failure.
FAQs
Prettier plugin for formatting Terraform files using terraform fmt.
The npm package prettier-plugin-terraform-formatter receives a total of 1,115 weekly downloads. As such, prettier-plugin-terraform-formatter popularity was classified as popular.
We found that prettier-plugin-terraform-formatter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.