
検証済みTA-002-P問題集PDF資料 [2023]
最新のTA-002-P実際の無料試験問題更新された94問あります
この試験は、インフラストラクチャのコード化、リソース管理、構成、状態管理など、Terraformに関連する広範なトピックをカバーしています。候補者は、Terraformのワークフローを確実に理解し、ツールを使用してインフラストラクチャを管理するためのベストプラクティスを適用できることが期待されています。試験では、一般的な問題のトラブルシューティング能力や、Terraform CLIを使用してインフラストラクチャと対話する能力も評価されます。
HashiCorp TA-002-P試験は、クラウドインフラストラクチャと自動化の分野で広く認知されている専門家認定資格であるHashiCorp Certified: Terraform Associate認定試験です。この試験は、インフラストラクチャのコード(IaC)管理のためのオープンソースツールであるTerraformを使用する専門家のスキルと知識を検証するために設計されています。
HashiCorp TA-002-P試験に備えて、候補者はオンラインで利用可能な様々なリソースを活用することができます。HashiCorpは、試験目的を詳細にカバーする学習ガイドを提供しています。また、HashiCorpが提供するトレーニングコースに参加することもできます。これらのコースでは、Terraformを使用してインフラストラクチャを展開および管理するための実践的な経験を提供します。
質問 # 45
A Terraform provisioner must be nested inside a resource configuration block.
- A. False
- B. True
正解:B
解説:
Explanation
Most provisioners require access to the remote resource via SSH or WinRM, and expect a nested connection
block with details about how to connect.
Reference: https://www.terraform.io/docs/language/resources/provisioners/connection.html
質問 # 46
ABC Enterprise has recently tied up with multiple small organizations for exchanging database information. Due to this, the firewall rules are increasing and are more than 100 rules. This is leading firewall configuration file that is difficult to manage. What is the way this type of configuration can be managed easily?
- A. Dynamic Blocks
- B. Terraform Backends
- C. Terraform Functions
- D. Terraform Expression
正解:A
質問 # 47
After creating a new workspace "PROD" you need to run the command terraform select PROD to switch to it.
- A. False
- B. True
正解:A
解説:
By default, when you create a new workspace you are automatically switched to it To create a new workspace and switch to it, you can use terraform workspace new <new_workspace_name>; to switch to a existing workspace you can use terraform workspace select <existing_workspace_name>; Example:
$ terraform workspace new example
Created and switched to workspace "example"!
You're now on a new, empty workspace. Workspaces isolate their state, so if you run "terraform plan" Terraform will not see any existing state for this configuration.
質問 # 48
A single terraform resource file that defines an aws_instance resource can simply be renamed to vsphere_virtual_machine in order to switch cloud providers.
- A. False
- B. True
正解:A
解説:
Explanation
Every provider has its own required and allowed declarations none of which match between cloud providers.
質問 # 49
You want to use terraform import to start managing infrastructure that was not originally provisioned through infrastructure as code. Before you can import the resource's current state, what must you do in order to prepare to manage these resources using Terraform?
- A. Shut down or stop using the resources being imported so no changes are inadvertently missed.
- B. Run terraform refresh to ensure that the state file has the latest information for existing resources.
- C. Update the configuration file to include the new resources.
- D. Modify the Terraform state file to add the new resources.
正解:C
解説:
The current implementation of Terraform import can only import resources into the state. It does not generate configuration. A future version of Terraform will also generate configuration.
Because of this, prior to running terraform import it is necessary to write manually a resource configuration block for the resource, to which the imported object will be mapped.
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.
質問 # 50
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install
the new provider?
- A. Run terraform apply -upgrade
- B. Run terraform refresh
- C. Run terraform init -upgrade
- D. Upgrade your version of Terraform
正解:C
解説:
Explanation
[-upgrade] - Opt to upgrade modules and plugins as part of their respective installation steps. See the sections
below for more details. Reference: https://www.terraform.io/cli/commands/init#upgrade
質問 # 51
Which Terraform command will check and report errors within modules, attribute names, and value types to make sure they are syntactically valid and internally consistent?
- A. terraform show
- B. terraform fmt
- C. terraform validate
- D. terraform format
正解:C
解説:
The terraform validate command validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc.
Validate runs checks that verify whether a configuration is syntactically valid and internally consistent, regardless of any provided variables or existing state. It is thus primarily useful for general verification of reusable modules, including the correctness of attribute names and value types.
It is safe to run this command automatically, for example as a post-save check in a text editor or as a test step for a re-usable module in a CI system.
質問 # 52
Why might a user opt to include the following snippet in their configuration file?
- A. The user wants to ensure that the application being deployed is a minimum version of 0.12
- B. this ensures that all Terraform providers are above a certain version to match the application being deployed
- C. versions before Terraform 0.12 were not approved by HashiCorp to be used in production
- D. Terraform 0.12 introduced substantial changes to the syntax used to write Terraform configuration
正解:D
質問 # 53
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. Remote Backends
- D. Local Backends
正解:C
解説:
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
質問 # 54
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. Sentinel
- C. Workspaces
- D. Module registry
正解:B
解説:
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
質問 # 55
Which are examples of infrastructure as code? Choose two correct answers.
- A. Cloned virtual machine images
- B. Change management database records
- C. Versioned configuration files
- D. Doctor files
正解:C
解説:
These are examples of infrastructure as code (IaC), which is a practice of managing and provisioning infrastructure through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.
質問 # 56
Please identify the offerings which are unique to Terraform Enterprise, and not available in either Terraform OSS, or Terraform Cloud. Select four.
- A. Sentinel
- B. Private Network Connectivity
- C. VCS Integration
- D. Audit Logs
- E. Clustering
正解:B、D、E
解説:
https://www.hashicorp.com/products/terraform/pricing/
質問 # 57
How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? (Choose
two.)
- A. A request must be submitted for infrastructure changes
- B. As additional resources are required, more tickets are submitted
- C. A full audit trail of the request and fulfillment process is generated
- D. A catalog of approved resources can be accessed from drop down lists in a request form
正解:A、B
質問 # 58
Given the below resource configuration -
resource "aws_instance" "web" { # ... count = 4 }
What does the terraform resource address aws_instance.web refer to?
- A. The above will result in a syntax error , as it is not syntactically correct . Resources defined using count ,
can only be referenced using indexes. - B. It refers to the last web EC2 instance , as by default , if no index is provided , the last / N-1 index is
used. - C. It refers to all 4 web instances , together , for further individual segregation , indexing is required , with
a 0 based index. - D. It refers to the first web EC2 instance out of the 4 ,as by default , if no index is provided , the first / 0th
index is used.
正解:C
解説:
Explanation
A Resource Address is a string that references a specific resource in a larger infrastructure. An address is made
up of two parts:
[module path][resource spec]
Module path:
A module path addresses a module within the tree of modules. It takes the form:
module.A.module.B.module.C...
Multiple modules in a path indicate nesting. If a module path is specified without a resource spec, the address
applies to every resource within the module. If the module path is omitted, this addresses the root module.
Given a Terraform config that includes:
resource "aws_instance" "web" {
# ...
count = 4
}
An address like this:
aws_instance.web[3]
Refers to only the last instance in the config, and an address like this:
aws_instance.web
Refers to all four "web" instances.
https://www.terraform.io/docs/internals/resource-addressing.html
質問 # 59
You need to specify a dependency manually. What resource meta-parameter can you use lo make sure Terraform respects thee dependency?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
正解:
解説:
dependson
質問 # 60
All modules published on the official Terraform Module Registry have been verified by HashiCorp.
- A. False
- B. True
正解:B
質問 # 61
terraform validate validates the syntax of Terraform files.
- A. False
- B. True
正解:B
解説:
Explanation
https://www.terraform.io/cli/commands/validate
The terraform validate command validates the syntax and arguments of the Terraform configuration files.
Reference: https://www.terraform.io/docs/cli/code/index.html
質問 # 62
Multiple configurations for the same provider can be used in a single configuration file.
- A. False
- B. True
正解:B
解説:
You can optionally define multiple configurations for the same provider, and select which one to use on a per-resource or per-module basis. The primary reason for this is to support multiple regions for a cloud platform; other examples include targeting multiple Docker hosts, multiple Consul hosts, etc.
To include multiple configurations for a given provider, include multiple provider blocks with the same provider name, but set the alias meta-argument to an alias name to use for each additional configuration. For example:
# The default provider configuration
provider "aws" {
region = "us-east-1"
}
# Additional provider configuration for west coast region
provider "aws" {
alias = "west"
region = "us-west-2"
}
The provider block without alias set is known as the default provider configuration. When alias is set, it creates an additional provider configuration. For providers that have no required configuration arguments, the implied empty configuration is considered to be the default provider configuration.
https://www.terraform.io/docs/configuration/providers.html#alias-multiple-provider-instances
質問 # 63
Why is it a good idea to declare the required version of a provider in a Terraform configuration file?
1. terraform
2. {
3. required_providers
4. {
5. aws = "~> 1.0"
6. }
7. }
- A. Providers are released on a separate schedule from Terraform itself; therefore a newer version could
introduce breaking changes. - B. To remove older versions of the provider.
- C. To ensure that the provider version matches the version of Terraform you are using.
- D. To match the version number of your application being deployed via Terraform.
正解:A
質問 # 64
Terraform providers are always installed from the Internet.
- A. False
- B. True
正解:A
解説:
Explanation
Terraform configurations must declare which providers they require, so that Terraform can install and use them.
Reference: https://www.terraform.io/docs/language/providers/configuration.html
質問 # 65
Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.
- A. False
- B. True
正解:B
質問 # 66
Which command lets you experiment with Terraform's built-in functions?
- A. terraform env
- B. terraform console
- C. terraform validate
- D. terraform test
正解:B
解説:
Explanation
https://www.terraform.io/cli/commands/console
質問 # 67
After running into issues with Terraform, you need to enable verbose logging to assist with troubleshooting the
error. Which of the following values provides the MOST verbose logging?
- A. INFO
- B. ERROR
- C. WARN
- D. TRACE
- E. DEBUG
正解:D
解説:
Explanation
Terraform has detailed logs that 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.
Examples:
export TF_LOG=DEBUG
export TF_LOG=TRACE
質問 # 68
Which of the following terraform subcommands could be used to remove the lock on the state for the current configuration?
- A. Unlock
- B. force-unlock
- C. Removing the lock on a state file is not possible
- D. state-unlock
正解:B
解説:
https://www.terraform.io/docs/commands/force-unlock.html
質問 # 69
......
TA-002-P認定概要最新のTA-002-PPDF問題集はこちら:https://jp.fast2test.com/TA-002-P-premium-file.html