[2022年04月08日] 365日更新、有効なTA-002-P知能問題集
ベスト品質のTA-002-P試験問題集でHashiCorpテスト高得点を目指そう
HashiCorp TA-002-P 認定試験の出題範囲:
| トピック | 出題範囲 |
|---|---|
| トピック 1 |
|
| トピック 2 |
|
| トピック 3 |
|
| トピック 4 |
|
| トピック 5 |
|
| トピック 6 |
|
| トピック 7 |
|
| トピック 8 |
|
| トピック 9 |
|
| トピック 10 |
|
質問 189
State locking does not happen automatically and must be specified at run
- A. False
- B. True
正解: A
解説:
Explanation
State locking happens automatically on all operations that could write state.
https://www.terraform.io/docs/state/locking.html
質問 190
Complete the following sentence:
The terraform state command can be used to ____
- A. modify state
- B. refresh state
- C. There is no such command
Explanation
https://www.terraform.io/docs/commands/state/index.html - D. view state
正解: A
質問 191
You cannot publish your own modules on the Terraform Registry.
- A. False
- B. True
正解: A
解説:
https://www.terraform.io/docs/registry/modules/publish.html
質問 192
terraform destroy is the only way to remove infrastructure.
- A. False
- B. True
正解: A
質問 193
What is one disadvantage of using dynamic blocks in Terraform?
- A. Dynamic blocks can construct repeatable nested blocks
- B. They make configuration harder to read and understand
- C. They cannot be used to loop through a list of values
- D. Terraform will run more slowly
正解: C
解説:
Explanation/Reference: https://github.com/hashicorp/terraform/issues/19291
質問 194
Your developers are facing a lot of problem while writing complex expressions involving difficult interpolations . They have to run the terraform plan every time and check whether there are errors , and also check terraform apply to print the value as a temporary output for debugging purposes. What should be done to avoid this?
- A. Use terraform zipmap function , it will be able to easily do the interpolations without complex code.
- B. Use terraform console command to have an interactive UI with full access to the underlying terraform state to run your interpolations , and debug at real-time.
- C. Use terraform console command to have an interactive UI , but you can only use it with local state , and it does not work with remote state.
- D. Add a breakpoint in your code, using the watch keyword , and output the value to console for temporary debugging.
正解: B
解説:
The terraform console command provides an interactive console for evaluating expressions. This is useful for testing interpolations before using them in configurations, and for interacting with any values currently saved in state.
https://www.terraform.io/docs/commands/console.html
質問 195
By default, where does Terraform store its state file?
- A. current working directory
Explanation
By default, the state file is stored in a local file named "terraform.tfstate", but it can also be stored remotely, which works better in a team environment. - B. shared directory
- C. remotely using Terraform Cloud
- D. Amazon S3 bucket
正解: A
質問 196
What does this code do?
- A. Requires any version of the AWS provider > 3.0
- B. Requires any version of the AWS provider > = 3.0
- C. Requires any version of the AWS provider after the 3.0 major release like 4.1
- D. Requires any version of the AWS provider > = 3.0 and < 4.0
正解: D
質問 197
Which one of the following command will rewrite Terraform configuration files to a canonical format and style.
- A. terraform graph
- B. terraform init
- C. terraform fmt
- D. terraform graph -h
正解: C
解説:
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.
質問 198
As a member of the operations team, you need to run a script on a virtual machine created by Terraform. Which provisioned is best to use in your Terraform code?
- A. file
- B. remote-exec
- C. local-exec
- D. null-exec
正解: B
質問 199
Jim has created several AWS resources from a single terraform configuration file. Someone from his team has manually modified one of the EC2 instance.
Now to discard the manual change, Jim wants to destroy and recreate the EC2 instance. What is the best way to do it?
- A. terraform recreate
- B. terraform destroy
- C. terraform taint
- D. terraform refresh
正解: C
解説:
The terraform taint command manually marks a Terraform-managed resource as tainted, forcing it to be destroyed and recreated on the next apply.
This command will not modify infrastructure, but does modify the state file in order to mark a resource as tainted. Once a resource is marked as tainted, the next plan will show that the resource will be destroyed and recreated and the next apply will implement this change.
Forcing the recreation of a resource is useful when you want a certain side effect of recreation that is not visible in the attributes of a resource. For example: re-running provisioners will cause the node to be different or rebooting the machine from a base image will cause new startup scripts to run.
Note that tainting a resource for recreation may affect resources that depend on the newly tainted resource. For example, a DNS resource that uses the IP address of a server may need to be modified to reflect the potentially new IP address of a tainted server. The plan command will show this if this is the case.
This example will taint a single resource:
$ terraform taint aws_security_group.allow_all
The resource aws_security_group.allow_all in the module root has been marked as tainted.
https://www.terraform.io/docs/commands/taint.html
質問 200
Which option can not be used to keep secrets out of Terraform configuration files?
- A. A Terraform provider
- B. Environment variables
- C. A -var flag
- D. secure string
正解: C
質問 201
You have been given requirements to create a security group for a new application. Since your organization standardizes on Terraform, you want to add this new security group with the fewest number of lines of code. What feature could you use to iterate over a list of required tcp ports to add to the new security group?
- A. splat expression
- B. dynamic backend
- C. dynamic block
- D. terraform import
正解: C
解説:
A dynamic block acts much like a for expression, but produces nested blocks instead of a complex typed value. It iterates over a given complex value and generates a nested block for each element of that complex value.
https://www.terraform.io/docs/configuration/expressions.html#dynamic-blocks
質問 202
HashiCorp Configuration Language (HCL) supports user-defined functions.
- A. False
- B. True
正解: A
質問 203
You have created a custom variable definition file testing.tfvars. How will you use it for provisioning infrastructure?
- A. terraform plan -var-file="testing.tfvar"
- B. terraform apply -var-state-file ="testing.tfvars"
- C. terraform apply -var-file="testing.tfvars"
- D. terraform apply var-file="testing.tfvars"
正解: C
解説:
https://www.terraform.io/docs/configuration/variables.html
質問 204
Which of the below configuration file formats are supported by Terraform? (Select TWO)
- A. HCL
- B. Go
- C. Node
- D. YAML
- E. JSON
正解: A,E
解説:
Terraform supports both HashiCorp Configuration Language (HCL) and JSON formats for configurations.
https://www.terraform.io/docs/configuration/
質問 205
How would you reference the attribute "name* of this fictitious resource in HCL?
- A. kubernetes_namespace.test.name
- B. kubernetes_namespace.example,name
- C. resource.kubrnetes_namespace>example.name
- D. data kubernetes_namespace.name
- E. None of the above
正解: B
質問 206
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
質問 207
Which of the below datatype is not supported by Terraform.
- A. List
- B. Array
- C. Map
- D. Object
正解: B
質問 208
What does the default "local" Terraform backend store?
- A. tfplan files
- B. State file
- C. Provider plugins
- D. Terraform binary
正解: B
解説:
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
Reference: https://www.terraform.io/docs/language/settings/backends/local.html
質問 209
......
注目すべき時短になるTA-002-Pオールインワン試験ガイド:https://www.passtest.jp/HashiCorp/TA-002-P-shiken.html
検証された材料は決まってこれ!TA-002-P:https://drive.google.com/open?id=1pTo3nH1scLJj9IFBUynkzNCfuxh0U-32