合格させるTA-002-Pブレーン問題集で更新されたのは認定サンプル問題
オンラインTA-002-Pテストブレーン問題集とテストエンジン
HashiCorpのTA-002-P認定試験は、グローバルに認知されているベンダー中立の認定試験です。つまり、この試験に合格した個人は、世界中の企業や団体から、Terraformを扱うために必要なスキルと知識を持つ認定プロフェッショナルとして認められます。この認定試験は、ITオペレーション、クラウドオペレーション、DevOps、ソフトウェア開発で働くプロフェッショナルに適しています。
質問 # 34
During a terraform apply, a resource is successfully created but eventually fails during provisioning. What happens to the resource?
- A. The resource will be automatically destroyed.
- B. The failure of provisioner will be ignored and it will not cause a failure to terraform apply
- C. The resource will be planned for destruction and recreation upon the next terraform apply
- D. Terraform will retry to provision again.
正解:C
解説:
Explanation
If a creation-time provisioner fails, the resource is marked as tainted. A tainted resource will be planned for destruction and recreation upon the next terraform apply. Terraform does this because a failed provisioner can leave a resource in a semi-configured state. Because Terraform cannot reason about what the provisioner does, the only way to ensure proper creation of a resource is to recreate it. This is tainting.
You can change this behavior by setting the on_failure attribute, which is covered in detail below.
https://www.terraform.io/docs/provisioners/index.html#creation-time-provisioners
https://www.terraform.io/docs/provisioners/index.html#destroy-time-provisioners
https://www.terraform.io/docs/provisioners/index.html#failure-behavior
質問 # 35
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 /tmp directory
- C. On disk in the .terraform sub-directory
- D. In memory
正解:C
質問 # 36
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. Java
- B. Python
- C. Go
- D. It depends on which command issue related to.
正解:C
解説:
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.
質問 # 37
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 contains confidential information, and are
worried that it will not be securely protected. What should be your response to the security team in this regard?
- A. Inform the security team that using terraform state is optional . There are ways to avoid it , and you will
do the same. - B. Ensure that the state is managed in a remote backend , preferably an enterprise grade state management
system like Terraform Cloud. - C. Mask the confidential entries in the terraform state file , using Vault Enterprise, another Hashicorp
product , while keeping it locally. - D. Keep the state file locally on each developer machine , and ensure that there is a local protection
software like KeyPass protecting it.
正解:B
解説:
Explanation
https://www.terraform.io/docs/state/index.html
State is very important topic for exam. Please read all of the below subtopics
Purpose
Import Existing Resources
Locking
Workspaces
Remote State
Sensitive Data
質問 # 38
By default, a defined provisioner is a creation-time provisioner.
- A. True
- B. False
正解:A
解説:
https://www.terraform.io/docs/provisioners/index.html
質問 # 39
How would you reference the "name" value of the second instance of this fictitious resource?
- A. aws_instance.web[2].name
- B. aws_instance.web[1].name
- C. element(aws_instance.web, 2)
- D. aws_instance.web[1]
- E. aws_instance.web.*.name
正解:C
質問 # 40
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose
two.)
- A. When a change is made to the resources via the Azure Cloud Console, the changes are recorded in a new
state file - B. When a change is made to the resources via the Azure Cloud Console, the current state file will not be
updated - C. When a change is made to the resources via the Azure Cloud Console, the changes are recorded in the
current state file - D. When a change is made to the resources via the Azure Cloud Console, Terraform will update the state
file to reflect them during the next plan or apply
正解:B、D
質問 # 41
What happens when a terraform apply command is executed?
- A. Reconciles the state Terraform knows about with the real-world infrastructure.
- B. Applies the changes required in the target infrastructure in order to reach the desired configuration.
- C. The backend is initialized and the working directory is prepped.
- D. Creates the execution plan for the deployment of resources.
正解:B
解説:
Explanation
The terraform apply command is used to apply the changes required to reach the desired state of the
configuration, or the pre-determined set of actions generated by a terraform plan execution plan.
https://www.terraform.io/docs/commands/apply.html
質問 # 42
Command terraform refresh will update state file?
- A. True
- B. False
正解:A
解説:
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. If the state is changed, this may cause
changes to occur during the next plan or apply.
https://www.terraform.io/docs/commands/refresh.html
質問 # 43
Open source Terraform can only import publicly-accessible and open-source modules.
- A. True
- B. False
正解:B
質問 # 44
Which of the following arguments are required when declaring a Terraform output?
- A. description
- B. default
- C. sensitive
- D. value
正解:D
質問 # 45
A terraform apply can not _________ infrastructure.
- A. import
- B. destroy
- C. change
- D. provision
正解:A
解説:
Explanation
https://www.educative.io/answers/what-is-the-command-to-destroy-infrastructure-in-terraform
質問 # 46
Which argument(s) are required when declaring a Terraform variable?
- A. None of the above
- B. description
- C. default
- D. All of the above
- E. type
正解:E
質問 # 47
You have created a custom variable definition file testing.tfvars. How will you use it for provisioning infrastructure?
- A. terraform apply -var-state-file ="testing.tfvars"
- B. terraform apply var-file="testing.tfvars"
- C. terraform plan -var-file="testing.tfvar"
- D. terraform apply -var-file="testing.tfvars"
正解:D
解説:
https://www.terraform.io/docs/configuration/variables.html
質問 # 48
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 pattern would follow laC best practices for making a change?
- A. Clone the repository containing your infrastructure code and then run the code
- B. Submit a pull request and wait for an approved merge of the proposed changes
- C. Make the change via the public cloud API endpoint
- D. Use the public cloud console to make the change after a database record has been approved
- E. Make the change programmatically via the public cloud CLI
正解:B
解説:
You do not need to use different Terraform commands depending on the cloud provider you use. Terraform commands are consistent across different providers, as they operate on the Terraform configuration files and state files, not on the provider APIs directly.
質問 # 49
A fellow developer on your team is asking for some help in refactoring their Terraform code. As part of their
application's architecture, they are going to tear down an existing deployment managed by Terraform and
deploy
new. However, there is a server resource named aws_instance.ubuntu[1] they would like to keep to perform
some additional analysis.
What command should be used to tell Terraform to no longer manage the resource?
- A. terraform plan rm aws_instance.ubuntu[1]
- B. terraform apply rm aws_instance.ubuntu[1]
- C. terraform delete aws_instance.ubuntu[1]
- D. terraform state rm aws_instance.ubuntu[1]
正解:D
解説:
Explanation
"You can use terraform state rm in the less common situation where you wish to remove a binding to an
existing remote object without first destroying it, which will effectively make Terraform "forget" the object
while it continues to exist in the remote system." https://www.terraform.io/cli/commands/state/rm
質問 # 50
While Terraform is generally written using the HashiCorp Configuration Language (HCL), what other syntax can Terraform are expressed in?
- A. TypeScript
- B. XML
- C. YAML
- D. JSON
正解:D
解説:
The constructs in the Terraform language can also be expressed in JSON syntax, which is harder for humans to read and edit but easier to generate and parse programmatically.
質問 # 51
Which one of the following command will rewrite Terraform configuration files to a canonical format and style.
- A. terraform init
- B. terraform graph -h
- C. terraform graph
- D. terraform fmt
正解:D
解説:
Explanation
The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style.
This command applies a subset of the Terrra Terraform language style conventions, along with other minor adjustments for readability.
質問 # 52
Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest.
How can Terraform Enterprise automatically and proactively enforce this security control?
- A. By adding variables to each TFE workspace to ensure these settings are always enabled
- B. Auditing cloud storage buckets with a vulnerability scanning tool
- C. With an S3 module with proper settings for buckets
- D. With a Sentinel policy, which runs before every apply
正解:D
解説:
Explanation
https://docs.hashicorp.com/sentinel/intro/what
https://medium.com/hashicorp-engineering/enforcing-aws-s3-security-best-practice-using-terraform-sentinel-ddc
質問 # 53
terraform state subcommands such as list are read-only commands, do read-only commands create state
backup files?
- A. No
- B. Yes
正解:A
解説:
Explanation
Subcommands that are read-only (such as list) do not write any backup files since they aren't modifying the
state.
All terraform state subcommands that modify the state write backup files. The path of these backup file can be
controlled with -backup.
https://www.terraform.io/docs/commands/state/index.html#backups
質問 # 54
What does terraform import allow you to do?
- A. Import a new Terraform module
- B. Import provisioned infrastructure to your state file
- C. Import an existing state file to a new Terraform workspace
- D. Use a state file to import infrastructure to the cloud
正解:B
質問 # 55
A user has created three workspaces using the command line - prod, dev, and test. The user wants to create a
fourth workspace named stage. Which command will the user execute to accomplish this?
- A. terraform workspace -create stage
- B. terraform workspace new stage
- C. terraform workspace create stage
- D. terraform workspace -new stage
正解:B
解説:
Explanation
The terraform workspace new command is used to create a new workspace.
https://www.terraform.io/docs/commands/workspace/new.html
質問 # 56
A user has created a module called "my_test_module" and committed it to GitHub. Over time, several commits have been made with updates to the module, each tagged in GitHub with an incremental version number. Which of the following lines would be required in a module configuration block in terraform to select tagged version v1.0.4?
- A. source = "git::https://example.com/my_test_module.git@tag=v1.0.4"
- B. source = "git::https://example.com/my_test_module.git&ref=v1.0.4"
- C. source = "git::https://example.com/my_test_module.git#tag=v1.0.4"
- D. source = "git::https://example.com/my_test_module.git?ref=v1.0.4"
正解:D
解説:
Explanation
https://www.terraform.io/docs/modules/sources.html#selecting-a-revision
質問 # 57
......
リアルHashiCorp TA-002-P試験問題集には正解94問題と解答があります:https://www.jpntest.com/shiken/TA-002-P-mondaishu
HashiCorp TA-002-P認定のリアル2023年最新の模擬試験:https://drive.google.com/open?id=1hU0cmNKsVyR9tkERsEjBXpeH_9B_YvRb