TA-002-P Exam Questions
446 real TA-002-P exam questions with expert-verified answers and explanations. Page 5 of 9.
- Question #201Interact with Terraform modules
Eric needs to make use of module within his terraform code. Should the module always be public and open-source to be able to be used?
Terraform ModulesModule SourcesPrivate ModulesPublic Modules - Question #202Interact with Terraform modules
Dawn has created the below child module. Without changing the module, can she override the instance_type from t2.micro to t2.large form her code while calling this module? 1. resou...
Terraform modulesModule input variablesResource configurationHardcoded values - Question #203Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Mary has created a database instance in AWS and for ease of use is outputting the value of the database password with the following code: 1. output "db_password" 2. { 3. value = lo...
Terraform outputsSensitive data handlingCLI displayOutput configuration - Question #204Read, generate, and modify configuration
Every region in AWS has a different AMI ID for Linux and these are keep on changing. What is the best approach to create the EC2 instances that can deal with different AMI IDs base...
Data SourcesAWS AMIDynamic ConfigurationRead External Data - Question #205Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Forcing the recreation of a resource is useful when you want a certain side effect of recreation that is not visible in the attributes of a resource. What command will do this?
terraform taintresource recreationCLI commandsresource lifecycle - Question #206Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What happens when a terraform apply command is executed?
terraform applyinfrastructure deploymentdesired stateTerraform CLI - Question #207Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the below command will upgrade the provider version to the latest acceptable one?
Terraform CLIProvider managementterraform initUpgrade providers - Question #208Implement and maintain state
Your manager has instructed you to start using terraform for the entire infra provisioning of the application stack. There are 4 environments ?DEV , QA , UAT , and PROD. The applic...
Multi-environment deploymentTerraform code structureState managementBackend configuration - Question #210Read, generate, and modify configuration
Which of the below options is the equivalent Terraform 0.12 version of the snippet which is written in Terraform 0.11? "${var.instance_id}"
Terraform 0.12HCL SyntaxVariablesInterpolation - Question #211Implement and maintain state
You have created two workspaces PROD and DEV. You have switched to DEV and provisioned DEV infrastructure from this workspace. Where is your state file stored?
Terraform WorkspacesState ManagementLocal StateTerraform CLI - Question #212Understand Terraform basics
Multiple configurations for the same provider can be used in a single configuration file.
Provider configurationProvider aliasingMultiple provider instancesTerraform providers - Question #213Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Taint the resource "aws_instance" "baz" resource that lives in module bar which lives in module foo.
terraform taintresource addressingnested modulesCLI commands - Question #214Implement and maintain state
The terraform state command can be used to ____
Terraform state managementCLI commandsState manipulationAdvanced state operations - Question #215Implement and maintain state
Command terraform refresh will update state file?
terraform refreshstate filestate managementCLI commands - Question #216Implement and maintain state
State locking does not happen automatically and must be specified at run
State lockingTerraform stateConcurrencyBackend configuration - Question #217Read, generate, and modify configuration
Which of the below options is a valid interpolation syntax for retrieving a data source?
InterpolationData SourcesConfiguration SyntaxReferencing Objects - Question #218Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Jim has created several AWS resources from a single terraform configuration file. Someone from his team has manually modified one of the EC2 instance. Now to discard the manual cha...
Terraform CLIterraform taintResource lifecycleDiscarding manual changes - Question #219Read, generate, and modify configuration
Which flag would be used within a Terraform configuration block to identify the specific version of a provider required?
Provider configurationVersion constraintsConfiguration blocks - Question #220Understand Terraform basics
Terraform-specific settings and behaviors are declared in which configuration block type?
Terraform configurationterraform blockConfiguration languageCore settings - Question #221Implement and maintain state
Which of the following state management command allow you to retrieve a list of resources that are part of the state file?
terraform statestate managementCLI commandsresource listing - Question #222Implement and maintain state
If you delete a remote backend from the configuration, will you need to rebuild your state files locally?
Terraform StateRemote BackendState ManagementBackend Configuration - Question #223Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
During a terraform apply, a resource is successfully created but eventually fails during provisioning. What happens to the resource?
terraform applyprovisionersresource lifecycleerror handling - Question #224Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the following Terraform commands will automatically refresh the state unless supplied with additional flags or arguments? Choose TWO correct answers.
Terraform CLIState managementterraform planterraform apply - Question #225Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
A user has created three workspaces using the command line -prod, dev, and test. The user wants to create a fourth workspace named stage. Which command will the user execute to acc...
Terraform CLIWorkspacesCommand syntaxterraform workspace new - Question #227Use Terraform Cloud and Terraform Enterprise capabilities
Which of the following allows Terraform users to apply policy as code to enforce standardized configurations for resources being deployed via infrastructure as code?
Policy as CodeSentinelComplianceTerraform Cloud - Question #228Use Terraform Cloud and Terraform Enterprise capabilities
In Terraform Enterprise, a workspace can be mapped to how many VCS repos?
Terraform EnterpriseWorkspacesVCS IntegrationRepository Mapping - Question #229Use Terraform Cloud and Terraform Enterprise capabilities
Terraform Enterprise currently supports running under which the following operating systems?
Terraform EnterpriseOperating SystemsPlatform SupportInstallation Requirements - Question #230Implement and maintain state
Complete the following sentence: For local state, the workspaces are stored directly in a ___________.
Terraform stateLocal workspacesState file location - Question #231Implement and maintain state
You can migrate the Terraform backend but only if there are no resources currently being managed.
Terraform backendState migrationTerraform state - Question #232Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
After running into issues with Terraform, you need to enable verbose logging to assist with troubleshooting the error. Which of the following values provides the MOST verbose loggi...
Terraform CLILoggingTroubleshootingEnvironment Variables - Question #233Understand infrastructure as code (IaC) concepts
From the answers below, select the advantages of using Infrastructure as Code.
Infrastructure as CodeIaC benefitsCI/CDModularity - Question #234Implement and maintain state
What resource dependency information is stored in Terraform's state?
Terraform StateResource DependenciesImplicit DependenciesExplicit Dependencies - Question #235Read, generate, and modify configuration
Consider the following Terraform 0.12 configuration snippet: 1. variable "vpc_cidrs" { 2. type = map 3. default = { 4. us-east-1 = "10.0.0.0/16" 5. us-east-2 = "10.1.0.0/16" 6. us-...
Terraform variablesMap typeAccessing map elementsHCL syntax - Question #236Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Your organization has moved to AWS and has manually deployed infrastructure using the console. Recently, a decision has been made to standardize on Terraform for all deployments mo...
terraform importState managementExisting infrastructureTransition to IaC - Question #237Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the following actions are performed during a terraform init?
terraform initCLI commandsprovidersbackend - Question #238Implement and maintain state
What is a downside to using the Vault provider to read secrets from Vault?
Vault providerSecrets managementTerraform stateSecurity - Question #239Understand Terraform basics
Given the below resource configuration - resource "aws_instance" "web" { # ... count = 4 } What does the terraform resource address aws_instance.web refer to?
count meta-argumentresource addressingresource collectionTerraform language basics - Question #240Implement and maintain state
State is a requirement for Terraform to function
Terraform StateState ManagementCore ConceptsIaC Fundamentals - Question #241Implement and maintain state
You wanted to destroy some of the dependent resources from real infrastructure. You choose to delete those resources from your configuration file and run terraform plan and then ap...
Terraform StateResource DestructionDependency ResolutionConfiguration Management - Question #242Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Your developers are facing a lot of problem while writing complex expressions involving difficult interpolations . They have to run the terraform plan every time and check whether...
terraform consoledebuggingexpressionsCLI - Question #243Read, generate, and modify configuration
When writing Terraform code, HashiCorp recommends that you use how many spaces between each nesting level?
Terraform formattingCode styleIndentationBest practices - Question #244Interact with Terraform modules
When using parent/child modules to deploy infrastructure, how would you export a value from one module to import into another module. For example, a module dynamically deploys an a...
Terraform modulesModule outputsInter-module communicationData flow - Question #245Read, generate, and modify configuration
You have configured an Auto Scaling group in AWS to automatically scale the number of instances behind a load balancer based on the instances CPU utilization. The instances are con...
create_before_destroyresource lifecyclemeta-argumentsAWS Auto Scaling - Question #246Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have written a terraform IaC script which was working till yesterday , but is giving some vague error from today , which you are unable to understand . You want more detailed l...
Terraform loggingTroubleshootingEnvironment variablesTF_LOGTF_LOG_PATH - Question #247Understand Terraform basics
Given the Terraform configuration below, in which order will the resources be created? 1. resource "aws_instance" "web_server" 2. { 3. ami = "ami-b374d5a5" 4. instance_type = "t2.m...
Terraform dependenciesResource creation orderImplicit dependenciesDependency graph - Question #248Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
After executing a terraform apply, you notice that a resource has a tilde (~) next to it. What does this infer?
Terraform CLIResource lifecyclePlan output symbolsIn-place update - Question #249Understand Terraform basics
A single terraform resource file that defines an aws_instance resource can simple be renamed to azurerm_virtual_machine in order to switch cloud providers
Terraform resourcesCloud providersConfiguration syntaxProvider configuration - Question #250Implement and maintain state
A "backend" in Terraform determines how state is loaded and how an operation such as apply is executed. Which of the following is not a supported backend type?
Terraform backendsRemote stateState managementBackend configuration - Question #251Read, generate, and modify configuration
John is writing a module and within the module, there are multiple places where he has to use the same conditional expression but he wants to avoid repeating the same values or exp...
Local ValuesConfiguration ReuseDRY PrincipleModule Development - Question #252Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have created a custom variable definition file my_vars.tfvars. How will you use it for provisioning infrastructure?
terraform applyvariablestfvars filesCLI usage