Hashicorp

Terraform Associate practice test

Practice with 15 free Testara sample questions, or choose paid access to the full 339-question bank.

Provider
Hashicorp
Question bank
339
Free sample
15 questions
Publisher
Testara

About this practice material

This page covers Testara's practice question bank for Terraform Associate, a certification listed under Hashicorp. Questions use original, exam-style scenarios and are not questions from the official certification exam.

Testara is an independent practice platform and is not affiliated with, endorsed by, or authorized by Hashicorp. The certification credential is issued by Hashicorp, not Testara. Certification and provider names belong to their respective owners.

Start practicing

The guest demo does not save an attempt. Sign in before buying access.

Try 15 questions free

Available without signing in

Free sample questions

These 15 questions and their explanations are server-rendered so you can inspect the material before opening the interactive demo.

  1. Question 1 · 1

    The terraform.tfstate file always matches your currently built infrastructure.

    Choose true or false.

    • True
    • False
  2. Question 2 · 1

    You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?

    Choose one answer.

    • Run terraform output ip_address to view the result
    • In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file
    • Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
    • Run terraform destroy then terraform apply and look for the IP address in stdout
  3. Question 3 · 1

    You have declared an input variable called environment in your parent module. What must you do to pass the value to a child module in the configuration?

    Choose one answer.

    • Add node_count = var.node_count
    • Declare the variable in a terraform.tfvars file
    • Declare a node_count input variable for child module
    • Nothing, child modules inherit variables of parent module
  4. Question 4 · 1

    If a module declares a variable with a default, that variable must also be defined within the module.

    Choose true or false.

    • True
    • False
  5. Question 5 · 1

    Which option cannot be used to keep secrets out of Terraform configuration files?

    Choose one answer.

    • Environment Variables
    • Mark the variable as sensitive
    • A Terraform provider
    • A -var flag
  6. Question 6 · 1

    Which of the following arguments are required when declaring a Terraform output?

    Choose one answer.

    • sensitive
    • description
    • default
    • value
  7. Question 7 · 1

    Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Enterprise automatically and proactively enforce this security control?

    Choose one answer.

    • With a Sentinel policy, which runs before every apply
    • By adding variables to each TFE workspace to ensure these settings are always enabled
    • With an S3 module with proper settings for buckets
    • Auditing cloud storage buckets with a vulnerability scanning tool
  8. Question 8 · 1

    Most Terraform providers interact with ____________.

    Choose one answer.

    • API
    • VCS Systems
    • Shell scripts
    • None of the above
  9. Question 9 · 1

    terraform validate validates that your infrastructure matches the Terraform state file.

    Choose true or false.

    • True
    • False
  10. Question 10 · 1

    What does terraform import allow you to do?

    Choose one answer.

    • Import a new Terraform module
    • Use a state file to import infrastructure to the cloud
    • Import provisioned infrastructure to your state file
    • Import an existing state file to a new Terraform workspace
  11. Question 11 · 1

    How would you reference the Volume IDs associated with the ebs_block_device blocks in this configuration?

    Choose one answer.

    Question illustration 1
    • aws_instance.example.ebs_block_device.[*].volume_id
    • aws_instance.example.ebs_block_device.volume_id
    • aws_instance.example.ebs_block_device[sda2,sda3].volume_id
    • aws_instance.example.ebs_block_device.*.volume_id
  12. Question 12 · 1

    Which of the following is not a key principle of infrastructure as code?

    Choose one answer.

    • Versioned infrastructure
    • Golden images
    • Idempotence
    • Self-describing infrastructure
  13. Question 13 · 1

    What does state locking accomplish?

    Choose one answer.

    • Copies the state file from memory to disk
    • Encrypts any credentials stored within the state file
    • Blocks Terraform commands from modifying the state file
    • Prevents accidental deletion of the state file
  14. Question 14 · 1

    You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?

    Choose one answer.

    • Run terraform apply -upgrade
    • Run terraform init -upgrade
    • Run terraform refresh
    • Upgrade your version of Terraform
  15. Question 15 · 1

    A module can always refer to all variables declared in its parent module.

    Choose true or false.

    • True
    • False

Each purchase applies to this certification. Prices are one-time payments, not monthly subscriptions.

Starter

$29 USD one time

Full access to one certification's question bank in standard practice mode for 60 days.

  • Full question bank for one certification
  • 60 days of access
  • Standard practice mode
  • Question notes and community discussions
  • Attempt scores and answer review

Professional

$49 USD one time

Full access to one certification's question bank, custom test controls and advanced analytics for 60 days.

  • Custom test builder
  • Timers and question selection
  • Randomized question and answer order
  • Advanced performance and weak-question analytics
  • Priority customer support
Try 15 questions free