HashiCorp Terraform Associate (004) · Section 1 · 6% of the exam
Explain how Terraform manages multi-cloud, hybrid cloud, and service-agnostic workflows
One of the objectives of the HashiCorp Certified: Terraform Associate (004) exam, in the section “Infrastructure as Code (IaC) with Terraform”. Here is what it covers, the points to remember and a question to try.
What it covers
Terraform reaches every platform through providers, so one workflow and one language can manage several clouds, on-premises systems and SaaS services together. This lesson explains how providers make that work, what multi-cloud does and does not give you, how hybrid cloud is handled, and what service-agnostic means.
Points to remember
- Terraform Core is separate from providers; providers are plugins that call platform APIs
- Providers are downloaded from the Terraform Registry by terraform init
- Provider tiers: official (HashiCorp), partner and community
- Multi-cloud: one workflow and language, but resource types are provider-specific and not portable
- Hybrid cloud: on-prem providers such as vSphere, OpenStack and Kubernetes in the same configuration
Try a question
A configuration creates a virtual machine with the aws provider and a DNS record with the cloudflare provider. The record's value references the VM's public IP address attribute. The team runs a single terraform apply on a new environment. What does Terraform do?
- AIt creates the DNS record first and then updates it after the VM exists, because providers are applied in alphabetical order
- BIt creates the VM first, then the DNS record, because the reference creates a dependency in the graph that crosses providers
- CIt fails, because a resource from one provider cannot reference an attribute of a resource from another provider
- DIt requires two separate applies, one per provider, and the second must be started manually after the first completes
Show the answer
B. References between resources create dependencies in the graph regardless of which provider owns each resource. Terraform creates the VM, learns its IP address, and then creates the DNS record in the same run.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Terraform across clouds, hybrid environments and services teaches this objective (about 35 minutes), and 8 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.