TA-002-P Exam Questions
446 real TA-002-P exam questions with expert-verified answers and explanations. Page 8 of 9.
- Question #354Implement and maintain state
You want to share Terraform state with your team, store it securely and provide state locking. How would you do this? Choose three correct answers.
Terraform state managementRemote backendsState lockingTeam collaboration - Question #355Interact with Terraform modules
All modules published on the official Terraform Module Registry have been verified by HashiCorp.
Terraform ModulesModule RegistryModule Verification - Question #356Implement and maintain state
You have modified your Terraform configuration to fix a typo in the Terraform ID of a resource from aws_security_group.http to aws_security_group.http Which of the following comman...
Terraform stateterraform mvResource renamingCLI commands - Question #357Implement and maintain state
You have decided to create a new Terraform workspace to deploy a development environment. What is different about this workspace?
Terraform workspacesState managementEnvironment isolation - Question #358Read, generate, and modify configuration
How would you reference the attribute "name* of this fictitious resource in HCL?
HCL syntaxResource referencingAttributes - Question #359Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the following can you do with terraform plan? Choose two correct answers.
terraform planexecution planCLI usageplanning infrastructure - Question #360Read, generate, and modify configuration
What does this code do?
Terraform providersVersion constraintsProvider versioning - Question #361Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
If a Terraform creation-time provisioner fails, what will occur by default?
provisionerserror handlingresource lifecycletaint - Question #362Read, generate, and modify configuration
Which Terraform collection type should you use to store key/value pairs?
Terraform data typesCollection typesMapsConfiguration syntax - Question #363Interact 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 th...
Terraform modulesModule outputsReferencing outputsTerraform syntax - Question #364Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What is the purpose of a Terraform workspace in either open source of enterprise?
Terraform WorkspacesState ManagementEnvironment IsolationCLI Command - Question #365Read, generate, and modify configuration
How would you be able to reference an attribute from the vsphere_datacenter data source for use with the argument within the vsprere_folder resource in the following configuration?
Terraform syntaxData sourcesAttribute referencing - Question #366Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called\ You immediately run terraform apply but don't see any cha...
Terraform state managementTerraform backendsterraform initState migration - Question #367Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
terraform init retrieves the source code tot all referenced modules
terraform initmodulesdependenciesCLI - Question #368Understand Terraform basics
Terraform configuration (including any module references) can contain only one Terraform provider type.
ProvidersConfigurationMultiple ProvidersModules - Question #369Understand infrastructure as code (IaC) concepts
Why should secrets not be hard coded into Terraform code? Choose two correct answers
Secrets managementSecurity best practicesVersion controlHardcoding - Question #370Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
A Terraform output that sets the ''sensitive'' argument to true will not store that value in the state file.
Terraform outputsSensitive dataState fileCLI behavior - Question #371Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
terraform destroy is the only way to remove infrastructure.
terraform destroyinfrastructure removalresource lifecycleterraform apply - Question #372Implement and maintain state
Using the terraform state rm command against a resource will destroy it.
terraform statestate managementterraform CLIresource lifecycle - Question #373Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the following is not a way to trigger terraform destroy ?
terraform destroyterraform CLIresource lifecycleauto-approve - Question #374Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
terraform validate reports HCL syntax errors.
terraform validateHCL syntaxCLI commandsconfiguration validation - Question #375Read, generate, and modify configuration
You need to specify a dependency manually. What resource meta-parameter can you use lo make sure Terraform respects thee dependency? Type your answer in the field provided. The tex...
Terraform dependenciesresource meta-parameterdepends_onresource ordering - Question #376Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database. What is th...
Terraform CLIResource lifecycleterraform taintResource replacement - Question #377Read, generate, and modify configuration
What kind of configuration block will create an infrastructure object with settings specified in the block?
Terraform configurationResource blockHCLInfrastructure definition - Question #378Interact with Terraform modules
Module version is required to reference a module on the Terraform Module Registry.
Terraform ModulesModule RegistryModule VersioningModule Referencing - Question #379Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Which of the following does terraform apply change after you approve the execution plan? Choose two correct answers.
terraform applystate filecloud infrastructureexecution plan - Question #380Implement and maintain state
Choose the answer that correctly completes the sentence: _______backends support state locking.
Terraform backendsState lockingRemote state management - Question #381Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?
Terraform CLIterraform initPlugin updatesProvider management - Question #382Understand infrastructure as code (IaC) concepts
What advantage does an operations team that uses infrastructure as code have?
Infrastructure as Code (IaC)IaC benefitsConfiguration reuseOperations efficiency - Question #383Understand infrastructure as code (IaC) concepts
As a member of an operations team that uses infrastructure as code (laC) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which...
IaC best practicesVersion controlChange managementCode review - Question #384Interact with Terraform modules
Any user can publish modules to the public Terraform Module Registry.
Terraform Module RegistryModule publishingPublic modules - Question #385Understand Terraform basics
You're preparing to install Terraform on client workstations and want to see which operating systems are supported. Which of the following operating systems is supported?
Terraform installationSupported operating systemsSystem requirements - Question #386Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Jack is a newbieto Terraform and wants to enable detailed logging to find all the details. Which environment variable does he need to set?
Terraform loggingEnvironment variablesDebuggingTerraform CLI - Question #387Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
colleagues is new toTerraform and wants to add a new workspace named new-hire. What command he should execute from the following?
Terraform CLIWorkspacesCommand syntaxWorkspace creation - Question #388Implement and maintain state
Your firm employs a version control system (for example, git) and has requested that you commit all terraform code to it. During the commit, you must be cautious with sensitive inf...
Terraform stateSecurityVersion ControlSensitive Data - Question #389Read, generate, and modify configuration
Choose the best option from below to make Terraform code more user configuration-centric.
Input VariablesConfigurationParameterization - Question #390Read, generate, and modify configuration
Which of the following is a meta-argument defined in the configuration files of Terraform?
Terraform configurationMeta-argumentsDependenciesdepends_on - Question #391Implement and maintain state
Your configuration file has been locked accidentally. What of the following command would you use to unlock?
Terraform state managementState lockingTerraform CLI commandsterraform force-unlock - Question #392Read, generate, and modify configuration
Suppose terraformcode is taking up some values which are not defined inside the code files. In which of the following options issue might have occurred?
Terraform variablesVariable precedenceEnvironment variablesConfiguration input - Question #393Implement and maintain state
Which of the following is not supported backend types in Terra form?
Terraform backendsRemote stateState management - Question #394Implement and maintain state
Do terraform workspaces help in adding/allowing multiple state files for a single configuration?
Terraform WorkspacesTerraform StateMultiple StatesState Management - Question #395Understand Terraform basics
Resources in terraform can have same identifiers(Resource type + Block name).
Terraform resourcesResource identifiersConfiguration syntaxUniqueness - Question #396Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Terraform is currently being used by your organisation to create resources on AWS for the development of a web application. One of your coworkers wants to change the instance type...
Terraform variablesterraform.tfvarsterraform planterraform apply - Question #397Read, generate, and modify configuration
You can reference a resource created with for_each using a Splat (*) expression.
for_eachSplat expressionResource referencingCollection types - Question #398Understand infrastructure as code (IaC) concepts
How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? (Choose two.)
Manual ProvisioningScaling ChallengesIT BottlenecksTraditional IT processes - Question #399Interact with Terraform modules
Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example git::https://example.com/vpc.git)?
Terraform modulesGit module sourceModule versioningSource URL syntax - Question #400Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
What does terraform destroy do?
terraform destroyTerraform CLIinfrastructure managementstate file - Question #401Read, generate, and modify configuration
You're writing a Terraform configuration that needs to read input from a local file called id_rsa.pub. Which built-in Terraform function can you use to import the file's contents a...
Terraform functionsLocal file accessConfiguration syntax - Question #402Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
You need to migrate a workspace to use a remote backend. After updating your configuration, what command do you run to perform the migration? Type your answer in the field provided...
terraform initRemote BackendState ManagementTerraform CLI - Question #403Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
When should Terraform configuration files be written when running terraform import on existing infrastructure?
terraform importconfigurationCLIexisting infrastructure