All questions

HashiCorp Terraform Associate Practice Exam

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

HashiCorp Terraform Associate Practice Exam 2026 – Complete Prep Resource course image
All questions

These questions are part of the practice quiz. Start practicing

  • Which command initializes the working directory and installs required providers for a project?
  • In Terraform, module variable assignments are inherited from the parent module and do not need to be explicitly set.
  • If you want a child module to receive a value from a parent module, what must you declare in the child module?
  • Which option cannot be used to keep secrets out of Terraform configuration files?
  • You run a local-exec provisioner in a null resource called null_resource.run_script and realize that you need to rerun the script. Which of the following commands would you use first?
  • Which Terraform command validates the syntax and configuration before planning or applying?
  • What is the purpose of terraform init?
  • What is the name of the default file where Terraform stores the state?
  • During a Terraform apply, what happens to the state file?
  • Which of the following can you do with terraform plan?
  • What does terraform refresh modify?
  • To apply changes only to a subset of resources, which approach is appropriate?
  • Which command shows the planned changes without applying them?
  • Where can Terraform not load a provider from?
  • Backends in Terraform are responsible for storing and retrieving state data.
  • A provider configuration block is required in every Terraform configuration.
  • To deploy resources into two different cloud regions in the same Terraform configuration, you declare multiple provider configurations. What meta-argument do you need to configure in a resource block to deploy the resource to the us-west-2 AWS region?
  • Which command would you run to automatically format Terraform configuration files to meet standard style guidelines?
  • Which of these commands makes your code more human readable?
  • To enable Terraform to show which paths provider binaries are loaded from, which setting enables debug messages?
  • Do the Terraform binary version and provider versions need to match in a single configuration?
  • What does running a terraform plan do?
  • Are all standard Terraform backends capable of state storage, locking, and remote operations?
  • Which command initializes a Terraform working directory and downloads provider plugins?
  • What resource meta-parameter can you use to enforce a specific dependency between resources?
  • You are reading contents of a local file in a Terraform configuration. Which built-in function should you use to import the file's contents as a string?
  • Which statement about the -out option used with terraform plan is true?
  • If you apply again after no changes to the configuration, Terraform will:
  • Which of the following is not a benefit of remote state?
  • Which of the following is an example of infrastructure as code?
  • What does the default 'local' Terraform backend store?
  • Terraform validate validates that your infrastructure matches the Terraform state file.
  • Which configuration approach allows Terraform to manage resources across more than one provider?
  • Which statement describes a goal of infrastructure as code?
  • Which statement describes a goal of infrastructure as code?
  • To enable team-based cost tracking, which approach for a billing_dept tag is appropriate?
  • Which Terraform command lists the resources currently tracked in the state file?
  • What happens if you remove a resource from the configuration and apply again?
  • Using the terraform state rm command against a resource will destroy it.
  • Which pattern would follow IaC best practices for making a change to an infrastructure stack running in a public cloud?
  • Terraform providers are always installed from the Internet.
  • Which statement about Terraform's approach to infrastructure as code is true?
  • 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?
  • How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
  • Which detail is included in the public Module Registry exposure that helps users configure modules?
  • If you manually destroy infrastructure, what is the best practice to reflect this change in Terraform?
  • Which statement about the .terraform.lock.hcl file is true?
  • After performing your first terraform apply, changing the backend configuration to a different backend is:
  • Which expression references the name of the first aws_instance.web in Terraform?
  • Can Open Source Terraform import private modules from private registries?
  • When you modify your local Terraform configuration and run terraform plan while a teammate has concurrently modified the infrastructure, the execution plan for terraform apply will be the same.
  • In Terraform, what is the name of the output used to expose the VPC ID in the example?
  • Must you initialize your working directory before running terraform validate?
  • You are retrieving the value vnet_id from a networking module named my_network. Which step must you perform?
  • Which statement about the Terraform public Module Registry is true?
  • From which sources can Terraform import modules?
  • How would you reference the attribute "name" of this fictitious resource in HCL?
  • How would you reference the id attribute of a data source named 'dc' of type vsphere_datacenter when supplying the datacenter_id argument to a resource?
  • Which command is used to reauthenticate with the provider when credentials may be invalid?
  • How can Terraform variables be provided to a configuration?
  • Are Terraform variable names stored in the Terraform state file?
  • Which action statement best describes how Terraform Cloud runs are triggered in a VCS-connected workspace?
  • Which of the following is not an advantage of using infrastructure as code operations?
  • Which statement about Terraform Enterprise workspaces is false?
  • Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
  • True or False: You can reference a resource created with for_each using a Splat (*) expression.
  • Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
  • If you remove a resource from configuration after applying, what happens on next apply?
  • Which command option upgrades provider plugins to the latest permissible version for your configuration?
  • Which backends support state locking?
  • When should you run terraform init in a new Terraform project?
  • Which Terraform command would you use to delete resources managed by your configuration?
  • Terraform destroy is the only way to remove infrastructure.
  • In the Azure Terraform workflow, which statement about state updates is true?
  • When importing existing infrastructure into Terraform, should Terraform configuration be written before performing the import?
  • Once a new Terraform backend is configured with a Terraform code block, which command(s) is (are) used to migrate the state file?
  • Terraform can import modules from a number of sources; which of the following is not a valid source?
  • To increase Terraform's logging verbosity for debugging, which environment variable should be configured?
  • What is a typical use-case for a private module registry in Terraform Cloud?
  • Which of the following statements about Terraform Cloud connected workspaces is true?
  • Select the command that doesn't cause Terraform to refresh its state.
  • When does terraform apply reflect changes in the cloud environment?
  • In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.
  • When using a data source for an AWS AMI, which value should be used for the ami argument in a resource?
  • If a module declares a variable with a default value, must that variable also be defined within the module?
  • Which statement describes the timing of state updates in Terraform when planning or applying changes?
  • Which feature of the Terraform Cloud hosted service helps store Terraform state remotely?
  • If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
  • All modules published on the official Terraform Module Registry have been verified by HashiCorp.
  • Which step in the provisioning workflow actually applies changes?
  • Which command adds existing resources to the Terraform state?
  • Which statement about Terraform's interaction with plan output when applying is correct?
  • What is the primary purpose of terraform validate?
  • Which syntax correctly references an output named vnet_id from a module named my_network?
  • You have created a new Terraform configuration for two virtual machines and would like to create the infrastructure for the first time. Which command should you run first?
  • Which Terraform construct is used to compose configurations and reuse code across deployments?
  • You can access state stored with the local backend by using the terraform_remote_state data source.
  • Which statement about Terraform workspaces is true?
  • What is the general syntax to reference a data source attribute in Terraform?
  • Which is not a benefit of adopting infrastructure as code?
  • Data sources fetch information about existing resources.
  • To check if all code in a Terraform configuration with multiple modules is properly formatted without making changes, what command should be run?
  • In the Terraform provisioning workflow, which statement is correct?
  • Which command lists resources in the Terraform state?
  • A Terraform local value can reference other Terraform local values.
  • In Terraform, a provisioner must be placed inside which block?
  • What is the correct syntax to define an output in a Terraform module to expose the public IP of an aws_instance named 'web'?
  • Which of the following is a typical way to provide variables to Terraform when using multiple providers?
  • Define the purpose of state in Terraform.
  • Which method for sharing Terraform configurations keeps them confidential within your organization, supports Terraform's semantic version constraints, and provides a browsable directory?
  • When should you use the force-unlock command?
  • Which Terraform command shows detailed information for a specific resource in the state?
  • Which provisioner executes a command on the machine running Terraform?
  • What is the primary role of Terraform providers?
  • In a deployment where a race condition caused a user's data script to fail, what is the least disruptive fix?
  • Which action brings existing external resources under Terraform management by creating an entry in the state file?
  • Which command would bring existing infrastructure under Terraform management?
  • Most Terraform providers interact with ______.
  • Which statement about Terraform state file security is true?
  • When does Sentinel enforce policy logic during a Terraform Enterprise run?
  • What is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example git::https://example.com/vpc.git)?
  • Which Terraform feature would let you tag multiple resources with a string composed from a generated random_id and a variable without repeating them in each resource?
  • What file records the exact provider versions used in a Terraform configuration to ensure reproducible builds?
  • In a child Terraform module that provisions an AWS instance named main, which is the correct way to define an output for the instance's IP address to the root module?
  • Which Terraform command brings existing infrastructure into Terraform state?
  • In Terraform deployments to Azure, which statement about state files is true?
  • Which IaC principle emphasizes reproducibility and consistency in operations?
  • Which command is used to migrate your Terraform state to a new remote backend as shown?
  • A junior admin accidentally deleted some cloud instances. What does Terraform do when you run terraform apply?
  • Which of the following is not a key principle of infrastructure as code?
  • Infrastructure as Code (IaC) can be stored in a version control system along with application code.
  • What type of block is used to construct a collection of nested configuration blocks?
  • In Terraform, is it true that only the user who generated a plan may apply it?
  • Which statement describes a Terraform module?
  • Which feature allows you to reuse a computed value across multiple resources by defining it once?
  • You're building a CI/CD pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?
  • When you modify a resource in Azure Portal that is managed by Terraform, when does Terraform reflect that change in its state?
  • To move a resource name in the state from htp to http without destroying the resource, which command would you use?
  • If you have a simple Terraform configuration with one VM and you apply again immediately after a successful apply with no code changes, what will happen?
  • Which of the following is not a valid source path for specifying a module?
  • When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
  • What artifact is persisted by the default local backend to track the current state?
  • Which statement about Terraform state management in Azure deployments is accurate?
  • Which of the following is not a valid string function in Terraform?
  • Which method could you use to identify which VM instance Terraform manages if you found two servers with the same name outside Terraform?
  • Which provisioner invokes a process on the resource created by Terraform?
  • What is the default backend when no remote backend is configured in Terraform?
  • How is the Terraform remote backend different than other state backends such as S3, Consul, etc.?
  • In Terraform 0.12 provider configuration, which keyword controls the version constraint for a provider?
  • Which task does terraform init not perform?
  • Which statement about what Terraform fmt does by default is true?
  • You would like to reuse the same Terraform configuration for development and production with different state files; which command would you use?
  • Which operation would bring an existing resource under Terraform management?
  • Which Terraform command initializes a working directory containing configuration files?
  • Open source Terraform can only import publicly-accessible and open-source modules.
  • Which expression correctly references the ID attribute of a data source named ubuntu with type aws_ami?
  • How is Terraform import executed?
  • Which statement about the terraform plan output is true?
  • Which Terraform variable type is best suited to capture configuration values that include a memory field as a number and a server name as a string?
  • When using a remote backend that requires authentication, HashiCorp recommends that you:
  • Which approach helps prevent exposure of sensitive data in Terraform state when using a remote backend?
  • Which AWS provider version constraint is specified by the example configuration?
  • What is the primary benefit of using a provisioning pipeline with version control and code reviews?
  • In a module block for a registry module, what does the source attribute specify?
  • Which is the correct way to pass the value of the variable num_servers into a module input named servers in HCL2?
  • How can you protect sensitive data stored in Terraform state files?
  • Which command migrates your current state file to a new S3 remote backend?
  • What feature stops multiple users from operating on the Terraform state at the same time?
  • Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.
  • Terraform provisioners that require authentication can use which block?
  • Which statement about dependencies in Terraform is true?
  • If a Terraform run creates a VM in a shared cloud account and the state contains only that VM, what is the correct way to delete it with Terraform?
  • Terraform Enterprise workspaces can trigger plans and applies via what integration?
  • Which command outputs the current value of a named output after applying?
  • Which mechanism do Terraform providers primarily use to communicate with cloud services?
  • Which file stores the Terraform state locally?
  • Terraform requires the Go runtime as a prerequisite for installation.
  • To bring existing GCP VMs under Terraform management, which action is required?
  • What is the name assigned by Terraform to reference this resource? (Example in the configuration)
  • Which statement is true about the plan output when applying Terraform?
  • What is the name assigned by Terraform to reference this resource in the provided example?
  • Which statement about private module sources is true?
  • Sentinel policy-as-code is available in Terraform Enterprise.
  • Which backend option provides remote state with locking and is commonly used with Terraform Cloud?
  • Which of the following is a benefit of using Sentinel with Terraform Cloud/Terraform Enterprise?
  • Where are modules cached in the first initialization of Terraform?
  • What does terraform destroy do?
  • How do you specify a module's version when publishing it to the public Terraform Module Registry?
  • What is the purpose of the destroy command in Terraform?
  • Terraform init fetches module sources for referenced modules.
  • Which of the following describes a module source path that indicates a module from HashiCorp's registry?
  • If a module uses local values, you can expose that value with a Terraform output.
  • Which feature of the Terraform Cloud/Terraform Enterprise private module registry helps with version constraints and provides a browsable directory?
  • To move a resource in state from one name to another without recreating it, which command should you use?
  • Terraform Cloud is available only as a paid offering from HashiCorp.
  • What feature prevents multiple admins from changing the Terraform state at the same time?
  • You cannot install third party plugins using terraform init.
  • Which backend does the Terraform CLI use by default?
  • Which outcome is expected when a creation-time provisioner fails?
  • Which operation is used to bring an existing resource under Terraform management?
  • A Terraform apply cannot _______ infrastructure.
  • During which Terraform phase are providers installed?
  • Running terraform fmt without any flags will check the formatting of those files without changing their contents.
  • For a resource that uses a named provider configuration, which option shows the correct syntax to reference the named provider?
  • Which statement best describes the role of a Terraform provider?
  • Which Terraform command lets you view all attributes and details of a managed resource?
  • To stop Terraform from managing a specific resource while leaving the resource in place, which command would you use?
  • Which command initializes a working directory and downloads provider plugins?
  • What is a common disadvantage of using dynamic blocks in Terraform?
  • Which command creates an execution plan in Terraform?
  • Terraform can run on Windows or Linux, but it requires a Windows operating system.
  • A Terraform provider is not responsible for:
  • What is terraform refresh intended to detect?
  • Which argument is required when declaring a Terraform variable?
  • What is the purpose of a data source in Terraform?
  • Which command should you run to preview changes Terraform would apply without applying them?
  • If you run terraform destroy without any flags after applying a configuration that includes a load balancer, what will Terraform do?
  • Before you can use Terraform's remote backend, you must first execute terraform init.
  • Which action is the primary way to incorporate existing resources into Terraform's state?
  • Which option cannot be used to keep secrets out of Terraform configuration files?
  • Define the purpose of state in Terraform.
  • What is the primary purpose of the Terraform state file?
  • If a Terraform creation-time provisioner fails, what will occur by default?
  • You must use different Terraform commands depending on the cloud provider you use.
  • What is the effect of tainting a resource in Terraform?
  • To install the new provider version in an existing Terraform project, which command should you run?
  • Is the public Module Registry free to use?
  • Which provider authentication method prevents credentials from being stored in the state file?
  • Which is the correct way to pass the value in the variable num_servers into a module with the input servers?
  • What is a primary benefit of running terraform plan during development?
  • Which statement about Terraform code indentation is correct?
  • In the context of remote backends requiring authentication, which approach is advised?
  • A Terraform provisioner must be nested inside a resource configuration block. Which of the following best reflects this statement?
  • Which command should be run in CI/CD to enforce Terraform code formatting standards?
  • Which backend does the Terraform CLI use by default?
  • Which command-line option can be used to provide variable values from a file?
  • Which operation is not performed by terraform apply?
  • Which command updates the lock file with provider version constraints?
  • Which statement best describes the terraform validate command?
  • Terraform init retrieves the source code for all referenced modules.
  • Which of the following is not a valid Terraform collection type?
  • Variables declared within a module are accessible outside of the module.
  • You corrected the count variable value and saved your change. What should you do next to apply the changes?
  • What is not processed when running a Terraform refresh?
  • A Terraform backend determines how Terraform loads state and stores updates when you execute which operation?
  • Where does the Terraform local backend store its state?
  • When using a remote backend or Terraform Cloud integration, where is resource state stored?
  • Which statement about Terraform state is true?
  • Which Terraform function could you use to select the largest number from a list?
  • What is the result of importing an existing resource into Terraform state?
  • Which of the following is a best practice for backend configuration in Terraform?
  • Which Terraform feature can expose a locally derived value from a module?
  • Which option is used to pass variable values to Terraform from the command line?
  • Which command applies the changes described in the configuration after initialization?
  • When using multiple configurations of the same Terraform provider, which meta-argument must be included in any non-default provider configurations?
  • You have to initialize a Terraform backend before it can be configured.
  • A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.
  • What is true about the Terraform state file?
  • Which statement about Terraform modules and nesting is true?
  • What does the .terraform.lock.hcl file track?
  • Which statement describes a goal of infrastructure as code?
  • What command does Terraform require the first time you run it within a configuration directory?
  • HashiCorp verifies every module on the Terraform Registry.
  • If you delete the VM via the cloud provider console and run Terraform apply again without changing code, what happens?
  • One remote backend configuration always maps to a single remote workspace.
  • Which practice best protects sensitive values in Terraform state files?
  • What is the proper way to expose a resource attribute from a child module to the root module?
  • Terraform configuration can contain only one provider type.
  • Terraform Enterprise and Cloud Workspaces are conceptually separate working directories from Terraform Open Source.
  • Terraform validate reports syntax check errors from which scenario?
  • Which construct can be used to avoid writing 42 nested ingress blocks by hand?
  • HashiCorp Configuration Language (HCL) supports user-defined functions.
  • You have decided to create a new Terraform workspace to deploy a development environment. What is different about this workspace?
  • Which statement describes a configuration where a resource ID is declared more than once?
  • In a Terraform configuration, where do you specify the state backend?
  • Which option would let you define multiple nested blocks inside a VM resource using a variable's values?
  • Terraform workspaces provide isolation of state by environment, allowing separate state files for different environments within the same configuration.
  • Which of the following is not a valid Terraform variable type?
  • The terraform.tfstate file always matches your currently built infrastructure.
  • Which action does not affect the Terraform state?
  • In Terraform, a resource is uniquely identified in the state by which of the following?
  • When organizing module sources, which statement best describes a private module registry in Terraform Cloud/Enterprise?
  • Which configuration consistency error does Terraform validate report?
  • Which of the following is not true of Terraform providers?
  • Terraform provisioners can be added to any resource block.
  • Which statement about HCL is true?
  • Which Terraform feature lets you read information from existing infrastructure without creating or modifying it?
  • Which statement about local modules is incorrect?
  • Terraform apply will fail if you have not run a terraform plan first to update the plan output.
  • When running terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.
  • If there are no outputs defined in your configuration, which method helps you determine a resource's attribute from the state file?
  • Which action brings external resources under Terraform management by creating an entry in the state file?
  • As a member of an operations team, you are diagnosing a 403 Access Denied error while loading state. What is a recommended first step?
  • In Terraform HCL, how do you reference the indexing attribute of the AWS instance resource named 'web'?
  • In Terraform, which form of the required_providers block correctly specifies a minimum version?
  • Which practice helps maintain safe concurrent work with Terraform state in a team?
  • Your organization requires that new AWS S3 buckets be private and encrypted at rest. How can Terraform Enterprise automatically enforce this security control before changes are applied?
  • Which command displays all workspaces for the current Terraform configuration?
  • What is the primary purpose of terraform init?
  • Why does this backend configuration not follow best practices?
  • Is a module version required to reference a Module Registry module?
  • Terraform and Terraform providers must use the same major version number in a single configuration.
  • If you are using Terraform Enterprise or Cloud Workspaces, how should you think of their working directories relative to Open Source?
  • Which of the following is a local module source path?
  • What does terraform import allow you to do?
  • How do you specify version 1.0.0 for a module stored on the public Terraform Module Registry within a module block?
  • You can develop a custom provider to manage its resources using Terraform.
  • Which module source path does not specify a remote module?
  • How can you format Terraform HCL code according to standard Terraform style convention?
  • Which Terraform command updates provider plugins to the latest acceptable versions?
  • How would you reference the name value of the second aws_instance.web instance?
  • Terraform variables and outputs that set the 'description' argument will store that description in the state file.
  • What is the purpose of the .terraform.lock.hcl file?
  • Moving from local backend to remote backend, which backend would not work?
  • When writing Terraform code, how should you indent each nesting level relative to the level above it?
  • To share Terraform state with your team, store it securely, and provide state locking, which backend configuration would you choose?
  • Which statement best describes the use of terraform taint?
  • Which action brings existing external resources under Terraform management by creating an entry in the state file?
  • Where can Terraform load a provider from?
  • What does the file() function do in Terraform?
  • Which statement about Terraform state management is accurate?
  • Which Terraform collection type should you use to store key/value pairs?
  • Which is the safest way to inject sensitive values into a Terraform Cloud workspace?
  • Which Terraform command validates the syntax and configuration without applying changes?
  • Which option is not a safe way to inject sensitive values into a Terraform Cloud workspace?
  • What is the primary purpose of a Terraform workspace in either open source or enterprise?
  • Terraform validates the syntax of Terraform files.
  • Any user can publish modules to the public Terraform Module Registry.
  • Which command will show all resources that would be deleted if you proceed with destruction?
  • If a resource is tainted, what will Terraform do on the next apply?
  • If you want to replace a VM created by Terraform with an identical one without affecting a database, which approach is best?
  • Terraform init initializes a sample main.tf file in the current directory.
  • To automatically enforce Terraform code conventions in a CI/CD workflow, which command should be run?
  • A module can always refer to all variables declared in its parent module.
  • What is the purpose of the depends_on meta-argument in Terraform?
  • Which of the following is available only in Terraform Enterprise or Cloud workspaces and not in Terraform CLI?
  • You should store secret data in the same version control repository as your Terraform configuration.
  • If you suspect credentials are causing a state access error, which command should you run?
  • Which commands would you use to view the attributes of a resource from the state file?
  • Which concept describes where Terraform stores the state and how it's locked?
  • Which command can you run to generate DOT formatted data to visualize Terraform dependencies?
  • Which command checks that all code referencing multiple modules is properly formatted without making changes?
  • Which option prevents sensitive values from appearing in logs or plans?
  • Which command lets you experiment with Terraform's built-in functions?
  • Which of the following correctly references a variable named num_instances in Terraform?
  • What value does the Terraform Cloud/Terraform Enterprise private module registry provide over the public Terraform Module Registry?
  • What does state locking accomplish?
  • Which environment variable must be configured to make Terraform's logging more verbose?
  • Which approach best enforces consistent infrastructure configuration by treating deployments as code committed to version control and reviewed before apply?
  • True or False: Terraform automatically reconciles manually destroyed resources on the next plan?
  • What is the primary purpose of terraform import?
  • How would you reference the Volume IDs associated with the ebs_block_device blocks on an AWS instance named example?
  • Which statement about state backends is true?
  • During a terraform apply -refresh-only run, which element is not consulted by Terraform?
  • Which option would log trace-level information about provider loading when debugging Terraform?
  • What does terraform destroy do?
  • Which statement best describes how Terraform interprets a value assigned to a variable declared as an object type?
  • Where are versioning signals for a module published when using the public Terraform Module Registry?
  • Which statement about Terraform apply is true?
  • Which flag would you add to terraform plan to save the execution plan to a file?
  • Which method is recommended for supplying sensitive variables to Terraform during automation?
  • Which Terraform command initializes the configuration directory, setting up the backend and modules for subsequent operations?
  • The ______ determines how Terraform creates, updates, or deletes resources.
  • The statement 'A module can always refer to all variables declared in its parent module' is:
  • Which information does the public Terraform Module Registry automatically expose about published modules?
  • How does Terraform manage most dependencies between resources?
  • Which command displays the values of Terraform outputs defined in the configuration?
  • In Terraform configuration, what is the term for the label used to reference a specific resource instance?
  • How would you output returned values from a child module?
  • Which backend feature enables sharing state and applying state operations remotely?
  • Which of the following steps is required to initialize Terraform before provisioning?
  • Which command shows what will be deleted when destroying a Terraform configuration, without applying changes?
  • Terraform plan updates your state file.
  • Which command should you use to tell Terraform to no longer manage the resource?
  • How does Terraform determine dependencies between resources?
  • Which function would you use to join strings in Terraform?
  • Which command would you use to preview changes before applying a Terraform configuration?
  • Why will the apply fail when you write a new configuration and immediately run Terraform apply with the local backend?
  • 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?
  • What is a key benefit of the Terraform state file?
  • Which statement is true about Terraform providers and APIs?
  • Which Terraform feature would help you define multiple data disks as nested blocks inside a VM resource using values from a variable?
  • If you update the version constraint in your Terraform configuration, will Terraform update the lock file the next time you run terraform init?
  • What is the primary purpose of a Terraform module?
  • Changing the Terraform backend from the default 'local' backend to a different one after doing your first terraform apply is:
  • In Terraform expressions, which option correctly describes the var keyword?
  • Which action will prevent two Terraform runs from changing the same state file at the same time?
  • If a local module is specified with source = "./module", what kind of module is this?
  • Which Terraform command refreshes the state to align with real infrastructure?
  • Which of the following is not an action performed by terraform init?
  • Which open source Terraform feature allows you to manage multiple state files for different environments while keeping them linked to the same configuration?
  • In Terraform HCL, an object type defined as object({ name = string, age = number }) would match which value?
  • Which method demonstrates infrastructure as code when provisioning resources into a public cloud?
  • All standard backend types support state storage, locking, and remote operations like plan, apply and destroy.
  • If you add a new resource using the same provider and do not update the version constraint, and a lock file exists, which version will Terraform use?
  • Which of the following is not a way to trigger terraform destroy?
  • Which Terraform command migrates a workspace to a remote backend after updating your configuration?
  • Which of the following is a valid module source reference using Terraform Registry style?
  • Which Terraform feature allows enforcing security controls before changes are applied?
  • You are configuring Terraform to use both AWS and Datadog providers. Which approach enables multiple providers in a single configuration?
  • To constrain the GitHub provider to version 2.1 or greater in Terraform 0.12 configuration's provider block, which option would you use?
  • Which feature is not included in Terraform Cloud's free tier?
  • Which provision is best to use to run a script on a virtual machine created by Terraform?
  • Do Terraform Cloud and Terraform Enterprise support policy as code (Sentinel)?
  • What does a local module source path indicate?
  • In a scenario where an external change is made to a resource managed by Terraform, what happens when you run terraform apply?
  • Where in Terraform configuration do you declare a state backend?
  • Which argument is required when declaring a Terraform output?
  • Which data source expression correctly references the id of a vsphere_datacenter data source named 'dc'?
  • When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?
  • If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resources, which scenario poses a challenge?
  • Which statement about Terraform modules is true?
  • Which of the following is allowed as a Terraform variable name?
  • What is the primary purpose of the required_providers block in a Terraform configuration?
  • What is the provider for this fictitious resource in the example?
  • Which provisioner runs commands on the local machine where Terraform is executed during apply?
  • What is the workflow for deploying new infrastructure with Terraform?
  • Which statement about provider configurations is true?
  • In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.
  • What is the most secure place to store secrets for connecting to a Terraform remote backend?
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy