Free Practice · No Signup Required
30 Free HashiCorp TFA-004 Practice Questions
Real practice questions for the HashiCorp Terraform Associate (TFA-004) exam, with answers and detailed explanations. Updated 2026.
Free questions
30
Passing score
Pass or fail — HashiCorp publishes no percentage cut score
Exam time
60 minutes
Question pool
539+ Questions
Below are 30 real practice questions for the HashiCorp Terraform Associate (TFA-004) exam. Each question shows the correct answer and a detailed explanation when you reveal it. Use these to benchmark your readiness — if you score below 70% on these 30 questions, plan for at least 4 more weeks of study before booking.
TFA-004 Practice Questions
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhat is Infrastructure as Code (IaC)?ADefining and managing infrastructure using machine-readable configuration filesBStoring infrastructure diagrams in a wiki for operations teamsCWriting shell scripts that SSH into servers to install packagesDManaging infrastructure exclusively through a cloud provider's web console
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich practice is a primary benefit of Infrastructure as Code?AGuaranteeing zero downtime for every deploymentBRemoving the need to test changes before productionCStoring infrastructure definitions in version control for history and collaborationDEliminating the need for cloud provider APIs
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsIn a declarative IaC approach, what does the practitioner primarily specify?AThe order of shell commands on each hostBThe exact sequence of API calls to reach the desired stateCThe desired end state of infrastructureDThe IP addresses of existing servers only
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich statement best describes an imperative approach to infrastructure management?AYou specify step-by-step commands to performBYou declare the target state and the tool reconciles differencesCYou only store infrastructure in JSON templatesDYou never change infrastructure after initial creation
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsTerraform is best classified as which type of IaC tool?ADeclarative infrastructure provisioningBAgent-based host patching systemCManual runbook automation onlyDImperative configuration management
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhat does idempotency mean in the context of IaC?AOnly one person can run apply at a timeBResources can never be updated after creationCEach apply must destroy all resources firstDApplying the same configuration repeatedly yields the same result without unintended side effects
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich scenario best illustrates immutable infrastructure?AStore server state only on local disks without backupsBManually edit security group rules in the consoleCReplace a failed instance with a new one built from the same image/configDSSH into a server and patch packages in place
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsTerraform is developed by which company and written in which language?AHashiCorp; GoBAmazon; PythonCMicrosoft; C#DGoogle; Java
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhat is configuration drift?AWhen provider plugins fail to download during initBWhen live infrastructure diverges from the defined IaC configurationCWhen Terraform state file is accidentally deletedDWhen HCL syntax errors prevent validation
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich are common benefits of Infrastructure as Code? (Select all that apply.)AConsistency across environmentsBAutomation of provisioningCImproved auditability through version historyDElimination of all human operational workEReusability of configuration patterns
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhat is the ClickOps anti-pattern?AAutomating deployments with CI pipelinesBUsing CLI tools instead of a GUICStoring Terraform code in GitDMaking infrastructure changes only through cloud console clicks without codified definitions
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsIn the cattle vs. pets metaphor, cattle servers are characterized by:AAlways running without automationBUnique manual tuning and sentimental namingCBeing disposable and replaced rather than individually nursed back to healthDNever scaling horizontally
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsHow does IaC improve reproducibility?ABy encoding environment definitions so they can be recreated consistentlyBBy requiring every resource to be created manually firstCBy preventing all configuration changes foreverDBy hiding infrastructure details from developers
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich capability supports auditability in IaC workflows?ADisabling logs on cloud APIsBStoring secrets in plain text in codeCVersion-controlled change history with authorship and timestampsDDeleting old Git commits after merge
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsGitOps in infrastructure management typically means:AStoring only binary images in Git without configurationBUsing Git as the source of truth and driving deployments from approved changesCProhibiting pull requests for infrastructure codeDAvoiding any automation in deployment pipelines
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich statement about declarative IaC is TRUE?AThe tool compares desired state to actual state and plans changesBDeclarative configs cannot use variablesCDeclarative tools cannot destroy resourcesDYou must script every API call in order
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsA team applies the same Terraform configuration twice with no code or external changes. What is the expected outcome?ATerraform refuses to run a second timeBA new state file is created each time with different resource IDsCAll resources are destroyed on the second runDNo changes are required on the second run
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhy is manual console change a risk for IaC-managed environments?AIt automatically upgrades Terraform versionsBIt forces immediate deletion of all resourcesCIt can introduce drift that the next plan/apply may overwrite or conflict withDIt prevents provider plugins from loading
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich is NOT a typical IaC benefit?AGuaranteed immunity to misconfigurationBFaster, repeatable environment provisioningCPeer review of infrastructure changesDDocumentation that stays close to actual config
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich statements about declarative vs. imperative approaches are correct? (Select all that apply.)AImperative scripts focus on the sequence of actionsBDeclarative configs describe desired end stateCImperative tools cannot use loopsDDeclarative tools can still perform ordered operations internallyETerraform's primary model is imperative
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsOpen-source Terraform means:AIts source code is publicly available under an open-source licenseBIt does not require provider pluginsCIt can only manage open-source software stacksDAll cloud resources it creates are free of charge
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich practice helps reduce configuration drift?AStoring state only on individual laptopsBDisabling terraform plan in CICMaking production changes only in the console for speedDTreating the IaC repository as the source of truth and avoiding unmanaged edits
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsImmutable infrastructure pairs well with IaC because:ANew instances can be provisioned from the same definition instead of patching in placeBIt requires no testing of imagesCServers never need replacementDIt eliminates the need for state
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhat role does automation play in IaC?AIt executes defined infrastructure changes consistently without manual stepsBIt removes the need for configuration filesCIt prevents all downtime during updatesDIt replaces version control systems
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich example best shows reusability in IaC?ACopy-pasting console screenshots into ticketsBUsing the same module or pattern for dev, staging, and prod with different variablesCDocumenting servers only in spreadsheetsDCreating each environment from scratch with no shared code
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhy might auditors prefer IaC over ClickOps?AIaC eliminates the need for access controlsBIaC hides all change historyCIaC changes are traceable in version control and pipelinesDIaC prevents any production changes
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsTerraform's declarative model means practitioners focus on:AInstalling agents on every VM before provisioningBWriting bash loops for each API endpointCCompiling HCL into ARM templates onlyDResource blocks describing desired attributes
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsIdempotency helps operations teams because:ARe-running configuration after partial failure can converge to desired state safelyBIt removes dependency orderingCFailed applies never need investigationDIt guarantees resources cost nothing
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsConfiguration drift is MOST likely detected when:Aterraform fmt reformats filesBterraform validate fails due to syntaxCterraform version prints the CLI versionDterraform plan shows unexpected changes against unchanged code
- FreePracticeQuiz.questionLabelInfrastructure as Code ConceptsWhich are characteristics of the pets model of infrastructure? (Select all that apply.)AStrong emotional or operational attachment to individual hostsBServers are numbered and discarded like cattleCHorizontal scaling with identical disposable instancesDManual intervention is common for recoveryEServers are treated as unique and irreplaceable
Ready for the full TFA-004 exam?
Get all 539+ Questions, timed simulation, and weak-area analytics. Plans from $2.99 — credits never expire.
Frequently Asked Questions
Are these real TFA-004 practice questions?+
Is the TFA-004 exam hard?+
How many questions are on the real TFA-004 exam?+
Do I need to sign up to use these questions?+
Keep studying
Pass TFA-004 on your first try
Join candidates using DummyExams to practice with realistic timed exams, detailed explanations, and weak-area analytics.
Start full TFA-004 practice exam