[2023年10月15日] TA-002-PのPDF問題とテストエンジンには94問があります [Q52-Q70]

Share

[2023年10月15日] TA-002-PのPDF問題とテストエンジンには94問があります

更新された試験エンジンはTA-002-P試験無料お試しサンプル365日更新されます

質問 # 52
You have provisioned some aws resources in your test environment through Terraform for a POC work. After the POC, now you want to destroy the resources but before destroying them you want to check what resources will be getting destroyed through terraform. what are the options of doing that? (Select TWO)

  • A. This is not possible
  • B. Use terraform destroy command
  • C. Use terraform plan command
  • D. Use terraform plan -destroy command.

正解:B、D

解説:
Explanation
https://learn.hashicorp.com/terraform/getting-started/destroy


質問 # 53
What is the command you can use to set an environment variable named "var1"of type String?

  • A. export TF_VAR_var1
  • B. variable "var1" { type = "string"}
  • C. export TF_VAR_VAR1
  • D. set TF_VAR_var1

正解:A

解説:
The environment variable must be in the format TF_VAR_name, so for the


質問 # 54
Taint the resource "aws_instance" "baz" resource that lives in module bar which lives in module foo.

  • A. terraform taint module.foo.module.bar.aws_instance.baz
  • B. terraform taint module.foo.module.bar.baz
  • C. terraform taint module.foo.bar.aws_instance.baz
  • D. terraform taint foo.bar.aws_instance.baz

正解:A

解説:
Check resource addressing
https://www.terraform.io/docs/internals/resource-addressing.html


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

  • A. False
  • B. True

正解:A

解説:
Explanation
Unlike many other objects in the Terraform language, a provider block may be omitted if its contents would
otherwise be empty. Terraform assumes an empty default configuration for any provider that is not explicitly
configured. https://www.terraform.io/language/providers/configuration


質問 # 56
terraform validate confirms that your infrastructure matches the Terraform state file.

  • A. False
  • B. True

正解:A

解説:
terraform validate does not confirm that your infrastructure matches the Terraform state file. It only checks whether the configuration files in a directory are syntactically valid and internally consistent3. To confirm that your infrastructure matches the Terraform state file, you need to use terraform plan or terraform apply with the -refresh-only option.


質問 # 57
terraform validate validates the syntax of Terraform files.

  • A. False
  • B. True

正解:B

解説:
Explanation
The terraform validate command validates the syntax and arguments of the Terraform configuration files.
Reference: https://www.terraform.io/docs/cli/code/index.html


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

  • A. False
  • B. True

正解:A

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


質問 # 59
What does the default "local" Terraform backend store?

  • A. State file
  • B. Terraform binary
  • C. tfplan files
  • D. Provider plugins

正解:A

解説:
The default "local" Terraform backend stores the state file in a local file named terraform.tfstate, which can be used to track and manage the state of your infrastructure3.


質問 # 60
Which of the following best describes a Terraform provider?

  • A. A plugin that Terraform uses to translate the API interactions with the service or provider.
  • B. Serves as a parameter for a Terraform module that allows a module to be customized.
  • C. Describes an infrastructure object, such as a virtual network, compute instance, or other components.
  • D. A container for multiple resources that are used together.

正解:A

解説:
A provider is responsible for understanding API interactions and exposing resources. Providers generally are an IaaS (e.g. Alibaba Cloud, AWS, GCP, Microsoft Azure, OpenStack), PaaS (e.g. Heroku), or SaaS services (e.g. Terraform Cloud, DNSimple, Cloudflare).
https://www.terraform.io/docs/providers/index.html


質問 # 61
You have declared a variable called var.list which is a list of objects that all have an attribute id.
Which options will produce a list of the IDs? (Choose two.)

  • A. var.list[*].id
  • B. [ var.list[*].id ]
  • C. [ for o in var.list : o.id ]
  • D. { for o in var.list : o => o.id }

正解:A、C

解説:
Explanation
https://www.terraform.io/language/expressions/splat
A splat expression provides a more concise way to express a common operation that could otherwise be
performed with a for expression.


質問 # 62
You much initialize your working directory before running terraform validate.

  • A. False
  • B. True

正解:B

解説:
You must initialize your working directory before running terraform validate, as it will ensure that all the required plugins and modules are installed and configured properly. If you skip this step, you may encounter errors or inconsistencies when validating your configuration files.


質問 # 63
Which of the following terraform subcommands could be used to remove the lock on the state for the current configuration?

  • A. Unlock
  • B. state-unlock
  • C. force-unlock
  • D. Removing the lock on a state file is not possible

正解:C

解説:
Explanation
https://www.terraform.io/docs/commands/force-unlock.html


質問 # 64
You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (* files). You need to enable additional logging messages to find this out. Which of the following would achieve this?

  • A. Set verbose for each provider in your Terraform configuration
  • B. Set the environment variable TF_LOG_TRACE
  • C. Set the environment variable TF_LOG_PATH
  • D. Set the environment variable TF_log_TRACE

正解:B

解説:
This will enable additional logging messages to find out from which paths Terraform is loading providers referenced in your Terraform configuration files, as it will set the log level to TRACE, which is the most verbose and detailed level.


質問 # 65
When using multiple configurations of the same Terraform provider, what meta-argument must be included in any non-default provider configurations?

  • A. id
  • B. name
  • C. depends_on
  • D. alias

正解:D


質問 # 66
Command terraform refresh will update state file?

  • A. False
  • B. True

正解:B

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


質問 # 67
Terraform Enterprise currently supports running under which the following operating systems?

  • A. Ubuntu
  • B. Oracle Linux
  • C. Amazon Linux
  • D. Red Hat Enterprise Linux
  • E. Debian
  • F. CentOS

正解:A、B、C、D、E、F

解説:
Explanation
Terraform Enterprise runs on Linux instances, and you must prepare a running Linux instance for Terraform
Enterprise before running the installer. You will start and manage this instance like any other server.
Terraform Enterprise currently supports running under the following operating systems:
Standalone deployment:
Debian 7.7+
Ubuntu 14.04.5 / 16.04 / 18.04
Red Hat Enterprise Linux 7.4 - 7.8
CentOS 6.x / 7.4 - 7.8
Amazon Linux 2014.03 / 2014.09 / 2015.03 / 2015.09 / 2016.03 / 2016.09 / 2017.03 / 2017.09 / 2018.03 / 2.0
Oracle Linux 7.4 - 7.8
https://www.terraform.io/docs/enterprise/before-installing/index.html


質問 # 68
Terraform import command can import resources into modules as well directly into the root of your state.

  • A. False
  • B. True

正解:B

解説:
Explanation
Import will find the existing resource from ID and import it into your Terraform state at the given ADDRESS.
ADDRESS must be a valid resource address. Because any resource address is valid, the import command can
import resources into modules as well directly into the root of your state.
Terraform is able to import existing infrastructure. This allows us take resources we've created by some other
means (i.e. via console) and bring it under Terraform management.
This is a great way to slowly transition infrastructure to Terraform.
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. For 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.
As a result of the above command, the resource is recorded in the state file. We can now run terraform plan to
see how the configuration compares to the imported resource, and make any adjustments to the configuration
to align with the current (or desired) state of the imported object.
https://www.terraform.io/docs/commands/import.html


質問 # 69
What is a downside to using the Vault provider to read secrets from Vault?

  • A. Secrets are persisted to the state file and plans.
  • B. Terraform and Vault must be running on the same version.
  • C. Terraform requires a unique auth method to work with Vault.
  • D. Terraform and Vault must be running on the same physical host.

正解:A

解説:
Explanation
The Vault provider allows Terraform to read from, write to, and configure Hashicorp Vault.
Interacting with Vault from Terraform causes any secrets that you read and write to be persisted in both Terraform's state file and in any generated plan files. For any Terraform module that reads or writes Vault secrets, these files should be treated as sensitive and protected accordingly.


質問 # 70
......


TA-002試験では、Terraformの基礎、コード概念などのインフラストラクチャ、Terraformワークフロー、Terraformモジュール、Terraformプロバイダーなどのトピックをカバーしています。候補者は、Terraformの構成を書き、計画、適用する能力、およびTerraformの状態管理、リソースの依存関係、およびリモートバックエンドの理解について評価されます。この試験は、候補者の実践的なスキルと知識をテストするように設計されており、記憶に基づいた試験ではありません。

 

試験合格保証TA-002-P試験には正確な問題解答付き:https://www.goshiken.com/HashiCorp/TA-002-P-mondaishu.html

テストエンジンの練習テストならこれTA-002-P有効で更新された問題集:https://drive.google.com/open?id=192LkRgZwdoZigT3jKwQjNCFjQyFOXx9S