What does command 'terraform fmt -check' do?
Experience Level: Junior
Tags: Terraform
Answer
This command checks formatting of files in the current folder and returns exit status 0 if all files are properly formatted. Non-zero exit status is returned otherwise.
Related Terraform job interview questions
Using Terraform CLI, how do you retrieve authentication token for the given hostname to Terraform Enterprise?
Terraform JuniorUsing Terraform CLI, how do you check what files need to be reformatted to standard formatting without rewriting the files?
Terraform JuniorUsing Terraform CLI, how do you reformat all files to meet the standard style including the files in subfolders?
Terraform JuniorUsing Terraform CLI, how do you reformat your Terraform configuration files in the standard style?
Terraform JuniorWhat format does variable definition file use in Terraform?
Terraform Junior