Terraform Fundamentals
Terraform is a tool for describing and managing infrastructure through configuration files. It compares those files with existing systems, proposes changes, and uses provider plugins to create, update, or remove resources through their APIs.
itInfrastructure and operations | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
Terraform Fundamentals
Terraform lets you describe infrastructure in configuration files. It then uses provider plugins to manage real objects through their APIs.
Those objects can include networks, compute instances, DNS records, and software services. The provider determines which object types Terraform can manage.
Terraform is declarative. You describe the result you want instead of scripting every API call in order.
Why Terraform exists
Infrastructure changes often span many objects with dependencies between them. Manual changes are difficult to review, repeat, and reproduce.
Terraform turns the intended infrastructure into a document that your team can store and review. Its planning step shows proposed actions before they run.
This approach helps you answer three practical questions:
- What infrastructure should exist?
- What differs from that configuration now?
- What actions would move the real system toward the configuration?
Terraform does not replace the platform APIs. Providers translate Terraform resource operations into calls to those APIs.
The three-part mental model
Think of Terraform as a comparison among three views.
Configuration states your intended resources and relationships. Files ending in .tf form one configuration in a working directory.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://developer.hashicorp.com/terraform/intro
Supports
- Terraform purpose and declarative infrastructure model
- Configuration, provider, state, plan, and apply overview
- https://developer.hashicorp.com/terraform/language
Supports
- Configuration language purpose
- Resources, expressions, and dependencies
- Configuration as a collection of managed infrastructure
- https://developer.hashicorp.com/terraform/language/providers
Supports
- Providers as API plugins
- Resource types and data sources
- Provider requirements, versions, and installation
- https://developer.hashicorp.com/terraform/language/resources
Supports
- Resource configuration and provider-defined behavior
- Create, update, replace, and destroy operations
- https://developer.hashicorp.com/terraform/cli/init
Supports
- Working-directory initialization
- Provider and module installation
- Backend and local working-directory data
- https://developer.hashicorp.com/terraform/cli/commands/plan
Supports
- Plan comparison and proposed actions
- Speculative and saved plan behavior
- Applying a saved plan in automation
- https://developer.hashicorp.com/terraform/cli/commands/validate
Supports
- Syntax and internal-consistency validation
- Exclusion of remote service checks
- https://developer.hashicorp.com/terraform/language/state
Supports
- State bindings and metadata
- Refresh and state storage
- https://developer.hashicorp.com/terraform/language/state/purpose
Supports
- Required mapping between addresses and remote objects
- Shared remote state and supported locking
- https://developer.hashicorp.com/terraform/language/modules/configuration
Supports
- Child-module reuse
- Module sources, inputs, outputs, and versions
- https://developer.hashicorp.com/terraform/language/style
Supports
- Configuration maintainability
- Versioning and sensitive-data guidance
- https://developer.hashicorp.com/terraform/tutorials/docker-get-started
Supports
- Disposable local Docker learning path
- Build, change, destroy, variable, and output practice
- https://developer.hashicorp.com/terraform/tutorials/cli/plan
Supports
- Initialize, plan, and apply workflow
- Saved plan use and sensitive plan contents
- https://github.com/shuaibiyy/awesome-terraform
Supports
- Selection of terraform-docs, TFLint, Checkov, Infracost, and Atlantis
- Curated ecosystem descriptions
- https://terraform-docs.io/
Supports
- Module documentation generation
- https://github.com/terraform-linters/tflint
Supports
- Pluggable Terraform linting
- https://www.checkov.io/
Supports
- Terraform configuration and plan security scanning
- https://www.infracost.io/
Supports
- Terraform cloud cost estimates in CLI and pull requests
- https://www.runatlantis.io/
Supports
- Pull-request-driven Terraform plan and apply
