Browse all practice questions for the Terraform Associate Practice Exam. Search by topic, open any question and review its full explanation, then test yourself in the practice quiz.

Terraform Associate Practice Exam course image
Can You Use terraform init to Install Third-Party Plugins?Is it possible to install third-party plugins using terraform init?Discovering the Advantages of Terraform OutputsWhat is the main advantage of using Terraform outputs?Exploring the Free Options in Terraform CloudIs Terraform Cloud available for free?How does Terraform Enterprise ensure AWS S3 bucket security?How can Terraform Enterprise enforce security controls for new AWS S3 buckets to be private and encrypted at rest?How to Replace a Virtual Machine in Terraform Without Affecting Your DatabaseIf you've deployed a virtual machine and a database and want to replace the VM without affecting the database, what should you do?Learn the Essential Role of Resource Blocks in TerraformIn Terraform, what is the purpose of resource blocks?Understanding Actions Forbidden During Terraform State File LockingWhich of the following actions are forbidden when the Terraform state file is locked? (Choose three)Understanding AWS Region Configuration in TerraformWhat meta-argument must be configured to deploy a resource to the `us-west-2` AWS region?Understanding how Terraform backends influence state management with commandsA Terraform backend determines how Terraform loads state and stores updates when you execute which commands?Understanding How Terraform Manages InfrastructureWhich of the following statements describes the behavior of Terraform when managing infrastructure?Understanding How Terraform Plan Enhances Your Development ProcessHow does terraform plan assist in the development process?Understanding How the Terraform Validate Command Ensures Code CompatibilityWhich of the following commands will check the overall compatibility of code with existing infrastructure?Understanding how to manage existing virtual machines with TerraformTo manage existing virtual machines (VMs) using Terraform after provisioning them via gcloud, which actions are required?Understanding How to Reference Volume IDs for EBS Block Devices in TerraformHow do you reference the Volume IDs associated with ebs_block_device blocks?Understanding Module Inheritance in TerraformDo modules inherit variables from their parent module?Understanding State Locking in Terraform: What You Need to KnowWhat does state locking accomplish in Terraform?Understanding Terraform Provisioners and Resource BlocksTerraform provisioners can be added to any resource block. True or False?Understanding Terraform Resource Indexing with aws_instanceHow would you reference the "name" value of the second instance of this fictitious resource?Understanding Terraform's Compatibility Across Operating SystemsIs it true that Terraform can run on both Windows and Linux without requiring a specific Server version?Understanding the Connection Block for Terraform ProvisionersTerraform provisioners that require authentication can use which of the following blocks?Understanding the Outputs Section in Terraform ModulesWhat section of a Terraform module produces outputs that can be consumed by other modules?Understanding the Power of the Remote-Exec Provisioner in TerraformWhich provisioner runs a process on the created resource?Understanding the Relationship Between Your Terraform State File and Your InfrastructureDoes the 'terraform.tfstate' file always match your currently built infrastructure?Understanding the Right Backends for Terraform ConfigurationsYour DevOps team is currently using the local backend for your Terraform configuration. Which of the following backends would not work?Understanding the Role of Backend in TerraformIn Terraform, what does the term 'backend' refer to?Understanding the Role of Sensitive Variables in TerraformWhat is the impact of marking a variable as sensitive in Terraform?Understanding the Role of the Remote-Exec Provisioner in TerraformWhat is the purpose of the remote-exec provisioner in Terraform?Understanding the Role of Version Control in TerraformWhat is the significance of using version control with Terraform?Understanding the Taint Command for Rerunning Scripts in TerraformWhat command should be executed to rerun a script in a local-exec provisioner?Understanding the Terraform State List CommandWhich of the following is a valid command to view the current configuration values in Terraform?Understanding the Terraform State Show CommandWhat does the 'terraform state show' command do?Understanding Version Constraints in Terraform for GitHub ProviderYou need to constrain the GitHub provider to version 2.1 or greater. What should you include in the Terraform 0.12 configuration's provider block?Understanding What Happens When You Run Terraform Apply After Deleting Cloud InstancesWhat does Terraform do when you run terraform apply after accidentally deleting cloud instances?Understanding When Terraform Installs Its ProvidersDuring which phase does Terraform install its providers?Understanding where Terraform's local backend stores its stateWhere does the Terraform local backend store its state?When you fix a count variable in Terraform, what should you do next to apply the changes?You just scaled your VM infrastructure and realized you set the count variable to the wrong value. You correct the value and save your change. What do you do next to make your infrastructure match your configuration?Why Does Your Terraform Apply Fail? Understanding Key IssuesYou write a new Terraform configuration and immediately run terraform apply in the CLI using the local backend. Why will the apply fail?Why Storing Secrets in Terraform Repositories Is a Bad IdeaIs it advisable to store secret data in the same version control repository as your Terraform configuration?Why Understanding the 'terraform plan' Command is CrucialWhat is the purpose of the 'terraform plan' command?
More practice questions

These questions are part of the practice quiz. Start practicing

  • Which option helps to keep secrets out of Terraform configuration files?
  • In a Terraform configuration using a networking module named my_network, how should you handle the attribute vnet_id?
  • What does 'terraform apply' primarily do?
  • A Terraform local value can reference other Terraform local values. True or False?
  • What steps are essential for provisioning new infrastructure in Terraform?
  • What is the purpose of the terraform plan command?
  • Which command can be used to inspect the current state of your infrastructure in Terraform?
  • If a module declares a variable with a default, what is true about that variable?
  • Which of the following statements is true about Terraform variable names and the state file?
  • How would you reference the module output vpc_id?
  • Which of the following is not considered a key principle of infrastructure as code?
  • Which resource meta-parameter can you use to specify a dependency manually in Terraform?
  • What is the purpose of the .terraform.lock.hcl file in Terraform?
  • What does terraform import allow you to do?
  • True or False: HashiCorp Configuration Language (HCL) supports user-defined functions.
  • Can you reference a resource created with for_each using a Splat (*) expression?
  • When does Sentinel enforce policy logic in a Terraform Enterprise run?
  • What is the purpose of the terraform plan command?
  • In Terraform, what is the primary purpose of the init command?
  • What is the outcome of running terraform validate?
  • Which Terraform command prompts Terraform to check and familiarize itself with the environment before making any changes?
  • What command is used to initialize a Terraform working directory?
  • What does "Terraform apply" command do?
  • What is the result of running `terraform validate`?
  • Setting the TF_LOG environment variable to DEBUG logs debug messages into syslog. Is this statement true?
  • What happens if you run terraform apply immediately after a successful application without any changes?
  • In Terraform 0.13 and above, do configurations always refer to providers by their local names outside of the required_providers block?
  • Which built-in Terraform function can you use to read the contents of a local file called id_rsa.pub?
  • Which task does terraform init not perform?
  • How should you correctly pass the value of variable num_servers into a module with the input servers?
  • Which command is primarily used to create a new resource in Terraform?
  • Which command lets you experiment with Terraform's built-in functions?
  • Which Terraform collection type is best for storing key/value pairs?
  • What will happen to a Terraform output marked as sensitive?
  • Which of the following is not a valid source from which Terraform can import modules?
  • What happens if you modify a resource and run terraform apply?
  • What file extension is used for Terraform configuration files?
  • In Terraform, which command is used to view the execution plan without making changes?
  • When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?
  • Which file format does Terraform primarily use to define infrastructure?
  • How can you protect sensitive data stored in Terraform state files?
  • Which command is used to apply changes and create resources defined in your configuration?
  • What is a safe way to inject sensitive variables into a Terraform run in a CI/CD pipeline?
  • If writing Terraform code that adheres to style conventions, how would you properly indent each nesting level compared to the one above it?
  • If no outputs were created, what is the quickest way to find a deployed resource's public IP?
  • Do all standard backend types support state storage, locking, and remote operations?
  • If you have created a VM with Terraform and want to delete it, what should you execute?
  • What feature stops multiple admins from changing the Terraform state at the same time?
  • Which file typically contains the configuration for Terraform providers?
  • How can a ticket-based system impact infrastructure provisioning?
  • If a teammate modifies an infrastructure component you are working on after you ran terraform plan, will the apply plan remain the same?
  • What type of backend does Terraform use to manage state?
  • Is it true that Terraform requires the Go runtime as a prerequisite for installation?
  • What is the use of the terraform output command?
  • What is the purpose of a Terraform workspace?
  • How do you specify a tag of v1.0.0 when referencing a Git module?
  • What does terraform apply change after you have approved the execution plan?
  • What is true about Terraform Cloud tiers regarding team management?
  • Can one remote backend configuration map to multiple workspaces?
  • What command is required the first time you run Terraform in a configuration directory?
  • What is a common use of the `terraform output` command?
  • Which option cannot be used to keep secrets out of Terraform configuration files?
  • What does the 'terraform init' command do?
  • What does the command terraform init do?
  • What are providers used for in Terraform?
  • What must you include in a module to reference output values from a child module?
  • How do you access the attribute 'name' of a resource called 'example' in HCL?
  • Does the terraform validate command check the syntax of Terraform files?
  • What is a primary goal of infrastructure as code?
  • What initiates the terraform import command?
  • Which of these is the best practice to protect sensitive values in state files?
  • What command would you run to update the ID in state after fixing a typo in your Terraform configuration?
  • Which command should you run to perform teardown of all infrastructure without immediate execution?
  • What method can you use to trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
  • What challenge might a DevOps team face if they adopt AWS CloudFormation for provisioning resources?
  • A fellow developer wants to keep a specific AWS instance while refactoring Terraform code. What command should be used to tell Terraform to no longer manage the resource?
  • Which type of block is utilized to fetch or compute information for use within a Terraform configuration?
  • Which command is used to validate the configuration files in Terraform?
  • When would you typically use the terraform import command?
  • What is the best practice to reflect infrastructure changes in Terraform after manually destroying resources?
  • What type of block is used to construct a collection of nested configuration blocks in Terraform?
  • What command is used to initialize a Terraform working directory?
  • Are all modules on the official Terraform Module Registry verified by HashiCorp?
  • Why should secrets not be hard coded into Terraform code?
  • What outcome occurs when the resource definition of a virtual machine is removed after it has been created and 'terraform apply' is run again?
  • What is not an advantage of using infrastructure as code operations?
  • What is the workflow for deploying new infrastructure using Terraform?
  • What command is used to remove a resource from the Terraform state?
  • What will happen when you run terraform destroy without any flags after successfully creating resources including a load balancer?
  • Which are examples of infrastructure as code? (Choose two.)
  • What information does the public Terraform Module Registry expose about published modules?
  • What will occur if you run terraform plan without any configuration changes?
  • What is the name of the default file where Terraform stores the state?
  • Which command would you use to check the current provider version being used in Terraform?
  • Which command generates DOT formatted data for visualizing dependencies in Terraform?
  • What is the IaC best practice for modifying an infrastructure stack in a public cloud?
  • What is the primary purpose of the terraform state file?
  • What value does the Terraform Cloud/Terraform Enterprise private module registry provide?
  • What happens when you run the terraform taint command on a managed resource?
  • After upgrading the version of a provider in Terraform, what is the next step?
  • In Terraform, which data type can be used to define a list of values?
  • How can you find out the paths from which Terraform is loading providers referenced in your configuration files?
  • Which function is not valid in Terraform's string functions?
  • Which provider authentication method avoids storing credentials in the state file?
  • Which of the following locations can Terraform use as a private source for modules?
  • Can open source Terraform import publicly-accessible and open-source modules?
  • What is the benefit of using remote state in Terraform?
  • What is the purpose of the terraform taint command?
  • As a member of the operations team, which provision is best to run a script on a virtual machine created by Terraform?
  • What argument(s) is (are) required when declaring a Terraform variable?
  • To safely view all resources that will be deleted by Terraform, which command should you use?
  • What is the purpose of the 'terraform plan' command?
  • What is a requirement for version constraints in Terraform 0.13 and later configurations?
  • In Terraform HCL, what does the object type of object({ name=string, age=number }) match?
  • Does the Terraform plan command update your state file?
  • Will terraform apply fail if terraform plan was not executed first?
  • Which command checks if all Terraform configuration code is properly formatted without making changes?
  • What does the terraform destroy command do?
  • What is a state file in Terraform?
  • What command would you use to ensure that changes made in your configuration are reflected in Terraform's state?
  • What argument is required when declaring a Terraform output?
  • What is the purpose of the terraform init command?
  • Which of the following best describes the term 'resource' in Terraform?
  • Which Terraform command is used to create an execution plan?
  • Which backend does the Terraform CLI use by default?
  • How can you format Terraform HCL code according to standard Terraform style convention?
  • Which feature helps in managing sensitive data in Terraform?
  • When using a module block to reference a module stored on the public Terraform Module Registry, how do you specify version 1.0.0?
  • Which of the following is responsible for managing the locking of the state file?
  • Where is Terraform unable to load a provider from?
  • Is it necessary to initialize a Terraform backend before it can be configured?
  • When you run 'terraform destroy', what happens before the approval prompt?
  • What does the default "local" Terraform backend store?
  • What do most Terraform providers interact with?
  • Is changing the Terraform backend to a different one after the first terraform apply mandatory?
  • What command is used to evaluate the changes before applying them in Terraform?
  • What is one disadvantage of using dynamic blocks in Terraform?
  • When should Terraform configuration files be written when running terraform import on existing infrastructure?
  • Which of these options is the most secure place to store secrets for connecting to a Terraform remote backend?
  • What command should be used to validate the syntax of a Terraform configuration file?
  • How does the Terraform remote backend differ from backends like S3 or Consul?
  • What command should you run to display all workspaces for the current configuration?
  • What does the `terraform apply` command do?
  • What occurs if a VM created by Terraform is deleted via the cloud provider console and terraform apply is executed again?
  • Which of the following is not an action performed by terraform init?
  • Which aspect is crucial to consider when scaling infrastructure with a ticket-based system?
  • How should you pass the value of an input variable called environment from a parent module to a child module?
  • What should a user do if they want to check what changes will be made by their Terraform code?
  • Which of the following is not a valid Terraform collection type?
  • What is the safest command to see all resources that will be deleted by Terraform before applying changes?
  • When does terraform apply reflect changes in the cloud environment?
  • A terraform apply can not _________ infrastructure.
  • When defining variables in Terraform, which of the following options allows for a default value?
  • What happens by default if a Terraform creation-time provisioner fails?
  • How do you specify a module's version when publishing it to the public Terraform Module Registry?
  • When using a data source for an AWS AMI, what value should you enter for the ami argument in the AWS instance resource?
  • What is terraform refresh intended to detect?
  • What is the primary function of the terraform init command?
  • What would happen if a resource is missing from the state file?
  • Which command is used to initialize a working directory containing Terraform configuration files?
  • What does Terraform require for managing module dependencies effectively?
  • Do Terraform variables and outputs store the "description" argument in the state file?
  • Are Terraform providers always installed from the Internet?
  • Which command ensures compliance with Terraform configuration styles?
  • What does the terraform init command do in a Terraform project?
  • What happens when you run terraform destroy?
  • What does the command 'terraform fmt' do when executed without flags in a directory with configuration files?
  • What is the purpose of the terraform apply command?
  • Which of the following can you do with terraform plan? (Choose two.)
  • Which Terraform command should be used to remove resources from infrastructure?
  • Which of the following statements about Terraform plans is accurate?
  • Which errors does 'terraform validate' report related to configuration consistency?
  • When encountering an error: "Access Denied: status code: 403," what step should be taken to find out more about the problem?
  • Which command is used to show the changes that will be made to the infrastructure?
  • A Terraform provider is not responsible for:
  • When developing a new Terraform configuration for virtual machines, which command should you run first to create the infrastructure?
  • Which statement is true about Terraform and Terraform providers concerning version numbers?
  • In Terraform, what is a 'resource'?
  • Is it true that Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument?
  • How does Terraform know the order to create resources?
  • Terraform validate reports syntax check errors from which of the following scenarios?
  • Which command is not typically associated with starting a Terraform workflow?
  • Which environment variable must be configured to make Terraform's logging more verbose?
  • If a module uses local values, what feature can be used to expose those values?
  • What command would you use to create an execution plan for Terraform?
  • What component is not processed during a 'terraform refresh' operation?
  • Which command would typically be used to initialize a Terraform configuration?
  • Which command would you use to manage different state files for development and production environments?
  • What happens if a resource attribute is not referenced in a proper format in HCL?
  • When working with Terraform Enterprise and Cloud Workspaces, how are they conceptually viewed?
  • True or False: A Terraform provisioner must be nested inside a resource configuration block.
  • Which of the following is allowed as a valid Terraform variable name?
  • If an output variable doesn't have a specified description, what happens?
  • What is the purpose of the terraform plan command?
  • How does Terraform determine dependencies between resources?
  • Which flag would you add to terraform plan to save the execution plan to a file?
  • Which of the following is a benefit of using Terraform modules?
  • When deploying resources to Azure using Terraform, which statement about state files is correct?
  • What advantage does an operations team gain by using infrastructure as code?
  • True or False: Module variable assignments are inherited from the parent module and do not need to be explicitly set.
  • When should the force-unlock command be used in Terraform?
  • How can you ensure that a resource is recreated during the next apply?
  • In which situation will Terraform not apply changes made directly on the cloud console?
  • Which feature is available only in Terraform Enterprise or Cloud workspaces?
  • Which of the following is not a method to trigger a Terraform destroy?
  • How can you check the current state of your Terraform-managed infrastructure?
  • When using a remote backend that requires authentication, what does HashiCorp recommend?
  • Where in your Terraform configuration would you specify a state backend?
  • Is it true that only the user who generated a Terraform plan may apply it?
  • You need to migrate a workspace to use a remote backend. After updating your configuration, what command do you run to perform the migration?
  • Which file extension is typically associated with Terraform configuration files?
  • How can inconsistent configurations of manually deployed compute instances be addressed?
  • When using Terraform, what does the command terraform destroy do?
  • What type of information can Terraform variables store?
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy