SlideShare a Scribd company logo
1 of 7
Download to read offline
NO.1 What advantage does an operations team that uses infrastructure as code have?
A. The ability to autoscale a group of servers
B. The ability to reuse best practice configurations and settings
C. The ability to update existing infrastructure
D. The ability to delete infrastructure
Answer: B
NO.2 HashiCorp offers multiple versions of Terraform, including Terraform open-source, Terraform
Cloud, and Terraform Enterprise. Which of the following Terraform features are only available in the
Enterprise edition? (select four)
A. Private Module Registry
B. Audit Logs
C. Clustering
D. Sentinel
E. SAML/SSO
F. Private Network Connectivity
Answer: B,E,F
Explanation:
While there are a ton of features that are available to open source users, many features that are part
of the Enterprise offering are geared towards larger teams and enterprise functionality. To see what
specific features are part of Terraform Cloud and Terraform Enterprise, check out this link.
https://www.hashicorp.com/products/terraform/pricing/
NO.3 The following is a snippet from a Terraform configuration file:
Which, when validated, results in the following error:
Fill in the blank in the error message with the correct string from the list below.
A. label
B. multi
C. alias
D. version
Answer: C
Explanation:
https://www.terraform.io/docs/configuration/providers.html#alias-multiple-providerinstances
NO.4 Which feature of Terraform allows multiple state files for a single configuration file depending
upon the environment?
A. Terraform Modules
B. Terraform Remote Backends
C. Terraform Workspaces
D. Terraform Enterprise
Answer: C
NO.5 State is a requirement for Terraform to function
A. True
IT Certification Guaranteed, The Easy Way!
2
Free Exam/Cram Practice Materials - Best Exam Practice Materials
Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 1
https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
B. False
Answer: A
Explanation:
State is a necessary requirement for Terraform to function. It is often asked if it is possible for
Terraform to work without state, or for Terraform to not use state and just inspect cloud resources
on every run.
Purpose of Terraform State
State is a necessary requirement for Terraform to function. It is often asked if it is possible for
Terraform to work without state, or for Terraform to not use state and just inspect cloud resources
on every run. This page will help explain why Terraform state is required.
As you'll see from the reasons below, state is required. And in the scenarios where Terraform may be
able to get away without state, doing so would require shifting massive amounts of complexity from
one place (state) to another place (the replacement concept).
1. Mapping to the Real World
Terraform requires some sort of database to map Terraform config to the real world. When you have
a resource resource "aws_instance" "foo" in your configuration, Terraform uses this map to know
that instance i- abcd1234 is represented by that resource.
For some providers like AWS, Terraform could theoretically use something like AWS tags. Early
prototypes of Terraform actually had no state files and used this method. However, we quickly ran
into problems. The first major issue was a simple one: not all resources support tags, and not all
cloud providers support tags.
Therefore, for mapping configuration to resources in the real world, Terraform uses its own state
structure.
2. Metadata
Alongside the mappings between resources and remote objects, Terraform must also track metadata
such as resource dependencies.
Terraform typically uses the configuration to determine dependency order. However, when you
delete a resource from a Terraform configuration, Terraform must know how to delete that resource.
Terraform can see that a mapping exists for a resource not in your configuration and plan to destroy.
However, since the configuration no longer exists, the order cannot be determined from the
configuration alone.
To ensure correct operation, Terraform retains a copy of the most recent set of dependencies within
the state. Now Terraform can still determine the correct order for destruction from the state when
you delete one or more items from the configuration.
One way to avoid this would be for Terraform to know a required ordering between resource types.
For example, Terraform could know that servers must be deleted before the subnets they are a part
of. The complexity for this approach quickly explodes, however: in addition to Terraform having to
understand the ordering semantics of every resource for every cloud, Terraform must also
understand the ordering across providers.
Terraform also stores other metadata for similar reasons, such as a pointer to the provider
configuration that was most recently used with the resource in situations where multiple aliased
providers are present.
3. Performance
In addition to basic mapping, Terraform stores a cache of the attribute values for all resources in the
state. This is the most optional feature of Terraform state and is done only as a performance
improvement.
IT Certification Guaranteed, The Easy Way!
3
Free Exam/Cram Practice Materials - Best Exam Practice Materials
Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 2
https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
When running a terraform plan, Terraform must know the current state of resources in order to
effectively determine the changes that it needs to make to reach your desired configuration.
For small infrastructures, Terraform can query your providers and sync the latest attributes from all
your resources. This is the default behavior of Terraform: for every plan and apply, Terraform will
sync all resources in your state.
For larger infrastructures, querying every resource is too slow. Many cloud providers do not provide
APIs to query multiple resources at once, and the round trip time for each resource is hundreds of
milliseconds. On top of this, cloud providers almost always have API rate limiting so Terraform can
only request a certain number of resources in a period of time. Larger users of Terraform make heavy
use of the -refresh=false flag as well as the -target flag in order to work around this. In these
scenarios, the cached state is treated as the record of truth.
4. Syncing
In the default configuration, Terraform stores the state in a file in the current working directory
where Terraform was run. This is okay for getting started, but 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.
Remote state is the recommended solution to this problem. With a fully-featured state backend,
Terraform can use remote locking as a measure to avoid two or more different users accidentally
running Terraform at the same time, and thus ensure that each Terraform run begins with the most
recent updated state.
NO.6 What is the result of the following terraform function call?
A. goodbye
B. hello
C. what?
Answer: C
Explanation:
https://www.terraform.io/docs/configuration/functions/lookup.html
NO.7 Which of the below options is a valid interpolation syntax for retrieving a data source?
A. ${data.google_dns_keys.foo_dns_keys.key_signing_keys[0].ds_record}
B. ${aws_instance.web.id.data}
C. ${azurerm_resource_group.test.data}
D. ${google_storage_bucket.backend}
Answer: A
Explanation:
Data source attributes are interpolated with the general syntax data.TYPE.NAME.ATTRIBUTE. The
interpolation for a resource is the same but without the data. prefix (TYPE.NAME.ATTRIBUTE).
https://www.terraform.io/docs/configuration-0-11/interpolation.html#attributes-of-a-data-source
NO.8 Which argument(s) is (are) required when declaring a Terraform variable?
A. type
B. All of the above
C. default
D. description
IT Certification Guaranteed, The Easy Way!
4
Free Exam/Cram Practice Materials - Best Exam Practice Materials
Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 3
https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
E. None of the above
Answer: C
Explanation:
The variable declaration can also include a default argument.
NO.9 Using the terraform state rm command against a resource will destroy it.
A. False
B. True
Answer: A
NO.10 How would you reference the "name" value of the second instance of this fictitious resource?
A. aws_instance.web.*.name
B. element(aws_instance.web, 2)
C. aws_instance.web[2].name
D. aws_instance.web[1]
E. aws_instance.web[1].name
Answer: B
NO.11 Which of the following statements about local modules is incorrect:
A. Local modules support versions
B. Local modules are not cached by terraform init command
C. Local modules are sourced from a directory on disk
D. All of the above (all statements above are incorrect
E. None of the above (all statements above are correct)
Answer: A
NO.12 During a terraform plan, a resource is successfully created but eventually fails during
provisioning. What happens to the resource?
A. the resource is marked as tainted
B. it is automatically deleted
C. the terraform plan is rolled back and all provisioned resources are removed
D. Terraform attempts to provision the resource up to three times before exiting with an error
Answer: A
Explanation:
If a resource successfully creates but fails during provisioning, Terraform will error and mark the
resource as "tainted". A resource that is tainted has been physically created, but can't be considered
safe to use since provisioning failed. Terraform also does not automatically roll back and destroy the
IT Certification Guaranteed, The Easy Way!
5
Free Exam/Cram Practice Materials - Best Exam Practice Materials
Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 4
https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
resource during the apply when the failure happens, because that would go against the execution
plan: the execution plan would've said a resource will be created, but does not say it will ever be
deleted.
NO.13 In contrast to Terraform Open Source, when working with Terraform Enterprise and Cloud
Workspaces, conceptually you could think about them as completely separate working directories.
A. False
B. True
Answer: A
NO.14 You want to use different AMI images for different regions and for the purpose you have
defined following code block.
1. variable "images"
2. {
3. type = "map"
4.
5. default = {
6. us-east-1 = "image-1234"
7. us-west-2 = "image-4567"
8. us-west-1 = "image-4589"
9. }
10. }
What of the following approaches needs to be followed in order to select image-4589?
A. var.images["us-west-1"]
B. lookup(var.images["us-west-1"]
C. var.images[3]
D. var.images[2]
Answer: A
NO.15 True or False? terraform init cannot automatically download Community providers.
A. False
B. True
Answer: B
NO.16 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 experiencing
inconsistencies in the provisioned infrastructure / failure in the code . You have traced this problem
to simultaneous/concurrent runs of terraform apply command for 2/more developers . What can you
do to fix this problem?
A. Structure your team in such a way that only one individual will run terraform apply , everyone will
just make changes and share with him. Then there will be no chance of any inconsistencies.
B. Enable terraform state locking for the S3 backend using DynamoDB table. This prevents others
from acquiring the lock and potentially corrupting your state.
C. Use terraform workspaces feature, this will fix this problem by default , as every developer will
have their own state file , and terraform will merge them on server side on its own.
IT Certification Guaranteed, The Easy Way!
6
Free Exam/Cram Practice Materials - Best Exam Practice Materials
Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 5
https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
D. Stop using remote state , and store the developer tfstate in their own machine . Once a day , all
developers should sit together and merge the state files manually , to avoid any inconsistencies.
Answer: B
Explanation:
S3 backend support state locking using DynamoDB.
https://www.terraform.io/docs/state/locking.html
NO.17 terraform refresh command will not modify infrastructure, but does modify the state file.
A. False
B. True
Answer: B
Explanation:
The terraform refresh command is used to reconcile the state Terraform knows about (via its state
file) with the real-world infrastructure. This can be used to detect any drift from the last-known state,
and to update the state file. This does not modify infrastructure, but does modify the state file.
https://www.terraform.io/docs/commands/refresh.html
NO.18 Terraform-specific settings and behaviors are declared in which configuration block type?
A. resource
B. provider
C. terraform
D. data
Answer: C
Explanation:
The special terraform configuration block type is used to configure some behaviors of Terraform
itself, such as requiring a minimum Terraform version to apply your configuration.
Example
terraform {
required_version = "> 0.12.0"
}
https://www.terraform.io/docs/configuration/terraform.html
NO.19 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 HCL (HashiCorp Configuration Language) code according to standard
Terraform style convention?
A. Run the terraform fmt command during the code linting phase of your CI/CD process
B. Designate one person in each team to review and format everyone's code
C. Write a shell script to transform Terraform files using tools such as AWK, Python, and sed
D. Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file
(*.tf)
Answer: D
Explanation:
Indent two spaces for each nesting level.
When multiple arguments with single-line values appear on consecutive lines at the same nesting
IT Certification Guaranteed, The Easy Way!
7
Free Exam/Cram Practice Materials - Best Exam Practice Materials
Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 6
https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
level, align their equals signs.
NO.20 You want terraform plan and 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?
A. Terraform Backends
B. This can be done using any of the local or remote backends
C. Local Backends
D. Remote Backends
Answer: D
Explanation:
The remote backend stores Terraform state and may be used to run operations in Terraform Cloud.
When using full remote operations, operations like terraform plan or terraform apply can be
executed in Terraform Cloud's run environment, with log output streaming to the local terminal.
Remote plans and applies use variable values from the associated Terraform Cloud workspace.
https://www.terraform.io/docs/backends/types/remote.html
IT Certification Guaranteed, The Easy Way!
8
Free Exam/Cram Practice Materials - Best Exam Practice Materials
Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 7
https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html

More Related Content

Similar to TA-002-P.pdf

Deploy resources on Azure using IaC (Azure Terraform)
Deploy  resources on Azure using IaC (Azure Terraform)Deploy  resources on Azure using IaC (Azure Terraform)
Deploy resources on Azure using IaC (Azure Terraform)George Grammatikos
 
Terraform Definition, Working and Challenges it Overcomes
Terraform Definition, Working and Challenges it OvercomesTerraform Definition, Working and Challenges it Overcomes
Terraform Definition, Working and Challenges it OvercomesEyeglass Repair USA
 
DevOps Online Training | DevOps Training
DevOps Online Training | DevOps TrainingDevOps Online Training | DevOps Training
DevOps Online Training | DevOps TrainingVisualpath Training
 
RIMA-Infrastructure as a code with Terraform.pptx
RIMA-Infrastructure as a code with Terraform.pptxRIMA-Infrastructure as a code with Terraform.pptx
RIMA-Infrastructure as a code with Terraform.pptxMrJustbis
 
Misadventures With Terraform
Misadventures With TerraformMisadventures With Terraform
Misadventures With TerraformMatt Revell
 
Infrastructure as Code with Terraform.pptx
Infrastructure as Code with Terraform.pptxInfrastructure as Code with Terraform.pptx
Infrastructure as Code with Terraform.pptxSamuel862293
 
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptxLinode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptxAkwasiBoateng6
 
MongoDB Replication and Sharding
MongoDB Replication and ShardingMongoDB Replication and Sharding
MongoDB Replication and ShardingTharun Srinivasa
 
Terraform at Scale - All Day DevOps 2017
Terraform at Scale - All Day DevOps 2017Terraform at Scale - All Day DevOps 2017
Terraform at Scale - All Day DevOps 2017Jonathon Brouse
 
Debasihish da final.ppt
Debasihish da final.pptDebasihish da final.ppt
Debasihish da final.pptKalkey
 
Best practices for Terraform with Vault
Best practices for Terraform with VaultBest practices for Terraform with Vault
Best practices for Terraform with VaultMitchell Pronschinske
 
"Petascale Genomics with Spark", Sean Owen,Director of Data Science at Cloudera
"Petascale Genomics with Spark", Sean Owen,Director of Data Science at Cloudera"Petascale Genomics with Spark", Sean Owen,Director of Data Science at Cloudera
"Petascale Genomics with Spark", Sean Owen,Director of Data Science at ClouderaDataconomy Media
 
Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?Katherine Golovinova
 
Collaborative Terraform with Atlantis
Collaborative Terraform with AtlantisCollaborative Terraform with Atlantis
Collaborative Terraform with AtlantisFerenc Kovács
 
Managing AWS Using Terraform AWS Atlanta 2018-07-18
Managing AWS Using Terraform AWS Atlanta 2018-07-18Managing AWS Using Terraform AWS Atlanta 2018-07-18
Managing AWS Using Terraform AWS Atlanta 2018-07-18Derek Ashmore
 
Configuration management II - Terraform
Configuration management II - TerraformConfiguration management II - Terraform
Configuration management II - TerraformXavier Serrat Bordas
 

Similar to TA-002-P.pdf (20)

Deploy resources on Azure using IaC (Azure Terraform)
Deploy  resources on Azure using IaC (Azure Terraform)Deploy  resources on Azure using IaC (Azure Terraform)
Deploy resources on Azure using IaC (Azure Terraform)
 
Terraform Definition, Working and Challenges it Overcomes
Terraform Definition, Working and Challenges it OvercomesTerraform Definition, Working and Challenges it Overcomes
Terraform Definition, Working and Challenges it Overcomes
 
DevOps Online Training | DevOps Training
DevOps Online Training | DevOps TrainingDevOps Online Training | DevOps Training
DevOps Online Training | DevOps Training
 
RIMA-Infrastructure as a code with Terraform.pptx
RIMA-Infrastructure as a code with Terraform.pptxRIMA-Infrastructure as a code with Terraform.pptx
RIMA-Infrastructure as a code with Terraform.pptx
 
Misadventures With Terraform
Misadventures With TerraformMisadventures With Terraform
Misadventures With Terraform
 
Infrastructure as Code with Terraform.pptx
Infrastructure as Code with Terraform.pptxInfrastructure as Code with Terraform.pptx
Infrastructure as Code with Terraform.pptx
 
Terraform
TerraformTerraform
Terraform
 
Introduce to Terraform
Introduce to TerraformIntroduce to Terraform
Introduce to Terraform
 
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptxLinode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
 
MongoDB Replication and Sharding
MongoDB Replication and ShardingMongoDB Replication and Sharding
MongoDB Replication and Sharding
 
Terraform at Scale - All Day DevOps 2017
Terraform at Scale - All Day DevOps 2017Terraform at Scale - All Day DevOps 2017
Terraform at Scale - All Day DevOps 2017
 
Terraform tfstate
Terraform tfstateTerraform tfstate
Terraform tfstate
 
Debasihish da final.ppt
Debasihish da final.pptDebasihish da final.ppt
Debasihish da final.ppt
 
Best practices for Terraform with Vault
Best practices for Terraform with VaultBest practices for Terraform with Vault
Best practices for Terraform with Vault
 
Terraform Basics
Terraform BasicsTerraform Basics
Terraform Basics
 
"Petascale Genomics with Spark", Sean Owen,Director of Data Science at Cloudera
"Petascale Genomics with Spark", Sean Owen,Director of Data Science at Cloudera"Petascale Genomics with Spark", Sean Owen,Director of Data Science at Cloudera
"Petascale Genomics with Spark", Sean Owen,Director of Data Science at Cloudera
 
Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?
 
Collaborative Terraform with Atlantis
Collaborative Terraform with AtlantisCollaborative Terraform with Atlantis
Collaborative Terraform with Atlantis
 
Managing AWS Using Terraform AWS Atlanta 2018-07-18
Managing AWS Using Terraform AWS Atlanta 2018-07-18Managing AWS Using Terraform AWS Atlanta 2018-07-18
Managing AWS Using Terraform AWS Atlanta 2018-07-18
 
Configuration management II - Terraform
Configuration management II - TerraformConfiguration management II - Terraform
Configuration management II - Terraform
 

Recently uploaded

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Recently uploaded (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

TA-002-P.pdf

  • 1. NO.1 What advantage does an operations team that uses infrastructure as code have? A. The ability to autoscale a group of servers B. The ability to reuse best practice configurations and settings C. The ability to update existing infrastructure D. The ability to delete infrastructure Answer: B NO.2 HashiCorp offers multiple versions of Terraform, including Terraform open-source, Terraform Cloud, and Terraform Enterprise. Which of the following Terraform features are only available in the Enterprise edition? (select four) A. Private Module Registry B. Audit Logs C. Clustering D. Sentinel E. SAML/SSO F. Private Network Connectivity Answer: B,E,F Explanation: While there are a ton of features that are available to open source users, many features that are part of the Enterprise offering are geared towards larger teams and enterprise functionality. To see what specific features are part of Terraform Cloud and Terraform Enterprise, check out this link. https://www.hashicorp.com/products/terraform/pricing/ NO.3 The following is a snippet from a Terraform configuration file: Which, when validated, results in the following error: Fill in the blank in the error message with the correct string from the list below. A. label B. multi C. alias D. version Answer: C Explanation: https://www.terraform.io/docs/configuration/providers.html#alias-multiple-providerinstances NO.4 Which feature of Terraform allows multiple state files for a single configuration file depending upon the environment? A. Terraform Modules B. Terraform Remote Backends C. Terraform Workspaces D. Terraform Enterprise Answer: C NO.5 State is a requirement for Terraform to function A. True IT Certification Guaranteed, The Easy Way! 2 Free Exam/Cram Practice Materials - Best Exam Practice Materials Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 1 https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
  • 2. B. False Answer: A Explanation: State is a necessary requirement for Terraform to function. It is often asked if it is possible for Terraform to work without state, or for Terraform to not use state and just inspect cloud resources on every run. Purpose of Terraform State State is a necessary requirement for Terraform to function. It is often asked if it is possible for Terraform to work without state, or for Terraform to not use state and just inspect cloud resources on every run. This page will help explain why Terraform state is required. As you'll see from the reasons below, state is required. And in the scenarios where Terraform may be able to get away without state, doing so would require shifting massive amounts of complexity from one place (state) to another place (the replacement concept). 1. Mapping to the Real World Terraform requires some sort of database to map Terraform config to the real world. When you have a resource resource "aws_instance" "foo" in your configuration, Terraform uses this map to know that instance i- abcd1234 is represented by that resource. For some providers like AWS, Terraform could theoretically use something like AWS tags. Early prototypes of Terraform actually had no state files and used this method. However, we quickly ran into problems. The first major issue was a simple one: not all resources support tags, and not all cloud providers support tags. Therefore, for mapping configuration to resources in the real world, Terraform uses its own state structure. 2. Metadata Alongside the mappings between resources and remote objects, Terraform must also track metadata such as resource dependencies. Terraform typically uses the configuration to determine dependency order. However, when you delete a resource from a Terraform configuration, Terraform must know how to delete that resource. Terraform can see that a mapping exists for a resource not in your configuration and plan to destroy. However, since the configuration no longer exists, the order cannot be determined from the configuration alone. To ensure correct operation, Terraform retains a copy of the most recent set of dependencies within the state. Now Terraform can still determine the correct order for destruction from the state when you delete one or more items from the configuration. One way to avoid this would be for Terraform to know a required ordering between resource types. For example, Terraform could know that servers must be deleted before the subnets they are a part of. The complexity for this approach quickly explodes, however: in addition to Terraform having to understand the ordering semantics of every resource for every cloud, Terraform must also understand the ordering across providers. Terraform also stores other metadata for similar reasons, such as a pointer to the provider configuration that was most recently used with the resource in situations where multiple aliased providers are present. 3. Performance In addition to basic mapping, Terraform stores a cache of the attribute values for all resources in the state. This is the most optional feature of Terraform state and is done only as a performance improvement. IT Certification Guaranteed, The Easy Way! 3 Free Exam/Cram Practice Materials - Best Exam Practice Materials Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 2 https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
  • 3. When running a terraform plan, Terraform must know the current state of resources in order to effectively determine the changes that it needs to make to reach your desired configuration. For small infrastructures, Terraform can query your providers and sync the latest attributes from all your resources. This is the default behavior of Terraform: for every plan and apply, Terraform will sync all resources in your state. For larger infrastructures, querying every resource is too slow. Many cloud providers do not provide APIs to query multiple resources at once, and the round trip time for each resource is hundreds of milliseconds. On top of this, cloud providers almost always have API rate limiting so Terraform can only request a certain number of resources in a period of time. Larger users of Terraform make heavy use of the -refresh=false flag as well as the -target flag in order to work around this. In these scenarios, the cached state is treated as the record of truth. 4. Syncing In the default configuration, Terraform stores the state in a file in the current working directory where Terraform was run. This is okay for getting started, but 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. Remote state is the recommended solution to this problem. With a fully-featured state backend, Terraform can use remote locking as a measure to avoid two or more different users accidentally running Terraform at the same time, and thus ensure that each Terraform run begins with the most recent updated state. NO.6 What is the result of the following terraform function call? A. goodbye B. hello C. what? Answer: C Explanation: https://www.terraform.io/docs/configuration/functions/lookup.html NO.7 Which of the below options is a valid interpolation syntax for retrieving a data source? A. ${data.google_dns_keys.foo_dns_keys.key_signing_keys[0].ds_record} B. ${aws_instance.web.id.data} C. ${azurerm_resource_group.test.data} D. ${google_storage_bucket.backend} Answer: A Explanation: Data source attributes are interpolated with the general syntax data.TYPE.NAME.ATTRIBUTE. The interpolation for a resource is the same but without the data. prefix (TYPE.NAME.ATTRIBUTE). https://www.terraform.io/docs/configuration-0-11/interpolation.html#attributes-of-a-data-source NO.8 Which argument(s) is (are) required when declaring a Terraform variable? A. type B. All of the above C. default D. description IT Certification Guaranteed, The Easy Way! 4 Free Exam/Cram Practice Materials - Best Exam Practice Materials Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 3 https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
  • 4. E. None of the above Answer: C Explanation: The variable declaration can also include a default argument. NO.9 Using the terraform state rm command against a resource will destroy it. A. False B. True Answer: A NO.10 How would you reference the "name" value of the second instance of this fictitious resource? A. aws_instance.web.*.name B. element(aws_instance.web, 2) C. aws_instance.web[2].name D. aws_instance.web[1] E. aws_instance.web[1].name Answer: B NO.11 Which of the following statements about local modules is incorrect: A. Local modules support versions B. Local modules are not cached by terraform init command C. Local modules are sourced from a directory on disk D. All of the above (all statements above are incorrect E. None of the above (all statements above are correct) Answer: A NO.12 During a terraform plan, a resource is successfully created but eventually fails during provisioning. What happens to the resource? A. the resource is marked as tainted B. it is automatically deleted C. the terraform plan is rolled back and all provisioned resources are removed D. Terraform attempts to provision the resource up to three times before exiting with an error Answer: A Explanation: If a resource successfully creates but fails during provisioning, Terraform will error and mark the resource as "tainted". A resource that is tainted has been physically created, but can't be considered safe to use since provisioning failed. Terraform also does not automatically roll back and destroy the IT Certification Guaranteed, The Easy Way! 5 Free Exam/Cram Practice Materials - Best Exam Practice Materials Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 4 https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
  • 5. resource during the apply when the failure happens, because that would go against the execution plan: the execution plan would've said a resource will be created, but does not say it will ever be deleted. NO.13 In contrast to Terraform Open Source, when working with Terraform Enterprise and Cloud Workspaces, conceptually you could think about them as completely separate working directories. A. False B. True Answer: A NO.14 You want to use different AMI images for different regions and for the purpose you have defined following code block. 1. variable "images" 2. { 3. type = "map" 4. 5. default = { 6. us-east-1 = "image-1234" 7. us-west-2 = "image-4567" 8. us-west-1 = "image-4589" 9. } 10. } What of the following approaches needs to be followed in order to select image-4589? A. var.images["us-west-1"] B. lookup(var.images["us-west-1"] C. var.images[3] D. var.images[2] Answer: A NO.15 True or False? terraform init cannot automatically download Community providers. A. False B. True Answer: B NO.16 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 experiencing inconsistencies in the provisioned infrastructure / failure in the code . You have traced this problem to simultaneous/concurrent runs of terraform apply command for 2/more developers . What can you do to fix this problem? A. Structure your team in such a way that only one individual will run terraform apply , everyone will just make changes and share with him. Then there will be no chance of any inconsistencies. B. Enable terraform state locking for the S3 backend using DynamoDB table. This prevents others from acquiring the lock and potentially corrupting your state. C. Use terraform workspaces feature, this will fix this problem by default , as every developer will have their own state file , and terraform will merge them on server side on its own. IT Certification Guaranteed, The Easy Way! 6 Free Exam/Cram Practice Materials - Best Exam Practice Materials Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 5 https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
  • 6. D. Stop using remote state , and store the developer tfstate in their own machine . Once a day , all developers should sit together and merge the state files manually , to avoid any inconsistencies. Answer: B Explanation: S3 backend support state locking using DynamoDB. https://www.terraform.io/docs/state/locking.html NO.17 terraform refresh command will not modify infrastructure, but does modify the state file. A. False B. True Answer: B Explanation: The terraform refresh command is used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure. This can be used to detect any drift from the last-known state, and to update the state file. This does not modify infrastructure, but does modify the state file. https://www.terraform.io/docs/commands/refresh.html NO.18 Terraform-specific settings and behaviors are declared in which configuration block type? A. resource B. provider C. terraform D. data Answer: C Explanation: The special terraform configuration block type is used to configure some behaviors of Terraform itself, such as requiring a minimum Terraform version to apply your configuration. Example terraform { required_version = "> 0.12.0" } https://www.terraform.io/docs/configuration/terraform.html NO.19 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 HCL (HashiCorp Configuration Language) code according to standard Terraform style convention? A. Run the terraform fmt command during the code linting phase of your CI/CD process B. Designate one person in each team to review and format everyone's code C. Write a shell script to transform Terraform files using tools such as AWK, Python, and sed D. Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf) Answer: D Explanation: Indent two spaces for each nesting level. When multiple arguments with single-line values appear on consecutive lines at the same nesting IT Certification Guaranteed, The Easy Way! 7 Free Exam/Cram Practice Materials - Best Exam Practice Materials Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 6 https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html
  • 7. level, align their equals signs. NO.20 You want terraform plan and 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? A. Terraform Backends B. This can be done using any of the local or remote backends C. Local Backends D. Remote Backends Answer: D Explanation: The remote backend stores Terraform state and may be used to run operations in Terraform Cloud. When using full remote operations, operations like terraform plan or terraform apply can be executed in Terraform Cloud's run environment, with log output streaming to the local terminal. Remote plans and applies use variable values from the associated Terraform Cloud workspace. https://www.terraform.io/docs/backends/types/remote.html IT Certification Guaranteed, The Easy Way! 8 Free Exam/Cram Practice Materials - Best Exam Practice Materials Get Latest & Valid TA-002-P Exam's Question and Answers from Freecram.net. 7 https://www.freecram.net/exam/TA-002-P-hashicorp-certified-terraform-associate-e11859.html