TA-002-P Exam Questions
446 real TA-002-P exam questions with expert-verified answers and explanations. Page 1 of 9.
- Question #1Implement and maintain state
The terraform.tfstate file always matches your currently built infrastructure.
terraform statestate fileinfrastructure driftstate management - Question #2Use Terraform Cloud and Terraform Enterprise capabilities
One remote backend configuration always maps to a single remote workspace.
Terraform CloudRemote BackendWorkspacesState Management - Question #3Use Terraform Cloud and Terraform Enterprise capabilities
How is the Terraform remote backend different than other state backends such as S3, Consul, etc.?
Terraform remote backendTerraform CloudRemote operationsState backend differentiation - Question #4Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What is the workflow for deploying new infrastructure with Terraform?
Terraform workflowterraform initterraform planterraform applyCLI commands - Question #5Understand Terraform basics
A provider configuration block is required in every Terraform configuration. Example:
ProvidersConfiguration structureRequired blocks - Question #6Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
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 fir...
terraform taintprovisionersnull_resourceresource lifecycle - Question #7Understand Terraform basics
Which provisioner invokes a process on the resource created by Terraform?
Provisionersremote-execResource lifecycle - Question #8Understand Terraform basics
Which of the following is not true of Terraform providers?
Terraform ProvidersProvider EcosystemProvider MaintenanceHashiCorp Registry - Question #9Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What command does Terraform require the first time you run it within a configuration directory?
terraform initinitializationCLI commands - Question #10Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have deployed a new webapp with a public IP address on a clod provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP ad...
Terraform CLIterraform outputState inspectionResource attributes - Question #11Understand infrastructure as code (IaC) concepts
Which of the following is not a key principle of infrastructure as code?
Infrastructure as CodeIaC PrinciplesIdempotenceGolden Images - Question #12Implement and maintain state
Terraform variables and outputs that set the "description" argument will store that description in the state file.
Terraform stateVariables descriptionOutputs descriptionConfiguration metadata - Question #13Understand Terraform basics
What is the provider for this fictitious resource?
Terraform providerConfiguration basicsAWSResource management - Question #14Implement and maintain state
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
Terraform StateState ManagementDrift DetectionImplicit Refresh - Question #15Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What is not processed when running a terraform refresh?
terraform refreshCLI commandsstate managementresource reconciliation - Question #16Interact with Terraform modules
What information does the public Terraform Module Registry automatically expose about published modules?
Terraform Module RegistryModule VariablesModule OutputsModule Metadata - Question #17Interact with Terraform modules
If a module uses a local variable, you can expose that value with a terraform output.
Terraform localsTerraform outputsTerraform modulesModule data exposure - Question #18Understand infrastructure as code (IaC) concepts
You should store secret data in the same version control repository as your Terraform configuration.
Secrets ManagementSecurity Best PracticesVersion ControlIaC Security - Question #19Read, generate, and modify configuration
Which of the following is not a valid string function in Terraform?
Terraform functionsString functionsBuilt-in functionsHCL - Question #20Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage...
Terraform ImportGCPExisting ResourcesCLI - Question #21Understand infrastructure as code (IaC) concepts
You have recently started a new job at a retailer as an engineer. As part of this new role, you have been tasked with evaluating multiple outages that occurred during peak shopping...
Manual ConfigurationConfiguration InconsistencyOperational ChallengesInfrastructure as Code Purpose - Question #22Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
terraform init initializes a sample main.tf file in the current directory.
terraform initTerraform CLIinitializationconfiguration files - Question #23Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which two steps are required to provision new infrastructure in the Terraform workflow? (Choose two.)
Terraform workflowProvisioning infrastructureterraform initterraform apply - Question #24Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Why would you use the terraform taint command?
Terraform CLIterraform taintResource LifecycleForce Recreation - Question #25Understand Terraform basics
Terraform requires the Go runtime as a prerequisite for installation.
installationprerequisitesGo runtimestatically compiled binary - Question #26Implement and maintain state
When should you use the force-unlock command?
Terraform CLIState lockingforce-unlockTroubleshooting - Question #27Interact with Terraform modules
Terraform can import modules from a number of sources ?which of the following is not a valid source?
Terraform modulesModule sourcesModule import - Question #28Use Terraform Cloud and Terraform Enterprise capabilities
Which of the following is available only in Terraform Enterprise or Cloud workspaces and not in Terraform CLI?
Terraform CloudTerraform EnterpriseTerraform CLIMulti-cloud support - Question #29Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
terraform validate validates the syntax of Terraform files.
terraform validateCLI commandssyntax validationTerraform basics - Question #30Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. T...
Terraform CLIterraform plan -destroyterraform destroyResource destruction preview - Question #31Interact with Terraform modules
Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?
Terraform modulesModule inputsVariable assignment - Question #32Understand Terraform basics
A Terraform provisioner must be nested inside a resource configuration block.
Terraform syntaxProvisionersResource configurationHCL - Question #33Understand Terraform basics
Terraform can run on Windows or Linux, but it requires a Server version of the Windows operating system.
InstallationOperating System RequirementsCompatibilityTerraform Basics - Question #34Implement and maintain state
What does the default "local" Terraform backend store?
Terraform backendLocal backendState fileTerraform state management - Question #35Read, generate, and modify configuration
You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability. How can you format Terraform H...
HCL formattingCode styleReadabilityConfiguration standards - Question #36Use Terraform Cloud and Terraform Enterprise capabilities
What value does the Terraform Cloud/Terraform Enterprise private module registry provide over the public Terraform Module Registry?
Terraform CloudTerraform EnterprisePrivate Module RegistryModule Sharing - Question #37Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which task does terraform init not perform?
terraform initCLI commandsprovidersmodules - Question #38Read, generate, and modify configuration
You have declared a variable called var.list which is a list of objects that all have an attribute id. Which options will produce a list of the IDs? (Choose two.)
HCL SyntaxList ManipulationFor ExpressionsSplat Operator - Question #39Read, generate, and modify configuration
Which argument(s) is (are) required when declaring a Terraform variable?
Terraform variablesConfiguration syntaxVariable arguments - Question #40Interact with Terraform modules
When using a module block to reference a module stored on the public Terraform Module Registry such as: How do you specify version 1.0.0?
Terraform ModulesModule RegistryModule VersioningModule Source - Question #41Use Terraform Cloud and Terraform Enterprise capabilities
What features does the hosted service Terraform Cloud provide? (Choose two.)
Terraform CloudRemote State StorageAutomatic BackupsManaged Service - Question #42Implement and maintain state
Where does the Terraform local backend store its state?
Terraform StateLocal BackendState Fileterraform.tfstate - Question #43Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which option can not be used to keep secrets out of Terraform configuration files?
Secrets managementTerraform variablesCLI argumentsSecurity best practices - Question #44Understand Terraform basics
What is one disadvantage of using dynamic blocks in Terraform?
TerraformDynamic BlocksHCLLooping - Question #45Use Terraform Cloud and Terraform Enterprise capabilities
Only the user that generated a plan may apply it.
Terraform CloudPermissionsPlan and Apply WorkflowSecurity - Question #46Read, generate, and modify configuration
Examine the following Terraform configuration, which uses the data source for an AWS AMI. What value should you enter for the ami argument in the AWS instance resource?
Terraform data sourcesResource referencingTerraform syntaxAWS AMI - Question #47Read, generate, and modify configuration
FILL BLANK You need to specify a dependency manually. What resource meta-parameter can you use to make sure Terraform respects the dependency? Type your answer in the field provide...
data sourceslocal_fileconfiguration - Question #48Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (V...
Terraform stateterraform destroyResource lifecycleTerraform CLI - Question #49Understand Terraform basics
What is the name assigned by Terraform to reference this resource?
Terraform syntaxResource blockResource namingConfiguration basics - Question #50Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.
TF_LOGDebuggingEnvironment VariablesLogging