[Q11-Q36] 最高のTA-002-PのPDF問題集100%GoShiken試験合格率保証 [2024年04月]

Share

最高のTA-002-PのPDF問題集100%GoShiken試験合格率保証 [2024年04月]

GoShikenの問題集で100%あなたのTA-002-P HashiCorp Certified: Terraform Associate試験を一発合格


HashiCorpのTA-002-P試験は、90分以内に60問の選択肢問題に回答する試験です。試験の範囲は、インフラストラクチャーに関する基本的なこと、Terraformを使用したインフラストラクチャーの管理方法、そしてTerraformコードの書き方など、Terraformに関する広範なトピックをカバーしています。試験に合格するためには、少なくとも70%のスコアを取る必要があります。

 

質問 # 11
You have a Terraform configuration that defines a single virtual machine with no references to it. You have
run terraform apply to create the resource, and then removed the resource definition from your Terraform
configuration file.
What will happen when you run terraform apply in the working directory again?

  • A. Nothing
  • B. Terraform will destroy the virtual machine
  • C. Terraform will remove the virtual machine from the state file, but the resource will still exist
  • D. Terraform will error

正解:B

解説:
Explanation
If you remove the resource from your config file and the resource is in your state file, terraform will apply the
configuration in the config file - which is to delete the resource


質問 # 12
What are some of the problems of how infrastructure was traditionally managed before Infrastructure as Code? (select three)

  • A. Requests for infrastructure or hardware required a ticket, increasing the time required to deploy applications
  • B. Traditional deployment methods are not able to meet the demands of the modern business where resources tend to live days to weeks, rather than months to years
  • C. Traditionally managed infrastructure can't keep up with cyclic or elastic applications
  • D. Pointing and clicking in a management console is a scalable approach and reduces human error as businesses are moving to a multi-cloud deployment model

正解:A、B、C

解説:
Businesses are making a transition where traditionally-managed infrastructure can no longer meet the demands of today's businesses. IT organizations are quickly adopting the public cloud, which is predominantly API-driven. To meet customer demands and save costs, application teams are architecting their applications to support a much higher level of elasticity, supporting technology like containers and public cloud resources. These resources may only live for a matter of hours; therefore the traditional method of raising a ticket to request resources is no longer a viable option Pointing and clicking in a management console is NOT scale and increases the change of human error.


質問 # 13
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. Module registry
  • B. Sentinel
  • C. Functions
  • D. Workspaces

正解: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


質問 # 14
Using the terraform state rm command against a resource will destroy it.

  • A. True
  • B. False

正解:B


質問 # 15
Terraform providers are always installed from the Internet.

  • A. True
  • B. False

正解:B

解説:
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


質問 # 16
Which of the following type of variable allows multiple values of several distinct types to be grouped together as a single value?

  • A. List
  • B. Tuple
  • C. Map
  • D. Object

正解:B、D

解説:
Structural type of variable allows multiple values of several distinct types to be grouped together as a single value. They require a schema as an argument, to specify which types are allowed for which elements.
https://www.terraform.io/docs/configuration/types.html


質問 # 17
A provider configuration block is required in every Terraform configuration.
Example:

  • A. True
  • B. False

正解:A

解説:
Reference: https://github.com/hashicorp/terraform/issues/17928


質問 # 18
Which provider authentication method prevents credentials from being stored in the state file?

  • A. Specifying the login credentials in the provider block
  • B. Setting credentials as Terraform variables
  • C. None of the above
  • D. Using environment variables

正解:D


質問 # 19
Ric wants to enable detail logging and he wants highest verbosity of logs. Which of the following environment variable settings is correct option for him to select.

  • A. Set TF_LOG = DEBUG
  • B. Set VAR_TF = TRACE
  • C. Set VAR_TF_LOG = TRACE
  • D. Set TF_LOG = TRACE

正解:D

解説:
https://www.terraform.io/docs/internals/debugging.html


質問 # 20
How do you specify a module's version when publishing it to the public terraform Module Registry?

  • A. Mention it on the module's configuration page on the Terraform Module Registry
  • B. The Terraform Module Registry does not support versioning modules
  • C. Tag a release in the associated repo
  • D. Configuration it in the module's Terraform code

正解:C

解説:
This is how you specify a module's version when publishing it to the public Terraform Module Registry, as it uses the tags from your version control system (such as GitHub or GitLab) to identify module versions. You need to use semantic versioning for your tags, such as v1.0.0.


質問 # 21
Which of the following is the right substitute for static values that can make Terraform configuration file more
dynamic and reusable?

  • A. Output value
  • B. Modules
  • C. Input parameters
  • D. Functions

正解: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.


質問 # 22
When you use a remote backend that needs authentication. HashrCorp recommends that you:

  • A. Write the authentication credentials in the Terraform configuration files
  • B. Keep the Terraform configuration files in a secret store
  • C. Push your Tefraform configuration to an encrypted git repository
  • D. Use partial configuration to load the authentication credentials outside of the Terraform code

正解:D

解説:
Explanation
We recommend omitting the token from the configuration, and instead using terraform login or manually
configuring credentials in the CLI config file. Reference:
https://www.terraform.io/language/settings/backends/remote


質問 # 23
While attempting to deploy resources into your cloud provider using Terraform. you begin to see some odd behavior and experience sluggish responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform's logging more verbose?

  • A. TF_10G_PATM
  • B. TF_LOG
  • C. TF.LOG.FUE
  • D. TF_10G_LEVEL

正解:B


質問 # 24
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

正解:C

解説:
The -var and -var-file methods of assigning variables have the highest precedence.
https://www.terraform.io/docs/configuration/variables.html


質問 # 25
In terraform, most resource dependencies are handled automatically. Which of the following statements describes best how terraform resource dependencies are handled?

  • A. Resource dependencies are identified and maintained in a file called resource.dependencies. Each terraform provider is required to maintain a list of all resource dependencies for the provider and it's included with the plugin during initialization when terraform init is executed. The file is located in the terraform.d folder.
  • B. The terraform binary contains a built-in reference map of all defined Terraform resource dependencies. Updates to this dependency map are reflected in terraform versions. To ensure you are working with the latest resource dependency map you much be running the latest version of Terraform.
  • C. Resource dependencies are handled automatically by the depends_on meta_argument, which is set to true by default.
  • D. Terraform analyses any expressions within a resource block to find references to other objects, and treats those references as implicit ordering requirements when creating, updating, or destroying resources.
    Explanation
    https://www.terraform.io/docs/configuration/resources.html

正解:D


質問 # 26
When using parent/child modules to deploy infrastructure, how would you export a value from one module to import into another module.
For example, a module dynamically deploys an application instance or virtual machine, and you need the IP address in another module to configure a related DNS record in order to reach the newly deployed application.

  • A. Configure the pertinent provider's configuration with a list of possible IP addresses to use.
  • B. Configure an output value in the application module in order to use that value for the DNS module.
  • C. Preconfigure the IP address as a parameter in the DNS module.
  • D. Export the value using terraform export and input the value using terraform input.

正解:B

解説:
Explanation
Output values are like the return values of a Terraform module, and have several uses:
* A child module can use outputs to expose a subset of its resource attributes to a parent module.
* A root module can use outputs to print certain values in the CLI output after running terraform apply.
* When using remote state, root module outputs can be accessed by other configurations via a terraform_remote_state data source.
https://www.terraform.io/docs/configuration/outputs.html


質問 # 27
After creating a new workspace "PROD" you need to run the command terraform select PROD to switch to it.

  • A. True
  • B. False

正解:B

解説:
Explanation
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.


質問 # 28
Which of the following statements best describes the Terraform list(...) type?

  • A. a collection of named attributes that each have their own type.
  • B. a sequence of values identified by consecutive whole numbers starting with zero.
  • C. a collection of unique values that do not have any secondary identifiers or ordering.
  • D. a collection of values where each is identified by a string label.

正解:B

解説:
Explanation
A terraform list is a sequence of values identified by consecutive whole numbers starting with zero. https://www.terraform.io/docs/configuration/types.html#structural-types


質問 # 29
In order to make a Terraform configuration file dynamic and/or reusable, static values should be converted to use what?

  • A. Regular Expressions
  • B. Input Parameters
  • C. Module
  • D. Output Value

正解:B

解説:
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


質問 # 30
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. What command will do this?

  • A. terraform refresh
  • B. terraform apply
  • C. terraform graph
  • D. terraform taint

正解:D

解説:
Explanation
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


質問 # 31
In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start
automatically when you merge or commit changes to version control.

  • A. True
  • B. False

正解:B


質問 # 32
Complete the following sentence:
For local state, the workspaces are stored directly in a ___________.

  • A. directory called terraform.workspaces.tfstate
  • B. directory called terraform.tfstate.d
  • C. a file called terraform.tfstate
  • D. a file called terraform.tfstate.backup

正解:B

解説:
For local state, Terraform stores the workspace states in a directory called terraform.tfstate.d.
https://www.terraform.io/docs/state/workspaces.html#workspace-internals


質問 # 33
Which of the following statements best describes the Terraform list(...) type?

  • A. a sequence of values identified by consecutive whole numbers starting with zero.
  • B. a collection of named attributes that each have their own type.
    Explanation
    A terraform list is a sequence of values identified by consecutive whole numbers starting with zero. https://www.terraform.io/docs/configuration/types.html#structural-types
  • C. a collection of unique values that do not have any secondary identifiers or ordering.
  • D. a collection of values where each is identified by a string label.

正解:A


質問 # 34
What is the default backend for Terraform?

  • A. gcs
  • B. local
  • C. etcd
  • D. consul

正解:B

解説:
By default, Terraform uses the "local" backend, which is the normal behavior of Terraform you're used to.
https://www.terraform.io/docs/backends/index.html


質問 # 35
John is writing a module and within the module, there are multiple places where he has to use the same conditional expression but he wants to avoid repeating the same values or expressions multiple times in a configuration,. What is a better approach to dealing with this?

  • A. Variables
  • B. Local Values
  • C. Functions
  • D. Expressions

正解:B

解説:
Explanation
A local value assigns a name to an expression, allowing it to be used multiple times within a module without repeating it.
https://www.terraform.io/docs/configuration/locals.html


質問 # 36
......

トレンドなTA-002-PのPDF問題集を受験前に使おう:https://www.goshiken.com/HashiCorp/TA-002-P-mondaishu.html

リアル試験問題と解答でHashiCorp TA-002-P問題集が待ってます:https://drive.google.com/open?id=19FmS7T7rZ2e5wXCpnagGukplgbDfaz3I