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 – The All-in-One Guide to Master Your Certification! course image
All questions

These questions are part of the practice quiz. Start practicing

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

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy