TA-002-P Exam Questions
446 real TA-002-P exam questions with expert-verified answers and explanations. Page 4 of 9.
- Question #151Understand Terraform basics
Does not require GO language to be installed as a prerequisite and it does not require a Windows Server as well.
Terraform CLIInstallationPrerequisitesOperating Systems - Question #152Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have created 2 workspaces PROD and RQ
Terraform WorkspacesTerraform CLIInfrastructure Provisioning - Question #153Implement and maintain state
Refer to the below code where developer is outputting the value of the database password but has used sensitive parameter to hide the output value in the CLI. output "db_password"...
Terraform outputsSensitive dataState fileSecurity - Question #154Interact with Terraform modules
While using generic git repository as a module source, which of the below options allows terraform to select a specific version or tag instead of selecting the HEAD.
Terraform modulesModule sourcesGit modulesModule versioning - Question #155Understand the purpose of Terraform (vs. other IaC)
In regards to deploying resources in multi-cloud environments, what are some of the benefits of using Terraform rather than a provider's native tooling? (select three)
multi-cloud deploymentTerraform benefitsIaC comparisoncross-cloud management - Question #156Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Matt wants to import a manually created EC2 instance into terraform so that he can manage the EC2 instance through terraform going forward. He has written the configuration file of...
Terraform importTerraform CLIState managementAWS EC2 - Question #157Read, generate, and modify configuration
John wants to use two different regions to deploy two different EC2 instances. He has specified two provider blocks in his providers.tf file. provider "aws" { region = "us-east-1"...
ProvidersAliasesProvider configurationMulti-region - Question #158Understand Terraform basics
How does Terraform handle working with so many providers?
Terraform ProvidersPlugin ArchitectureProvider Installation - Question #159Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What is the standard workflow that a developer follows while working with terraform open source version?
Terraform workflowTerraform CLIterraform planDeveloper workflow - Question #160Implement and maintain state
You are using a terraform operation that writes state. Unfortunately automatic state unlocking has failed for that operation. Which of the below commands can be used to remove the...
Terraform CLIState managementState lockingTroubleshooting - Question #161Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Ric wants to enable detail logging and he wants highest verbosity of logs. Which of the following environment variable settings is correct option for him to select.
Terraform CLILoggingEnvironment variablesTroubleshooting - Question #162Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
The canonical format may change in minor ways between Terraform versions, so after upgrading Terraform it is recommended to proactively run.
terraform fmtCLI commandsConfiguration formattingTerraform upgrades - Question #163Implement and maintain state
What does terraform refresh command do?
terraform refreshstate filereal world infrastructureTerraform CLI - Question #164Understand Terraform basics
Which of the following is the right substitute for static values that can make Terraform configuration file more dynamic and reusable?
VariablesInput ParametersDynamic ConfigurationReusability - Question #165Read, generate, and modify configuration
1. resource "aws_s3_bucket" "example" { 2. bucket = "my-test-s3-terraform-bucket" 3. ...} resource "aws_iam_role" "test_role" { 4. name = "test_role" 5. ...} Due to the way that th...
Terraform dependenciesExplicit dependenciesResource orderingdepends_on - Question #166Implement and maintain state
Which of the below commands will rename a EC2 instance without destroying and recreating it?
Terraform CLIState ManagementResource Refactoringterraform state mv - Question #167Use Terraform Cloud and Terraform Enterprise capabilities
You want terraform plan and terraform apply to be executed in Terraform Cloud's run environment but the output is to be streamed locally. Which one of the below you will choose?
Terraform CloudRemote BackendRemote OperationsLocal CLI Streaming - Question #168Understand Terraform basics
A single terraform resource file that defines an aws_instance resource can simply be renamed to vsphere_virtual_machine in order to switch cloud providers.
Terraform resourcesCloud providersProvider configurationHCL syntax - Question #169Read, generate, and modify configuration
A data block requests that Terraform read from a given data source and export the result under the given local name.
data blockdata sourcesconfigurationexternal data - Question #170Implement and maintain state
You have multiple developers working on a terraform project (using terraform OSS), and have saved the terraform state in a remote S3 bucket . However ,team is intermittently experi...
Terraform stateRemote stateState lockingS3 backend - Question #171Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have created an AWS EC2 instance of type t2.micro through your terraform configuration file ec2.tf . Now you want to change the instance type from t2.micro to t2.medium. Accord...
Terraform CLIterraform applyState managementDrift detection - Question #172Understand Terraform basics
Which of the below datatype is not supported by Terraform.
Terraform data typesHCLConfiguration language - Question #173Read, generate, and modify configuration
Which of the following value will be accepted for var1? variable "var1" { type = string }
Terraform variablesType coercionString typeHCL data types - Question #174Implement and maintain state
When multiple engineers start deploying infrastructure using the same state file, what is a feature of remote state storage that is critical to ensure the state doesn't become corr...
Remote StateState LockingCollaborative TerraformState Management - Question #175Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Once a resource is marked as tainted, the next plan will show that the resource will be _________ and ___________ and the next apply will implement this change.
Terraform TaintResource LifecycleTerraform PlanTerraform Apply - Question #176Understand Terraform basics
Multiple providers can be declared within a single Terraform configuration file.
Terraform providersProvider configurationConfiguration structureMultiple providers - Question #177Read, generate, and modify configuration
Hanah is writing a terraform configuration with nested modules, there are multiple places where she has to use the same conditional expression but she wants to avoid repeating the...
Local ValuesCode ReusabilityTerraform LanguageConfiguration Best Practices - Question #178Read, generate, and modify configuration
Why is it a good idea to declare the required version of a provider in a Terraform configuration file? 1. terraform 2. { 3. required_providers 4. { 5. aws = "~> 1.0" 6. } 7. }
Provider VersioningRequired ProvidersDependency ManagementConfiguration Best Practices - Question #179Implement and maintain state
In regards to Terraform state file, select all the statements below which are correct?
Terraform stateState securitySensitive dataTerraform Cloud - Question #180Implement and maintain state
Your manager has instructed you to start using terraform for your day-to-day operations, but your security team is concerned about the terraform state files. They have heard it con...
Terraform stateState securityRemote backendBest practices - Question #181Read, generate, and modify configuration
You have created a terraform script that uses a lot of new constructs that have been introduced in terraform v0.12. However, many developers who are cloning the script from your gi...
Terraform versioningrequired_versionConfiguration managementCompatibility - Question #182Use Terraform Cloud and Terraform Enterprise capabilities
Your company has been using Terraform Cloud for a some time now . But every team is creating their own modules , and there is no standardization of the modules , with each team cre...
Terraform CloudPrivate Module RegistryModule StandardizationEnterprise Best Practices - Question #183Read, generate, and modify configuration
Refer below code where pessimistic constraint operator has been used to specify a version of a provider. terraform { required_providers { aws = "~> 1.1.0" }} Which of the following...
provider versionsversion constraintspessimistic constraint operatorrequired_providers - Question #184Read, generate, and modify configuration
By default, provisioners that fail will also cause the Terraform apply itself to error. How can you change this default behavior within a provisioner?
ProvisionersError HandlingConfiguration Syntax - Question #185Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have a Terraform configuration file where a variable itemNum is defined as follows: variable "itemNum" { default = 3} You also have a defined the following environment variable...
Terraform variablesVariable precedenceCLI argumentsEnvironment variables - Question #186Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have provisioned some aws resources in your test environment through Terraform for a POC work. After the POC, now you want to destroy the resources but before destroying them y...
Terraform CLIDestroy resourcesPlan changesPreview changes - Question #187Understand the purpose of Terraform (vs. other IaC)
Which of the following challenges would Terraform be a candidate for solving? (Select THREE)
Terraform use casesInfrastructure as Code benefitsMulti-cloud managementSelf-service infrastructure - Question #188Understand Terraform basics
Which of the following variable definition files will terraform load automatically?
Terraform VariablesVariable FilesAutomatic LoadingConfiguration Loading - Question #189Implement and maintain state
When using Terraform in a team it is important for everyone to be working with the same state so that operations will be applied to the same remote objects. Which of the below opti...
Terraform stateRemote stateTeam collaborationState management - Question #190Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the below features of Terraform can be used for managing small differences between different environments which can act more like completely separate working directories.
Terraform WorkspacesMulti-environmentState isolation - Question #191Understand Terraform basics
Refer to the following terraform variable definition: variable "track_tag" { type = list default = ["data_ec2","integration_ec2","digital_ec2"]} track_tag = { Name = element(var.tr...
Terraform variablesList data typeelement() functioncount.index - Question #192Interact with Terraform modules
You are reviewing Terraform configurations for a big project in your company. You noticed that there are several identical sets of resources that appear in multiple configurations....
Terraform modulesConfiguration reuseDRY principle - Question #193Use Terraform Cloud and Terraform Enterprise capabilities
The Security Operations team of ABC Enterprise wants to mandate that all the Terraform configuration that creates an S3 bucket must have encryption feature enabled. What is the bes...
Sentinel PoliciesPolicy as CodeTerraform Cloud/EnterpriseSecurity Enforcement - Question #194Interact with Terraform modules
A colleague has informed you that a new version of a Terraform module that your team hosts on an Amazon S3 bucket is broken. The Amazon S3 bucket has versioning enabled. Your colle...
Terraform modulesS3 module sourceS3 versioningModule rollback - Question #195Read, generate, and modify configuration
Which of the following are string functions? Select three
HCL functionsString functionsBuilt-in functionsConfiguration language - Question #196Implement and maintain state
What kind of resource dependency is stored in terraform.tfstate file?
Terraform state fileResource dependenciesImplicit dependenciesExplicit dependencies - Question #197Use Terraform Cloud and Terraform Enterprise capabilities
Terraform Cloud always encrypts state at rest and protects it with TLS in transit. Terraform Cloud also knows the identity of the user requesting state and maintains a history of s...
Terraform CloudState securityState encryptionState history - Question #198Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You have already set TF_LOG = DEBUG to enable debug log. Now you want to always write the log to the directory you're currently running terraform from. what should you do to achiev...
Terraform loggingDebug loggingEnvironment variablesTerraform CLI - Question #199Read, generate, and modify configuration
You have been given requirements to create a security group for a new application. Since your organization standardizes on Terraform, you want to add this new security group with t...
dynamic blocksresource configurationHCL featuresiteration - Question #200Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
After creating a new workspace "PROD" you need to run the command terraform select PROD to switch to it.
Terraform workspacesCLI commandsterraform workspace newterraform select