0% found this document useful (0 votes)
2 views2 pages

Terraform Exam Prep Summary

Terraform is an open-source Infrastructure as Code tool by HashiCorp that enables users to define and provision infrastructure using HCL. It automates deployment across cloud providers, manages resources consistently, and supports collaborative development. Key concepts include providers, resources, modules, and commands for initializing, applying, and destroying infrastructure, along with best practices for configuration management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Terraform Exam Prep Summary

Terraform is an open-source Infrastructure as Code tool by HashiCorp that enables users to define and provision infrastructure using HCL. It automates deployment across cloud providers, manages resources consistently, and supports collaborative development. Key concepts include providers, resources, modules, and commands for initializing, applying, and destroying infrastructure, along with best practices for configuration management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Terraform Exam Prep Summary

What is Terraform?

Terraform is an open-source Infrastructure as Code (IaC) tool developed by HashiCorp. It allows you to

define and provision infrastructure using a declarative configuration language called HCL (HashiCorp

Configuration Language).

What is Terraform Used For?

- Automating infrastructure deployment across multiple cloud providers (AWS, Azure, GCP, etc).

- Managing cloud resources in a repeatable and consistent manner.

- Version-controlling infrastructure just like code.

- Enabling collaborative infrastructure development and operations (DevOps).

Key Concepts

- Providers: Interface to cloud platforms (e.g., AWS, Azure, GCP).

- Resources: The infrastructure components to be managed (VMs, networks, etc).

- Modules: Reusable components.

- State: Tracks deployed infrastructure.

- Plan: Preview of changes before applying.

- Apply: Execution of the infrastructure changes.

- Destroy: Tear down infrastructure managed by Terraform.

Common Terraform Commands

- terraform init: Initialize a Terraform project and download providers.

- terraform plan: Show a preview of changes.

- terraform apply: Apply the changes and create/update resources.


Terraform Exam Prep Summary

- terraform destroy: Destroy the resources.

- terraform validate: Validate configuration syntax.

- terraform fmt: Format configuration files.

- terraform show: Show current state or plan output.

- terraform output: Extract values from state outputs.

- terraform state: Inspect or modify the Terraform state.

Terraform Files and Structure

- .tf files: Main configuration files.

- main.tf: Resource definitions.

- variables.tf: Input variable declarations.

- outputs.tf: Output values.

- terraform.tfstate: State file tracking the current infrastructure.

Best Practices

- Use version control for all configuration files.

- Use modules for code reuse.

- Enable remote state storage with locking (e.g., S3 + DynamoDB for AWS).

- Keep secrets out of code; use environment variables or secrets managers.

- Use terraform workspace for managing multiple environments (dev, staging, prod).

You might also like