Format code
Auto-format all .tf files recursively
terraform fmt -recursive
More terraform commands
-
terraform output -jsonPrint all outputs as JSON; useful for pipeline scripting
-
terraform destroy -target=module.vpc.aws_vpc.mainDestroy a single resource without touching everything else
-
terraform taint module.eks.aws_instance.nodeMark resource for replacement on next apply
-
terraform state rm module.path.resource_type.nameForget a resource from state without destroying it in cloud
-
terraform refresh -var-file=prod.tfvarsUpdate state file to match real infrastructure