TA-002-P練習テスト問題は更新された450問題あります
HashiCorp TA-002-P問題集で一発合格できる問題を試そう!
HashiCorp TA-002-P 認定試験の出題範囲:
| トピック | 出題範囲 |
|---|---|
| トピック 1 |
|
| トピック 2 |
|
| トピック 3 |
|
| トピック 4 |
|
| トピック 5 |
|
| トピック 6 |
|
| トピック 7 |
|
| トピック 8 |
|
| トピック 9 |
|
| トピック 10 |
|
| トピック 11 |
|
| トピック 12 |
|
質問 145
A user runs terraform init on their RHEL based server and per the output, two provider plugins are downloaded: $ terraform init Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...
- Downloading plugin for provider "random" (hashicorp/random) 2.2.1...
:
Terraform has been successfully initialized! Where are these plugins downloaded to?
- A. The .terraform/plugins directory in the directory terraform init was executed in.
- B. The .terraform.plugins directory in the directory terraform init was executed in.
- C. /etc/terraform/plugins
- D. The .terraform.d directory in the directory terraform init was executed in.
正解: A
質問 146
You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead.
What are the two things you must do to achieve this? (Choose two.)
- A. Run the terraform import-gcp command
- B. Provision new VMs using Terraform with the same VM names
- C. Use the terraform import command for the existing VMs
- D. Write Terraform configuration for the existing VMs
正解: A,C
解説:
Explanation
The terraform import command is used to import existing infrastructure. Import existing Google Cloud resources into Terraform with Terraformer.
Reference: https://www.terraform.io/docs/cli/import/usage.html https://cloud.google.com/docs/terraform
質問 147
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. VCS Integration
- C. Audit Logs
- D. Private Network Connectivity
- E. Clustering
正解: C,D,E
解説:
Explanation
https://www.hashicorp.com/products/terraform/pricing/
質問 148
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.
- A. False
- B. True
正解: B
質問 149
Where in your Terraform configuration do you specify a state backend?
- A. The datasource block
- B. The provider block
- C. The terraform block
- D. The resource block
正解: C
解説:
Explanation
Backends are configured with a nested backend block within the top-level terraform block.
Reference: https://www.terraform.io/docs/language/settings/backends/configuration.html
https://www.terraform.io/language/settings/backends/configuration#using-a-backend-block
質問 150
In the below configuration, how would you reference the module output vpc_id?
Type your answer in the field provided. The text field is not case sensitive and all variations of the correct
answer are accepted.
正解:
解説:
module.vpc.vpc_id
https://cloudcasts.io/course/terraform/community-vpc-module
質問 151
You cannot install third party plugins using terraform init.
- A. True
- B. False
正解: B
解説:
Explanation
https://www.terraform.io/cli/commands/init
For providers that are published in either the public Terraform Registry or in a third-party provider registry,
terraform init will automatically find, download, and install the necessary provider plugins.
質問 152
terraform init initializes a sample main.tf file in the current directory.
- A. True
- B. False
正解: B
解説:
Reference: https://www.terraform.io/docs/cli/commands/init.html
質問 153
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. VCS Integration
- C. Audit Logs
- D. Private Network Connectivity
- E. Clustering
正解: C,D,E
解説:
https://www.hashicorp.com/products/terraform/pricing/
質問 154
When does Sentinel enforce policy logic during a Terraform Enterprise run?
- A. Before the a apply phase
- B. After the apply phase
- C. Before the plan phase
- D. During the plan phase
正解: A
解説:
Explanation
"Enforcing policy checks on runs - Policies are checked when a run is performed, after the terraform plan but
before it can be confirmed or the terraform apply is executed."
質問 155
Refer to the following terraform variable definition
variable "track_tag" { type = list default = ["data_ec2","integration_ec2","digital_ec2"]} track_tag = { Name = element(var.track_tag,count.index)} If count.index is set to 2, which of the following values will be assigned to the name attribute of track_tag variable?
- A. digital_ec2
- B. integration_ec2
- C. data_ec2
- D. track_tag
正解: A
質問 156
After creating a new workspace "PROD" you need to run the command terraform select PROD to switch to it.
- A. True
- B. False
正解: B
解説:
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.
質問 157
How does Terraform handle working with so many providers?
- A. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in a shared, system-wide plugins directory.
- B. Terraform ships with all of the plugins embedded in the Terraform binary.
- C. Terraform allows you to select the providers you want to support during the Terraform installation process.
- D. Terraform uses a plugin architecture for providers and only installs the provider plugins required by your configuration in the configuration's working directory.
正解: D
解説:
Explanation
Terraform is built on a plugin-based architecture. All providers and provisioners that are used in Terraform configurations are plugins, even the core types such as AWS and Heroku. Users of Terraform are able to write new plugins in order to support new functionality in Terraform.
質問 158
Which argument(s) are required when declaring a Terraform variable?
- A. All of the above
- B. description
- C. None of the above
- D. type
- E. default
正解: C
解説:
Explanation
Terraform CLI defines the following OPTIONAL arguments for variable declarations:
default - A default value which then makes the variable optional.
type - This argument specifies what value types are accepted for the variable.
description - This specifies the input variable's documentation.
validation - A block to define validation rules, usually in addition to type constraints.
sensitive - Limits Terraform UI output when the variable is used in configuration.
nullable - Specify if the variable can be null within the module.
https://www.terraform.io/language/values/variables#arguments
質問 159
Which of the below options is the equivalent Terraform 0.12 version of the snippet which is written in Terraform 0.11?
"${var.instance_id}"
- A. var.instance_id
- B. variable.instance_id
- C. None of the above
- D. var.instance_ids
正解: A
質問 160
Which of the following statements about local modules is incorrect:
- A. All of the above (all statements above are incorrect
- B. Local modules are sourced from a directory on disk
- C. Local modules support versions
- D. Local modules are not cached by terraform init command
- E. None of the above (all statements above are correct)
正解: C
解説:
Explanation
Version constraints are supported only for modules installed from a module registry, such as the public
Terraform Registry or Terraform Cloud's private module registry. Other module sources can provide their own
versioning mechanisms within the source string itself, or might not support versions at all. In particular,
modules sourced from local file paths do not support version; since they're loaded from the same source
repository, they always share the same version as their caller.
https://www.terraform.io/language/modules/syntax
質問 161
A colleague has informed you that a new version of a Terraform module that your team hosts on an Amazon S3 bucket is broken. The Amazon S3 bucket has versioning enabled. Your colleague tells you to make sure you are not using the latest version in your configuration. You have the following configuration block in your code that refers to the module:
module "infranet" { source = "s3::https://s3-us-west-2.amazonaws.com/infrabucket/infra_module.zip"} What is the best way to ensure that you are not using the latest version of the module?
- A. Add a version key to the module configuration and specify a previous version.
- B. Add a module version constraint in your configuration's backend block and specify a previous version.
- C. Delete the latest version of the module in S3 to rollback to the previous version.
- D. Add a version property to the module in Terraform's state file and specify a previous version.
正解: C
解説:
Explanation
Version constraints are supported only for modules installed from a module registry, such as the Terraform Registry or Terraform Cloud's private module registry. Other module sources can provide their own versioning mechanisms within the source string itself, or might not support versions at all. In particular, modules sourced from local file paths do not support version; since they're loaded from the same source repository.
Only Terraform Registries support module versioning by using the version key, one cannot configure a previous version of the module in the configuration. Deleting the latest version of the module in S3 is the only option of the available options that ensures you won't use the latest version. You could also modify the source URL to specify a versionId URL parameter for a previous version.
https://www.terraform.io/docs/configuration/modules.html#source
質問 162
What type of block is used to construct a collection of nested configuration blocks?
- A. nesting
- B. repeated
- C. dynamic
- D. for_each
正解: C
質問 163
Terraform can run on Windows or Linux, but it requires a Server version of the Windows operating system.
- A. False
- B. True
正解: B
解説:
Reference: https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows
質問 164
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
正解: D
解説:
The terraform workspace new command is used to create a new workspace.
https://www.terraform.io/docs/commands/workspace/new.html
質問 165
If you enable TF_LOG = DEBUG, the log will be stored in syslog.log file in the currect directory.
- A. True
- B. False
正解: B
解説:
https://www.terraform.io/docs/internals/debugging.html
質問 166
You have been working in a Cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that is listening on port 80. After some application changes, you updated the Terraform code to change the port to 443.
You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended, and step away to grab some coffee.
In the meantime, another team member manually changes the load balancer port to 443 through the Cloud provider console before you get back to your desk.
What will happen when you terraform apply upon returning to your desk?
- A. Terraform will not make any changes to the Load Balancer and will update the state file to reflect any changes made.
- B. Terraform will fail with in error because the state file is no longer accurate
- C. Terraform will change the load balancer port to 80, and) then change it back to 443
- D. Terraform will change the port back to 80 in your code
正解: A
質問 167
Your security team scanned some Terraform workspaces and found secrets stored in a plaintext in state files.
How can you protect sensitive data stored in Terraform state files?
- A. Delete the state file every time you run Terraform
- B. Store the state in an encrypted backend
- C. Always store your secrets in a secrets.tfvars file.
- D. Edit your state file to scrub out the sensitive data
正解: B
質問 168
......
HashiCorp TA-002-P試験問題集で[2023年最新] 練習有効な試験問題集解答:https://www.jpntest.com/shiken/TA-002-P-mondaishu
TA-002-P問題集を掴み取れ![最新2023]HashiCorp試験が合格できます:https://drive.google.com/open?id=1mr758aV75NeoNeO4ri_6dMdz56H2DxrV