[Q110-Q128] HashiCorp TA-002-P認証された練習解答、必ずあなたを試験合格させる![2023]

Share

HashiCorp TA-002-P認証された練習解答、必ずあなたを試験合格させる![2023]

有効な合格方法HashiCorp Infrastructure AutomationのTA-002-P試験問題集


HashiCorp TA-002-P(HashiCorp Certified:Terraform Associate)認定試験は、オープンソースの基盤としてのコード(IaC)ツールであるTerraformを使用する個人の専門知識を検証する、世界的に認知された認定試験です。この認定試験は、Terraformを使用してインフラストラクチャを管理および自動化するスキルをデモンストレーションしたいプロフェッショナル向けに設計されています。これは、ITプロフェッショナルがキャリアの見通しを向上させ、クラウドインフラストラクチャでの作業能力を示すための優れた方法です。


HashiCorp TA-002-P試験は、60の多肢選択問題で構成されるオンライン試験です。試験に合格した候補者は、HashiCorp認定:Terraformアソシエイトとして認定されます。認定は2年間有効であり、試験を再度受けたり、より高度な認定を取得することで更新することができます。試験は、専門家がTerraformの専門知識とクラウド環境でのインフラストラクチャの設計、実装、および管理能力を示す優れた方法です。試験に合格することで、候補者はキャリアの機会を向上させ、自分の職業へのコミットメントを示すことができます。

 

質問 # 110
Why does this backend configuration not follow best practices?

  • A. The backend configuration should contain multiple credentials so that more than one user can execute
    terraform plan and terraform apply
  • B. An alias meta-argument should be included in backend blocks whenever possible
  • C. You should use the local enhanced storage backend whenever possible
  • D. You should not store credentials in Terraform Configuration

正解:D


質問 # 111
resource "aws_s3_bucket" "example" { bucket = "my-test-s3-terraform-bucket" ...} resource "aws_iam_role"
"test_role" { name = "test_role" ...}
Due to the way that the application code is written , the s3 bucket must be created before the test role is
created , otherwise there will be a problem. How can you ensure that?

  • A. Create 2 separate terraform config scripts , and run them one by one , 1 for s3 bucket , and another for
    IAM role , run the S3 bucket script first.
  • B. This will already be taken care of by terraform native implicit dependency. Nothing else needs to be
    done from your end.
  • C. Add explicit dependency using depends_on . This will ensure the correct order of resource creation.
  • D. This is not possible to control in terraform . Terraform will take care of it in a native way , and create a
    dependency graph that is best suited for the parallel resource creation.

正解:C

解説:
Explanation
Use the depends_on meta-argument to handle hidden resource dependencies that Terraform can't automatically
infer.
Explicitly specifying a dependency is only necessary when a resource relies on some other resource's behavior
but doesn't access any of that resource's data in its arguments.


質問 # 112
In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.

  • A. True
  • B. False

正解:A

解説:
Outside of the required_providers block, Terraform configurations always refer to providers by their local names.


質問 # 113
What resource dependency information is stored in Terraform's state?

  • A. Only explicit dependencies are stored in state.
  • B. Both implicit and explicit dependencies are stored in state.
  • C. Only implicit dependencies are stored in state.
  • D. No dependency information is stored in state.

正解:B

解説:
Terraform state captures all dependency information, both implicit and explicit. One purpose for state is to determine the proper order to destroy resources. When resources are created all of their dependency information is stored in the state. If you destroy a resource with dependencies, Terraform can still determine the correct destroy order for all other resources because the dependencies are stored in the state.
https://www.terraform.io/docs/state/purpose.html#metadata


質問 # 114
When you initialize Terraform, where does it cache modules from the public Terraform Module Registry?

  • A. They are not cached
  • B. On disk in the .terraform sub-directory
  • C. In memory
  • D. On disk in the /tmp directory

正解:B


質問 # 115
You should store secret data in the same version control repository as your Terraform configuration.

  • A. False
  • B. True

正解:A

解説:
Reference: https://blog.gruntwork.io/a-comprehensive-guide-to-managing-secrets-in-your-terraform-code-
1d586955ace1


質問 # 116
How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? (Choose
two.)

  • A. A full audit trail of the request and fulfillment process is generated
  • B. As additional resources are required, more tickets are submitted
  • C. A request must be submitted for infrastructure changes
  • D. A catalog of approved resources can be accessed from drop down lists in a request form

正解:B、C


質問 # 117
Which of the following locations can Terraform use as a private source for modules? (Choose two.)

  • A. Private repository on GitHub
  • B. Public Terraform Module Registry
  • C. Internally hosted SCM (Source Control Manager) platform
  • D. Public repository on GitHub

正解:A、C


質問 # 118
Terraform requires the Go runtime as a prerequisite for installation.

  • A. False
  • B. True

正解:A

解説:
Reference: https://www.terraform.io/docs/extend/guides/v1-upgrade-guide.html


質問 # 119
One remote backend configuration always maps to a single remote workspace.

  • A. True
  • B. False

正解:A

解説:
Reference: https://www.terraform.io/docs/language/settings/backends/remote.html


質問 # 120
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?

  • A. Manually update the state fire
  • B. Run terraform refresh
  • C. Run terraform import
  • D. It will happen automatically

正解:B


質問 # 121
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 option is a recommended solution for this?

  • A. Use the cached state and treat this as the record of truth.
  • B. Module
  • C. Workspace
  • D. Remote State

正解:D

解説:
https://www.terraform.io/docs/state/remote.html


質問 # 122
You want to get involved in the development of Terraform. As this is an open source project, you would like to contribute a fix for an open issue of Terraform. What programming language will need to use to write the fix?

  • A. Python
  • B. Java
  • C. It depends on which command issue related to.
  • D. Go

正解:D

解説:
Explanation
Basic programming knowledge. Terraform and Terraform Plugins are written in the Go programming language, but even if you've never written a line of Go before, you're still welcome to take a dive into the code and submit patches. The community is happy to assist with code reviews and offer guidance specific to Go.


質問 # 123
What feature of Terraform Cloud and/or Terraform Enterprise can you publish and maintain a set of custom
modules which can be used within your organization?

  • A. Terraform registry
  • B. private module registry
  • C. remote runs
  • D. custom VCS integration

正解:B


質問 # 124
Which of the following allows Terraform users to apply policy as code to enforce standardized configurations for resources being deployed via infrastructure as code?

  • A. Functions
  • B. Workspaces
  • C. Module registry
  • D. Sentinel

正解:D

解説:
Explanation
Sentinel is a language and framework for policy built to be embedded in existing software to enable fine-grained, logic-based policy decisions. A policy describes under what circumstances certain behaviors are allowed. Sentinel is an enterprise-only feature.
https://www.youtube.com/watch?v=Vy8s7AAvU6g&feature=emb_title


質問 # 125
Which argument(s) is (are) required when declaring a Terraform variable?

  • A. default
  • B. description
  • C. None of the above
  • D. type
  • E. All of the above

正解:A

解説:
The variable declaration can also include a default argument.


質問 # 126
You have written a terraform IaC script which was working till yesterday , but is giving some vague error
from today , which you are unable to understand . You want more detailed logs that could potentially help you
troubleshoot the issue , and understand the root cause. What can you do to enable this setting? Please note ,
you are using terraform OSS.

  • A. Terraform OSS can push all its logs to a syslog endpoint. As such, you have to set up the syslog sink,
    and enable TF_LOG_PATH env variable to the syslog endpoint and all logs will automatically start
    streaming.
  • B. Enable the TF_LOG_PATH to the log sink file location, and logging output will automatically be stored
    there.
  • C. Enable TF_LOG to the log level DEBUG, and then set TF_LOG_PATH to the log sink file location.
    Terraform debug logs will be dumped to the sink path, even in terraform OSS.
  • D. Detailed logs are not available in terraform OSS, except the crash message. You need to upgrade to
    terraform enterprise for this point.

正解:C

解説:
Explanation
Terraform has detailed logs which can be enabled by setting the TF_LOG environment variable to any value.
This will cause detailed logs to appear on stderr.
You can set TF_LOG to one of the log levels TRACE, DEBUG, INFO, WARN or ERROR to change the
verbosity of the logs. TRACE is the most verbose and it is the default if TF_LOG is set to something other
than a log level name.
To persist logged output you can set TF_LOG_PATH in order to force the log to always be appended to a
specific file when logging is enabled. Note that even when TF_LOG_PATH is set, TF_LOG must be set in
order for any logging to be enabled.


質問 # 127
What is the purpose of using the local-exec provisioner? (Select Two)

  • A. Executes a command on the resource to invoke an update to the Terraform state.
  • B. To execute one or more commands on the machine running Terraform.
  • C. To invoke a local executable.
  • D. Ensures that the resource is only executed in the local infrastructure where Terraform is deployed.

正解:B、C

解説:
The local-exec provisioner invokes a local executable after a resource is created. This invokes a process on the machine running Terraform, not on the resource.
Note that even though the resource will be fully created when the provisioner is run, there is no guarantee that it will be in an operable state - for example system services such as sshd may not be started yet on compute resources.
Example usage
resource "aws_instance" "web" {
# ...
provisioner "local-exec" {
command = "echo ${aws_instance.web.private_ip} >> private_ips.txt"
}
}
Note: Provisioners should only be used as a last resort. For most common situations there are better alternatives.
https://www.terraform.io/docs/provisioners/local-exec.html


質問 # 128
......

HashiCorp TA-002-P事前試験練習テストはGoShiken:https://www.goshiken.com/HashiCorp/TA-002-P-mondaishu.html

TA-002-P練習テスト問題、解答、解釈:https://drive.google.com/open?id=192LkRgZwdoZigT3jKwQjNCFjQyFOXx9S