terraform fmt: Reformat your configuration in a canonical style.
terraform validate: Validate the configuration files for errors.
terraform output: Show output values from your state file.
terraform refresh: Update local state file against real resources.
terraform import: Bring real-world infrastructure into Terraform management.
terraform workspace: Manage workspaces for managing different states of your
Miscellaneous Commands
terraform version: Display the current Terraform version.
terraform taint [resource]: Mark a resource for recreation during the next apply.
terraform untaint [resource]: Remove the 'taint' from a resource.
terraform import [resource] [id]: Import existing infrastructure into Terraform management.
terraform graph: Generate a visual representation of either a configuration or execution plan.
Scripting and Automation
terraform output [name]: Query specific output values from your state file.
Executing Terraform in automation: Using Terraform in CI/CD pipelines typically involves scripting around commands like terraform init, terraform plan, and terraform apply, often with flags for automation.
This is such a clear breakdown of everyday commands—especially the state management section, which many people tend to overlook. I’ve had a few tricky moments with terraform state mv myself, so it’s good to see it explained alongside others. Curious—have you considered doing a follow-up post focused on Terraform usage in CI/CD pipelines?
This is such a clear breakdown of everyday commands—especially the state management section, which many people tend to overlook. I’ve had a few tricky moments with terraform state mv myself, so it’s good to see it explained alongside others. Curious—have you considered doing a follow-up post focused on Terraform usage in CI/CD pipelines?
ReplyDelete