Terraform format - tips & tricks
#cloud #terraform
Hi All!
As many of us know that terraform is one of the popular Infrastructure as Code (IaC) tool/mechanism which is cloud agnostic as well.
We had already seen about the usage of terraform console in my one of the posts.
In today's post we're going to see about terrafor fmt
Some of the times when we do minor change on terraform files, there may alignment issues happen. Even it won't harm the process of deployment but due to disordered format, difficult to read the file(s) by user.
Some/most of us use the below commands typically
- terraform init
- terraform plan
- terraform validate
- terraform apply
Even though, we play with above main commands, terraform fmt (format) is also an additional command helps to align terraform files.
So hereinafter we will use terraform fmt as the first command in our devops pipeline.
Please look into the below image.
Comments
Post a Comment