Using Terraform CLI, how do you validate configurration and get any errors in structured JSON format?
Experience Level: Junior
Tags: Terraform
Answer
Run the following command:
terraform validate -json
Related Terraform job interview questions
Using Terraform CLI, how do you get a plan to destroy all objects currently managed by the Terraform configuration?
Terraform JuniorUsing Terraform CLI, how do you review what changes will be done to your target infrastructure based on the configuration?
Terraform JuniorWill 'terraform validate' raise error when you use both tabs and spaces in Terraform configuration?
Terraform JuniorWhat does 'terraform validate' command to in Terraform CLI?
Terraform JuniorTo keep Terraform configuration secure, you shouldn't hardcode credentials. How can you securely provide your backend configuration using Terraform CLI?
Terraform Junior