TA-002-P Exam Questions
446 real TA-002-P exam questions with expert-verified answers and explanations. Page 9 of 9.
- Question #404Implement and maintain state
A Terraform backend determines how Terraform loads state and stores updates when you execute ___________.
Terraform backendTerraform stateState managementTerraform CLI - Question #405Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What does Terraform use .terraform.lock.hcl file for?
provider lockingdependency managementterraform init.terraform.lock.hcl - Question #406Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
A junior admin accidentally deleted some of your cloud instances. What does Terraform do when you run terraform apply?
Terraform applyState managementDrift detectionResource reconciliation - Question #407Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully. What will happen if y...
IdempotencyTerraform stateterraform applyResource management - Question #408Read, generate, and modify configuration
How would you reference the Volume IDs associated with the ebs_block_device blocks in this configuration?
Terraform HCL SyntaxReferencing AttributesSplat OperatorNested Blocks - Question #409Interact with Terraform modules
In the below configuration, how would you reference the module output vpc_id? Type your answer in the field provided. The text field is not case sensitive and all variations of the...
Terraform modulesModule outputsConfiguration syntaxReferencing resources - Question #410Use Terraform Cloud and Terraform Enterprise capabilities
All Terraform Cloud tiers support team management and governance.
Terraform Cloud TiersTeam ManagementGovernanceProduct Features - Question #411Understand infrastructure as code (IaC) concepts
Which are examples of infrastructure as code? (Choose two.)
Infrastructure as CodeIaC examplesConfiguration filesDocker - Question #412Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You cannot install third party plugins using terraform init.
terraform initproviderspluginsprovider installation - Question #413Implement and maintain state
Why does this backend configuration not follow best practices?
Terraform backendSecurity best practicesCredentials managementState management - Question #414Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which command lets you experiment with Terraform's built-in functions?
terraform consoleterraform clibuilt-in functionshcl functions - Question #415Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Terraform console provides an interactive command-line console for evaluating and experimenting with expressions. You can use it to test interpolations before using them in configu...
terraform validateCLI commandsconfiguration consistencysyntax checking - Question #416Implement and maintain state
You have a Terraform configuration that defines a single virtual machine with no references to it. You have run terraform apply to create the resource, and then removed the resourc...
Terraform applyState managementResource lifecycleDesired state - Question #417Implement and maintain state
Which provider authentication method prevents credentials from being stored in the state file?
Provider authenticationState securityEnvironment variablesSensitive data - Question #418Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have modified your local Terraform configuration and ran terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you...
terraform planterraform applystate driftexecution plan - Question #419Implement and maintain state
Changing the Terraform backend from the default "local" backend to a different one after doing your first terraform apply is:
Terraform backendState managementState migration - Question #420Implement and maintain state
Which are forbidden actions when the Terraform state file is locked? (Choose three.)
Terraform stateState lockingTerraform CLI - Question #421Use Terraform Cloud and Terraform Enterprise capabilities
Which of the following is the safest way to inject sensitive values into a Terraform Cloud workspace?
Terraform CloudSensitive variablesSecurity best practicesWorkspace variables - Question #422Read, generate, and modify configuration
You need to write some Terraform code that adds 42 firewall rules to a security group as shown in the example. What can you use to avoid writing 42 different nested ingress config...
Dynamic blocksTerraform configurationNested blocksIteration - Question #423Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the following is true about terraform apply? (Choose two.)
terraform applyresource lifecycleconfiguration scope - Question #424Interact with Terraform modules
Which of the following is not valid source path for specifying a module?
Module sourcesTerraform modulesModule addressingConfiguration syntax - Question #425Implement and maintain state
What does terraform refresh modify?
Terraform CLIterraform refreshState fileState management - Question #426Understand Terraform basics
How does Terraform determine dependencies between resources?
Dependency resolutionResource graphImplicit dependenciesTerraform core concepts - Question #427Understand infrastructure as code (IaC) concepts
Which of the following is not an advantage of using infrastructure as code operations?
Infrastructure as Code (IaC)IaC advantagesIaC operationsIaC characteristics - Question #428Use Terraform Cloud and Terraform Enterprise capabilities
Terraform Cloud is available only as a paid offering from HashiCorp.
Terraform CloudOfferingsPricingFree tier - Question #429Read, generate, and modify configuration
You are creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to...
providersconfiguration blockssyntaxmulti-provider - Question #430Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
When do you need to explicitly execute terraform refresh?
terraform refreshterraform planterraform applyTerraform CLI - Question #431Read, generate, and modify configuration
Which of the following arguments are required when declaring a Terraform output?
Terraform outputsHCL syntaxRequired argumentsConfiguration language - Question #432Interact with Terraform modules
Which of the following locations can Terraform use as a private source for modules? (Choose two.)
Terraform modulesModule sourcesPrivate repositoriesSCM integration - Question #433Implement and maintain state
Once a new Terraform backend is configured with a Terraform code block, which command(s) is (are) used to migrate the state file?
Terraform stateBackend configurationState migrationTerraform CLI - Question #434Understand Terraform basics
What does Terraform use providers for? (Choose three.)
Terraform providersInfrastructure provisioningAPI abstraction - Question #435Interact with Terraform modules
You are writing a child Terraform module which provisions an AWS instance. You want to make use of the IP address returned in the root configuration. You name the instance resource...
Terraform outputsHCL2 syntaxModule developmentResource attributes - Question #436Interact with Terraform modules
How do you specify a module's version when publishing it to the public Terraform Module Registry?
Terraform ModulesModule RegistryModule VersioningGit Tags - Question #437Understand Terraform basics
Most Terraform providers interact with ____________.
Terraform providersAPI interactionProvider architecture - Question #438Understand infrastructure as code (IaC) concepts
Which of the following is true about Terraform's implementation of infrastructure as code? (Choose two.)
Infrastructure as CodeAutomationVersion controlTerraform benefits - Question #439Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time. Which Terrafor...
Terraform CLIterraform initWorkflowProject Initialization - Question #440Read, generate, and modify configuration
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
data sourcesconfiguration blocksinformation retrievalTerraform blocks - Question #441Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
To check if all code in a Terraform configuration with multiple modules is properly formatted without making changes, what command should be run?
terraform fmtcode formattingCLI commandsmodules - Question #442Interact with Terraform modules
You are using a networking module in your Terraform configuration with the name label my_network. In your main configuration you have the following code: When you run terraform val...
Terraform modulesModule outputsModule interactionConfiguration syntax - Question #443Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?
Terraform CLIProvidersterraform initVersion Management - Question #444Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What command can you run to generate DOT (Document Template) formatted data to visualize Terraform dependencies?
Terraform CLIDependency Graphterraform graphDOT format - Question #445Implement and maintain state
terraform apply is failing with the following error. What next step should you take to determine the root cause of the problem? Error loading state: AccessDenied: Access Denied sta...
DebuggingState ManagementAccess DeniedEnvironment Variables - Question #446Interact with Terraform modules
A module can always refer to all variables declared in its parent module.
modulesmodule variablesmodule scopedata passing - Question #447Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have created a main.tr Terraform configuration consisting of an application server, a database, and a load balancer. You ran terraform apply and all resources were created succ...
Terraform CLIterraform destroyResource lifecycleConfirmation prompts - Question #448Implement and maintain state
What does state locking accomplish?
state lockingTerraform stateconcurrencyrace conditions - Question #449Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What does terraform import allow you to do?
terraform importState ManagementCLI CommandInfrastructure Management