Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
HashiCorp · Terraform 004 · FREE PRACTICE

Terraform 004 practice questions

Free HashiCorp Certified: Terraform Associate (004) practice, with shuffled choices and an explanation behind every answer. A little practice, a clearer next step.

Loading your practice…

From the videos

Mock exam questions50
Training questions51
Lesson quick checks54

These questions come from the course videos. Information as of November 2026.

Terraform 004 sample questions

10 of the 155 questions, as plain text. Start a session above for shuffled choices, a score and the reason behind every choice.

  1. Bluefin runs workloads on AWS and Azure, and plans to manage both with Terraform. Which statement is true?

    • One resource type that works on every cloud
    • Only one provider in each configuration
    • One workflow, with resource types for each provider
    • A provider swap moves resources to another cloud
    Show the answer

    One workflow, with resource types for each provider

    Terraform gives one language and one workflow, but each provider brings its own resource types for its own service. “One resource type that works on every cloud” is wrong, because a server on AWS and a virtual machine on Azure use different resource types. “Only one provider in each configuration” is wrong, because one configuration can use many providers at once. And “A provider swap moves resources to another cloud” is wrong, because Terraform does not convert a resource of one cloud into a resource of another.

  2. Bluefin's configuration uses features of Terraform 1.12. Every run with an older Terraform CLI must fail at once. Where does the team set this?

    • The version constraint of the AWS provider
    • An entry in the dependency lock file
    • A comment at the top of the main file
    • The required_version argument
    Show the answer

    The required_version argument

    The required_version argument of the terraform block says which versions of the Terraform CLI may run the configuration. “The version constraint of the AWS provider” would constrain a provider, not the Terraform CLI. “An entry in the dependency lock file” is wrong, because the lock file keeps provider versions and checksums, not the version of Terraform. And “A comment at the top of the main file” would be ignored, because comments change nothing.

  3. An engineer runs terraform init in a directory that is already initialized. What should the team expect?

    • The local state gets erased
    • Nothing harmful: init is safe to run again
    • Every provider jumps to its newest version
    • An error, unless the directory is deleted first
    Show the answer

    Nothing harmful: init is safe to run again

    Running terraform init more than once is always safe, to bring the working directory up to date with the configuration. “The local state gets erased” is wrong, because terraform init does not erase the state. “Every provider jumps to its newest version” is wrong, because terraform init keeps the versions of the lock file unless -upgrade is used. And “An error, unless the directory is deleted first” is wrong, because running terraform init again is normal, for example after adding a module.

  4. A change to a server forces its replacement, and no lifecycle settings are set. In what order does Terraform act?

    • It destroys the old server, then creates the new one
    • It creates the new server first, then destroys the old
    • It changes the server in place anyway
    • It stops, and asks which order to use
    Show the answer

    It destroys the old server, then creates the new one

    By default, when an argument cannot change in place, Terraform destroys the existing object, then creates its replacement. “It creates the new server first, then destroys the old” would need the create_before_destroy setting. “It changes the server in place anyway” is wrong, because the change cannot be made in place, which is why it forces a replacement. And “It stops, and asks which order to use” is wrong, because Terraform follows its default order, with no question.

  5. In the public registry, Bluefin wants only modules that HashiCorp has reviewed for stability and compatibility. What should it filter on?

    • The Partner filter
    • The most downloaded modules
    • The newest version of each module
    • Modules in its own private registry
    Show the answer

    The Partner filter

    Partner modules are reviewed by HashiCorp to ensure stability and compatibility. “The most downloaded modules” is wrong, because downloads measure popularity, not a review. “The newest version of each module” is wrong, because a recent release says nothing about a review. And “Modules in its own private registry” would list Bluefin's own modules, which HashiCorp has not reviewed.

  6. Bluefin's S3 backend needs AWS credentials. How does HashiCorp recommend supplying them?

    • Inside the backend block, in plain text
    • In a terraform.tfvars file
    • In environment variables
    • In an output marked sensitive
    Show the answer

    In environment variables

    HashiCorp recommends environment variables, because values in the backend block or in -backend-config also end up in the .terraform directory and in plan files. “Inside the backend block, in plain text” would copy them into files that Terraform writes, like plan files. “In a terraform.tfvars file” is wrong, because backend blocks cannot use input variables. And “In an output marked sensitive” is wrong, because outputs return values, and cannot configure a backend.

  7. The state is in an S3 backend, and an engineer wants a copy of the raw state before a risky refactoring. Which command prints it?

    • terraform state list
    • terraform show
    • terraform state push
    • terraform state pull
    Show the answer

    terraform state pull

    The terraform state pull command downloads the state from its backend, local or remote, and prints it in its raw format. “terraform state list” would print only resource addresses. “terraform show” would print a readable view, not the raw state. And “terraform state push” would do the opposite, and overwrite the remote state.

  8. Bluefin wants every team to find approved modules and providers, with their versions, in one place inside its organization. Which feature fits?

    • A variable set, applied globally
    • A run trigger from a module workspace
    • The explorer of the organization
    • The private registry
    Show the answer

    The private registry

    The private registry shares the providers and modules of the organization in one place, with versioning and a searchable list. “A variable set, applied globally” would share variable values, not modules. “A run trigger from a module workspace” would queue runs after an apply, without sharing any module. And “The explorer of the organization” would show which modules and versions the workspaces use, without publishing any.

  9. Bluefin wants the same network design for three new depots, and one fix to reach all three. Which IaC pattern fits?

    • Three copies of the files, edited by hand
    • A reusable module, called once for each depot
    • A written runbook of console steps
    • One configuration with every block repeated
    Show the answer

    A reusable module, called once for each depot

    Modules package the design once, and each call reuses it, so one fix to the module reaches every depot. “Three copies of the files, edited by hand” would let the copies drift apart, and each fix would be made three times. “A written runbook of console steps” would describe a manual process, which is slow and easy to get wrong. And “One configuration with every block repeated” would repeat the same blocks for each depot, which is harder to keep consistent.

  10. A provider's source address is registry.example.com/bluefin/tracking. What is registry.example.com?

    • The hostname of the registry that hosts it
    • The namespace of the provider's publisher
    • The type, or short name, of the provider
    • The URL of the API that the provider calls
    Show the answer

    The hostname of the registry that hosts it

    Source addresses have an optional hostname, then a namespace and a type, and the hostname names the registry that distributes the provider. “The namespace of the provider's publisher” is wrong, because the namespace is the part after the hostname, bluefin here. “The type, or short name, of the provider” is wrong, because the type is the last part, tracking here. And “The URL of the API that the provider calls” is wrong, because the address says where the provider comes from, not which API it calls.

Original practice questions written for Cert Espresso, not real exam questions.