TA-002-P Exam Questions
446 real TA-002-P exam questions with expert-verified answers and explanations. Page 2 of 9.
- Question #51Implement and maintain state
Where in your Terraform configuration do you specify a state backend?
state backendterraform blockconfiguration structureremote state - Question #52Read, generate, and modify configuration
In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.
Terraform ProvidersProvider NamingConfiguration SyntaxTerraform 0.13+ - Question #53Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What command should you run to display all workspaces for the current configuration?
Terraform CLIWorkspacesCommand syntax - Question #54Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Terraform providers are always installed from the Internet.
Terraform providersProvider installationterraform initPrivate registries - Question #55Implement and maintain state
Which of these is the best practice to protect sensitive values in state files?
Terraform state securitySensitive valuesRemote backendsState management - Question #56Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
When does terraform apply reflect changes in the cloud environment?
terraform applyresource provisioningcloud provider interactionTerraform lifecycle - Question #57Read, generate, and modify configuration
How would you reference the "name" value of the second instance of this fictitious resource?
Terraform functionselement functionResource referencingList access - Question #58Understand Terraform basics
A Terraform provider is not responsible for:
Terraform ProviderTerraform CoreProvider responsibilitiesTerraform architecture - Question #59Read, generate, and modify configuration
Terraform provisioners can be added to any resource block.
provisionersresource blocksconfiguration syntax - Question #60Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What is terraform refresh intended to detect?
terraform refreshstate filestate driftCLI commands - Question #61Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
FILL BLANK Which flag would you add to terraform plan to save the execution plan to a file? Type your answer in the field provided. The text field is not case-sensitive and all var...
terraform planCLI flagssaving execution plancommand line interface - Question #62Implement and maintain state
FILL BLANK What is the name of the default file where Terraform stores the state? Type your answer in the field provided. The text field is not case-sensitive and all variations of...
Terraform state fileState managementDefault file - Question #63Understand Terraform basics
A Terraform local value can reference other Terraform local values.
Terraform localslocal valuesconfiguration references - Question #64Understand Terraform basics
Which of the following is not a valid Terraform collection type?
Terraform data typesCollection typesListsMaps - Question #65Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.
terraform taintresource lifecycleTerraform CLI - Question #66Implement and maintain state
All standard backend types support state storage, locking, and remote operations like plan. apply and destroy.
Terraform backendsState managementState lockingRemote state - Question #67Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
How can terraform plan aid in the development process?
terraform planexecution planCLIvalidation - Question #68Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You would like to reuse the same Terraform configuration for your development and production environments with a different state file for each. Which command would you use?
Terraform CLIState managementBackend configurationMulti-environment - Question #69Understand Terraform basics
What is the name assigned by Terraform to reference this resource?
Resource namingResource referenceConfiguration syntaxLocal name - Question #70Read, generate, and modify configuration
You're building a CI/CD (continuous integration/ continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?
Sensitive variablesSecrets managementCI/CDConfiguration security - Question #71Implement and maintain state
Your security team scanned some Terraform workspaces and found secrets stored in a plaintext in state files. How can you protect sensitive data stored in Terraform state files?
Terraform stateState file securityEncrypted backendsSensitive data - Question #72Use Terraform Cloud and Terraform Enterprise capabilities
In contrast to Terraform Open Source, when working with Terraform Enterprise and Cloud Workspaces, conceptually you could think about them as completely separate working directorie...
Terraform CloudTerraform EnterpriseWorkspacesRemote execution - Question #73Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (*.tf files). You need to enable debug messages to find this out. Which...
Terraform loggingDebuggingEnvironment variablesProvider loading - Question #74Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
How is terraform import run?
terraform importterraform planCLI workflowState management - Question #75Use 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...
Terraform applyDrift detectionState managementResource reconciliation - Question #76Implement and maintain state
Which of these options is the most secure place to store secrets foe connecting to a Terraform remote backend?
Secrets managementRemote backendSecurity best practicesEnvironment variables - Question #77Implement and maintain state
Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to begin storing the state file in a central loca...
Terraform BackendsRemote StateState Management - Question #78Implement and maintain state
Which backend does the Terraform CLI use by default?
Terraform CLIDefault BackendLocal StateState Management - Question #79Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?
Terraform CLIterraform initModulesCaching - Question #80Use Terraform Cloud and Terraform Enterprise capabilities
You write a new Terraform configuration and immediately run terraform apply in the CLI using the local backend. Why will the apply fail?
Terraform CloudAuthenticationRemote BackendCLI apply - Question #81Implement and maintain state
What features stops multiple admins from changing the Terraform state at the same time?
State lockingTerraform stateConcurrency controlRemote backends - Question #82Implement and maintain state
A fellow developer on your team is asking for some help in refactoring their Terraform code. As part of their application's architecture, they are going to tear down an existing de...
Terraform CLIState Managementterraform state rmResource Detachment - Question #83Read, generate, and modify configuration
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
dependenciesdepends_on argumentimplicit dependenciesresource ordering - Question #84Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
A terraform apply can not _________ infrastructure.
terraform applycli commandsinfrastructure lifecycleresource management - Question #85Read, generate, and modify configuration
You need to constrain the GitHub provider to version 2.1 or greater. Which of the following should you put into the Terraform 0.12 configuration's provider block?
Terraform providersVersion constraintsHCL syntaxConfiguration - Question #86Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You just scaled your VM infrastructure and realized you set the count variable to the wrong value. You correct the value and save your change. What do you do next to make your infr...
Terraform CLIOutputsConfiguration ChangesVerification - Question #87Read, generate, and modify configuration
Terraform provisioners that require authentication can use the ______ block.
Terraform provisionersConnection blockAuthenticationRemote execution - Question #88Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Terraform validate reports syntax check errors from which of the following scenarios?
Terraform validateVariablesConfiguration validationTerraform CLI - Question #89Understand Terraform basics
Which of the following is allowed as a Terraform variable name?
Terraform variablesNaming conventionsReserved keywords - Question #90Read, generate, and modify configuration
What type of block is used to construct a collection of nested configuration blocks?
Terraform HCLDynamic BlocksNested ConfigurationConfiguration Blocks - Question #91Interact with Terraform modules
Module variable assignments are inherited from the parent module and do not need to be explicitly set.
Terraform modulesModule variablesVariable passingModule inheritance - Question #92Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
If writing Terraform code that adheres to the Terraform style conventions, how would you properly indent each nesting level compared to the one above it?
Terraform style conventionsIndentationCode formattingterraform fmt - Question #93Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the following is not an action performed by terraform init?
terraform initCLIinitializationbackend configuration - Question #94Read, generate, and modify configuration
HashiCorp Configuration Language (HCL) supports user-defined functions.
HCLLanguage featuresUser-defined functions - Question #95Use Terraform Cloud and Terraform Enterprise capabilities
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
Terraform CloudVCS IntegrationRun TriggerWorkspaces - Question #96Understand Terraform basics
Terraform and Terraform providers must use the same major version number in a single configuration.
TerraformProvidersVersioningConfiguration - Question #97Understand infrastructure as code (IaC) concepts
Which statement describes a goal of infrastructure as code?
Infrastructure as CodeIaC goalsIaC definitionAutomation - Question #98Implement and maintain state
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)
Terraform stateDrift detectionState managementExternal changes - Question #99Read, generate, and modify configuration
You need to deploy resources into two different cloud regions in the same Terraform configuration. To do that, you declare multiple provider configurations as follows: What meta-ar...
Aliased ProvidersProvider ConfigurationResource ConfigurationMulti-region deployment - Question #100Interact with Terraform modules
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?
ModulesInput VariablesModule CommunicationVariables