Using Terraform CLI, how do you reformat all files to meet the standard style including the files in subfolders?
Experience Level: Junior
Tags: Terraform
Answer
Run the following command:
terraform fmt -recursive
Related Terraform job interview questions
Using Terraform CLI, how do you check what files need to be reformatted to standard formatting without rewriting the files?
Terraform JuniorWhat does command 'terraform fmt -check' do?
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 JuniorHow can you provide variables using file to Terraform CLI without the need to specify the name of the variable definition file?
Terraform Junior