無料HashiCorp TA-002-Pプレミアム試験エンジンPDFをダウンロード 更新された94問があります
検証済みTA-002-Pリアル試験問題集PDF豪華お試しセット
HashiCorp TA-002-P試験は、クラウドインフラストラクチャと自動化の分野で広く認知されている専門家認定資格であるHashiCorp Certified: Terraform Associate認定試験です。この試験は、インフラストラクチャのコード(IaC)管理のためのオープンソースツールであるTerraformを使用する専門家のスキルと知識を検証するために設計されています。
TA-002-P認定試験は60の複数選択の質問で構成されており、候補者は試験を完了するために90分を与えられます。この試験は、英語、日本語、簡素化された中国語、スペイン語で入手できます。試験に合格する候補者には、2年間有効なハシコープ認定:Terraform Associate認定が授与されます。この認定は、IT専門家がテラフォームに関する専門知識を実証し、潜在的な雇用主にスキルを示す優れた方法です。
質問 # 44
What information does the public Terraform Module Registry automatically expose about published modules?
- A. Required input variables
- B. All of the above
- C. Optional inputs variables and default values
- D. Outputs
- E. None of the above
正解:B
解説:
The public Terraform Module Registry automatically exposes all the information about published modules, including required input variables, optional input variables and default values, and outputs. This helps users to understand how to use and configure the modules.
質問 # 45
What is one disadvantage of using dynamic blocks in Terraform?
- A. Dynamic blocks can construct repeatable nested blocks
- B. Terraform will run more slowly
- C. They make configuration harder to read and understand
- D. They cannot be used to loop through a list of values
正解:C
解説:
Explanation
"Overuse of dynamic blocks can make configuration hard to read and maintain, so we recommend using them
only when you need to hide details in order to build a clean user interface for a re-usable module. Always
write nested blocks out literally where possible."
Reference: https://github.com/hashicorp/terraform/issues/19291
質問 # 46
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 variables in your shell: TF_itemNum =6,
TF_VAR_itemNum =9. You also have a terraform.tfvars file with the following contents
itemNum = 7
When you run the following apply command, what is the value assigned to the itemNum variable?
terraform apply -var itemNum =4
- A. 0
- B. 1
- C. 2
- D. 3
- E. 4
正解:D
解説:
Explanation
The -var and -var-file methods of assigning variables have the highest precedence.
https://www.terraform.io/docs/configuration/variables.html
質問 # 47
Provider dependencies are created in several different ways. Select the valid provider dependencies from the following list: (select three)
- A. Existence of any resource instance belonging to a particular provider in the current state.
- B. Explicit use of a provider block in configuration, optionally including a version constraint.
- C. Use of any resource belonging to a particular provider in a resource or data block in configuration.
- D. Existence of any provider plugins found locally in the working directory.
正解:A、B、C
解説:
Explanation
The existence of a provider plugin found locally in the working directory does not itself create a provider dependency. The plugin can exist without any reference to it in the terraform configuration. https://www.terraform.io/docs/commands/providers.html
質問 # 48
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 git repo, are using v0.11, and getting errors. What can be done from your end to solve this problem?
- A. Force developer to use v0.12 by using terraform setting 'required_version' and set it to >=0.12.
- B. Refactor the code to support both v0.11, and v0.12. It might be a difficult process, but there is no other way.
- C. Add a condition in front of each such specific construct, to check whether the running terraform version id v0.11 or v0.12, and ,work accordingly.
- D. Add comments in your code to tell developers to use v0.12 . If they use v0.11 , that should be their problem , which they need to figure out.
正解:A
解説:
Explanation
https://www.terraform.io/docs/configuration/terraform.html
質問 # 49
True or False? Each Terraform workspace uses its own state file to manage the infrastructure associated with
that particular workspace.
- A. False
- B. True
正解:B
解説:
Explanation
The persistent data stored in the backend belongs to a workspace. Initially, the backend has only one
workspace, called "default", and thus there is only one Terraform state associated with that configuration.
質問 # 50
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 the best way to achieve this using
Terraform?
- A. Use the terraform state rm command to remove the VM from state file
- B. Use the Terraform taint command targeting the VMs then run Terraform plan and Terraform apply
- C. Delete the Terraform VM resources from your Terraform code then run Terraform plan and terraform
apply - D. Use the terraform apply command targeting the VM resources only
正解:B
解説:
Explanation
https://www.terraform.io/cli/state/taint
質問 # 51
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
- A. It will happen automatically
- B. Manually update the state fire
- C. Run terraform import
- D. Run terraform refresh
正解:D
解説:
Explanation
https://www.terraform.io/cli/commands/refresh#:~:text=The%20terraform%20refresh%20command%20reads%2
質問 # 52
How does Terraform handle working with so many providers?
- A. Terraform ships with all of the plugins embedded in the Terraform binary.
- B. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in the configuration's working directory.
- C. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in a shared, system-wide plugins directory.
- D. Terraform allows you to select the providers you want to support during the Terraform installation process.
正解:B
解説:
Terraform is built on a plugin-based architecture. All providers and provisioners that are used in Terraform configurations are plugins, even the core types such as AWS and Heroku. Users of Terraform are able to write new plugins in order to support new functionality in Terraform.
質問 # 53
Your team uses terraform OSS . You have created a number of resuable modules for important , independent network components that you want to share with your team to enhance consistency . What is the correct option/way to do that?
- A. Store your modules in a NAS/ shared file server , and ask your team members to directly reference the code from there. This is the only viable option in terraform OSS ,which is better than individually maintaining module versions for every developer.
- B. Upload your modules with proper versioning in the terraform public module registry . Terraform OSS is directly integrated with the public module registry , and can reference the modules from the code in the main tf file.
- C. Terraform module sharing is only available in Enterprise version via terraform private module registry , so no way to enable it in OSS version.
- D. Terraform modules cannot be shared in OSS version . Each developer needs to maintain their own modules and leverage them in the main tf file.
正解:B
解説:
Explanation
Software development encourages code reuse through reusable artifacts, such as libraries, packages and modules. Most programming languages enable developers to package and publish these reusable components and make them available on a registry or feed. For example, Python has Python Package Index and PowerShell has PowerShell Gallery.
For Terraform users, the Terraform Registry enables the distribution of Terraform modules, which are reusable configurations. The Terraform Registry acts as a centralized repository for module sharing, making modules easier to discover and reuse.
The Registry is available in two variants:
* Public Registry houses official Terraform providers -- which are services that interact with an API to expose and manage a specific resource -- and community-contributed modules.
* Private Registry is available as part of the Terraform Cloud, and can host modules internally within an organization.
https://www.terraform.io/docs/registry/index.html
質問 # 54
In order to make a Terraform configuration file dynamic and/or reusable, static values should be converted to use what?
- A. Output Value
- B. Regular Expressions
- C. Input Parameters
- D. Module
正解:C
解説:
Explanation
Input variables serve as parameters for a Terraform module, allowing aspects of the module to be customized without altering the module's own source code, and allowing modules to be shared between different configurations.
https://www.terraform.io/docs/configuration/variables.html
質問 # 55
True or False. The terraform refresh command is used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure. If drift is detected between the real-world infrastructure and the last known-state, it will modify the infrastructure to correct the drift.
- A. False
- B. True
正解:A
解説:
https://www.terraform.io/docs/commands/refresh.html
質問 # 56
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.
- A. Backends
- B. Workspaces
- C. Environment Variables
- D. Repositories
正解:B
解説:
workspaces allow conveniently switching between multiple instances of a single configuration within its single backend. They are convenient in a number of situations, but cannot solve all problems.
A common use for multiple workspaces is to create a parallel, distinct copy of a set of infrastructure in order to test a set of changes before modifying the main production infrastructure. For example, a developer working on a complex set of infrastructure changes might create a new temporary workspace in order to freely experiment with changes without affecting the default workspace.
Non-default workspaces are often related to feature branches in version control. The default workspace might correspond to the "master" or "trunk" branch, which describes the intended state of production infrastructure. When a feature branch is created to develop a change, the developer of that feature might create a corresponding workspace and deploy into it a temporary "copy" of the main infrastructure so that changes can be tested without affecting the production infrastructure. Once the change is merged and deployed to the default workspace, the test infrastructure can be destroyed and the temporary workspace deleted.
https://www.terraform.io/docs/state/workspaces.html
https://www.terraform.io/docs/state/workspaces.html#when-to-use-multiple-workspaces
質問 # 57
Most Terraform providers interact with ____________.
- A. Shell scripts
- B. VCS Systems
- C. API
- D. None of the above
正解:C
解説:
Explanation
Terraform relies on plugins called "providers" to interact with cloud providers, SaaS providers, and other
APIs, as per: https://www.terraform.io/language/providers
質問 # 58
You have used Terraform to create an ephemeral development environment in the cloud and are now ready to
destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see
all the infrastructure that will be deleted by Terraform.
Which command should you use to show all of the resources that will be deleted? (Choose two.)
- A. Run terraform state rm *.
- B. Run terraform plan -destroy.
- C. Run terraform destroy and it will first output all the resources that will be deleted before prompting for
approval. - D. This is not possible. You can only show resources that will be created.
正解:B、C
解説:
Reference: https://www.terraform.io/docs/cli/commands/state/rm.html
質問 # 59
Talal is a DevOps engineer and he has deployed the production infrastructure using Terraform. He is using a very large configuration file to maintain and update the actual infrastructure. As the infrastructure have grown to a very complex and large, he has started experiencing slowness when he run runs terraform plan. What are the options for him to resolve this slowness?
- A. Use -refresh=false flag as well as the -target flag with terraform plan in order to work around this.
- B. Run terraform refresh every time before running terraform plan.
- C. Use -refresh=true flag as well as the -target flag with terraform plan in order to work around this.
- D. Break large configurations into several smaller configurations that can each be independently applied.
正解:A、D
解説:
Explanation
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.
Although 'Use -refresh=false flag as well as the -target flag with terraform plan in order to work around this.' is a solution, but its not always recommended. Instead of using -target as a means to operate on isolated portions of very large configurations, prefer instead to break large configurations into several smaller configurations that can each be independently applied. Data sources can be used to access information about resources created in other configurations, allowing a complex system architecture to be broken down into more manageable parts that can be updated independently.
Option 'Run terraform refresh every time before running terraform plan.' and 'Use -refresh=true flag as well as the -target flag with terraform plan in order to work around this.' is not correct because in both the cases terraform will query every resources of the infrastructure.
質問 # 60
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 moving forward.
What can you do to ensure that all existing is managed by Terraform moving forward without interruption to
existing services?
- A. Using terraform import, import the existing infrastructure into your Terraform state.
- B. Resources that are manually deployed in the AWS console cannot be imported by Terraform.
- C. Delete the existing resources and recreate them using new a Terraform configuration so Terraform can
manage them moving forward. - D. Submit a ticket to AWS and ask them to export the state of all existing resources and use terraform
import to import them into the state file.
正解:A
解説:
Explanation
Terraform is able to import existing infrastructure. This allows us take resources we've created by some other
means (i.e. via console) and bring it under Terraform management.
This is a great way to slowly transition infrastructure to Terraform.
The terraform import command is used to import existing infrastructure.
To import a resource, first write a resource block for it in our configuration, establishing the name by which it
will be known to Terraform.
Example:
resource "aws_instance" "import_example" {
# ...instance configuration...
}
Now terraform import can be run to attach an existing instance to this resource configuration.
$ terraform import aws_instance.import_example i-03efafa258104165f
aws_instance.import_example: Importing from ID "i-03efafa258104165f"...
aws_instance.import_example: Import complete!
Imported aws_instance (ID: i-03efafa258104165f)
aws_instance.import_example: Refreshing state... (ID: i-03efafa258104165f)
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.
This command locates the AWS instance with ID i-03efafa258104165f (which has been created outside
Terraform) and attaches its existing settings, as described by the EC2 API, to the name
aws_instance.import_example in the Terraform state.
質問 # 61
Select the feature below that best completes the sentence:
The following list represents the different types of __________ available in Terraform.
1. max
2. min
3. join
4. replace
5. list
6. length
7. range
- A. Backends
- B. Named values
- C. Functions
- D. Data sources
正解:C
解説:
The Terraform language includes a number of built-in functions that you can call from within expressions to transform and combine values. The Terraform language does not support user-defined functions, and only the functions built into the language are available for use.
https://www.terraform.io/docs/configuration/functions.html
質問 # 62
......
Hashicorp TA-002-P試験は、Terraformを使用してクラウドインフラストラクチャ管理のキャリアを追求したい個人にとって不可欠な認証です。テラフォームの理解と、さまざまなクラウドプラットフォームでインフラストラクチャを提供および管理する能力を検証します。この認定により、個人はTerraformの専門知識を実証し、有能なインフラマネージャーとして雇用市場で際立っています。
あなたを合格させるHashiCorp試験にTA-002-P試験問題集:https://www.goshiken.com/HashiCorp/TA-002-P-mondaishu.html
TA-002-P問題集PDF最新 [2024年最新] 究極の学習ガイド:https://drive.google.com/open?id=192LkRgZwdoZigT3jKwQjNCFjQyFOXx9S