合格できるHashiCorp Terraform-Associate-003のPDF問題集!最近更新された195問あります [Q42-Q57]

Share

合格できるHashiCorp Terraform-Associate-003のPDF問題集!最近更新された195問あります

更新されたテストエンジンTerraform-Associate-003練習問題集と練習試験合格させます

質問 # 42
You have to initialize a Terraform backend before it can be configured.

  • A. True
  • B. False

正解:B

解説:
You can configure a backend in your Terraform code before initializing it. Initializing a backend will store the state file remotely and enable features like locking and workspaces. Reference = [Terraform Backends]


質問 # 43
Which parameters does terraform import require? Choose two correct answers.

  • A. Resource address
  • B. Path
  • C. Resource ID
  • D. Provider

正解:A、C

解説:
Explanation
These are the parameters that terraform import requires, as they allow Terraform to identify the existing resource that you want to import into your state file, and match it with the corresponding configuration block in your files.


質問 # 44
Why does this backend configuration not follow best practices?

  • A. You should not store credentials in Terraform configuration
  • B. You should use the local enhanced storage backend whenever possible
  • C. The backend configuration should contain multiple credentials so that more than one user can execute terraform plan and terraform apply
  • D. An alias meta-argument should be included in backend blocks whenever possible

正解:A

解説:
This is a bad practice, as it exposes your credentials to anyone who can access your configuration files or state files. You should use environment variables, credential files, or other mechanisms to provide credentials to Terraform.


質問 # 45
Terraform providers are part of the Terraform core binary.

  • A. True
  • B. False

正解:B

解説:
Explanation
Terraform providers are not part of the Terraform core binary. Providers are distributed separately from Terraform itself and have their own release cadence and version numbers. Providers are plugins that Terraform uses to interact with various APIs, such as cloud providers, SaaS providers, and other services. You can find and install providers from the Terraform Registry, which hosts providers for most major infrastructure platforms. You can also load providers from a local mirror or cache, or develop your own custom providers.
To use a provider in your Terraform configuration, you need to declare it in the provider requirements block and optionally configure its settings in the provider block. References = : Providers - Configuration Language | Terraform : Terraform Registry - Providers Overview | Terraform


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

  • A. True
  • B. False

正解:B

解説:
Terraform providers are not always installed from the Internet. There are other ways to install provider plugins, such as from a local mirror or cache, from a local filesystemdirectory, or from a network filesystem.
These methods can be useful for offline or air-gapped environments, or for customizing the installation process. You can configure the provider installation methods using the provider_installation block in the CLI configuration file.


質問 # 47
All modules published on the official Terraform Module Registry have been verified by HasihCorp.

  • A. True
  • B. False

正解:B

解説:
Not all modules published on the official Terraform Module Registry have been verified by HashiCorp. While HashiCorp verifies some modules, there are many community-contributed modules that are not verified. Verified modules have a "Verified" badge indicating that HashiCorp has reviewed them for security and best practices, but the registry also includes unverified modules.
References:
Terraform Module Registry documentation: Terraform Registry


質問 # 48
What does Terraform not reference when running a terraform apply -refresh-only ?

  • A. Credentials
  • B. Terraform resource definitions in configuration files
  • C. State file
  • D. Cloud provider

正解:B

解説:
Explanation
When running a terraform apply -refresh-only, Terraform does not reference the configuration files, but only the state file, credentials, and cloud provider. The purpose of this command is to update the state file with the current status of the real resources, without making any changes to them1.


質問 # 49
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 the environment variable TF_LOG_PATH
  • B. Set the environment variable TF_log_TRACE
  • C. Set verbose for each provider in your Terraform configuration
  • D. Set the environment variable TF_LOG_TRACE

正解:D

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


質問 # 50
How would you reference the "name'' value of the second instance of this resource?

  • A. element(aws_instance.web, 2)
  • B. aws_instance.web(2),name
  • C. Aws_instance,web,* , name
  • D. aws_instance-web(1)
  • E. aws_instance_web(1),name

正解:E

解説:
In Terraform, when you use the count meta-argument, you can reference individual instances using an index. The indexing starts at 0, so to reference the "name" value of the second instance, you would use aws_instance.web[1].name. This syntax allows you to access the properties of specific instances in a list generated by the count argument.
References:
Terraform documentation on count and accessing resource instances: Terraform Count


質問 # 51
Which of the following is not a key principle of infrastructure as code?

  • A. Golden images
  • B. Versioned infrastructure
  • C. Idempotence
  • D. Self-describing infrastructure

正解:A

解説:
The key principle of infrastructure as code that is not listed among the options is golden images. Golden images are pre-configured, ready-to-use virtual machine images that contain a specific set of software and configuration. They are often used to create multiple identical instances of the same environment, such as for testing or production. However, golden images are not a principle of infrastructure as code, but rather a technique that can be used with or without infrastructure as code. The other options are all key principles of infrastructure as code, as explained below:
Self-describing infrastructure: This means that the infrastructure is defined in code that describes its desired state, rather than in scripts that describe the steps to create it. This makes the infrastructure easier to understand, maintain, and reproduce.
Idempotence: This means that applying the same infrastructure code multiple times will always result in the same state, regardless of the initial state. This makes the infrastructure consistent and predictable, and avoids errors or conflicts caused by repeated actions.
References = [Introduction to Infrastructure as Code with Terraform], [Infrastructure as Code in a Private or Public Cloud]


質問 # 52
Which of the following is not a valid source path for specifying a module?

  • A. source - "hashicorp/consul/aws"
  • B. source - "github.com/hashicorp/examplePref-ul.0.8M
  • C. source - "./module"
  • D. source = "./module?version=vl.6.0"

正解:D

解説:
Terraform modules are referenced by specifying a source location. This location can be a URL or a file path.
However, specifying query parameters such as?version=vl.6.0directly within the source path is not a valid or supported method for specifying a module version in Terraform. Instead, version constraints are specified using theversionargument within the module block, not as part of the source string.References= This clarification is based on Terraform's official documentation regarding module usage, which outlines the correct methods for specifying module sources and versions.


質問 # 53
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?

  • A. Manually update the state fire
  • B. Run terraform import
  • C. Run terraform refresh
  • D. It will happen automatically

正解:D

解説:
If you manually destroy infrastructure, Terraform will automatically detect the change and update the state file during the next plan or apply. Terraform compares the current state of the infrastructure with the desired state in the configuration and generates a plan to reconcile the differences. If a resource is missing from the infrastructure but still exists in the state file, Terraform will attempt to recreate it. If a resource is present in the infrastructure but not in the state file, Terraform will ignore it unless you use the terraform import command to bring it under Terraform's management.
References = [Terraform State]


質問 # 54
When do changes invoked by terraform apply take effect?

  • A. Immediately
  • B. After Terraform has updated the state file
  • C. None of the above are correct
  • D. Once the resource provider has fulfilled the request

正解:D

解説:
Changes invoked by terraform apply take effect once the resource provider has fulfilled the request, not after Terraform has updated the state file or immediately. The state file is only a reflection of the real resources, not a source of truth.


質問 # 55
Which of the following module source paths does not specify a remote module?

  • A. Source = ''githhub.comicrop/example''
  • B. Source = "module/consul''
  • C. Source = ''hasicrop/consul/aws''
  • D. Source =''[email protected]:hasicrop/example.git''

正解:B

解説:
The module source path that does not specify a remote module is source = "module/consul". This specifies a local module, which is a module that is stored in a subdirectory of the current working directory. The other options are all examples of remote modules, which are modules that are stored outside of the current working directory and can be accessed by various protocols, such as Git, HTTP, or the Terraform Registry. Remote modules are useful for sharing and reusing code across different configurations and environments. References = [Module Sources], [Local Paths], [Terraform Registry], [Generic Git Repository], [GitHub]


質問 # 56
You have to initialize a Terraform backend before it can be configured.

  • A. True
  • B. False

正解:B

解説:
You can configure a backend in your Terraform code before initializing it. Initializing a backend will store the state file remotely and enable features like locking and workspaces.
References = [Terraform Backends]


質問 # 57
......

HashiCorp Terraform-Associate-003問題集でカバー率リアル試験問題:https://www.goshiken.com/HashiCorp/Terraform-Associate-003-mondaishu.html

問題集お試しセットTerraform-Associate-003テストエンジン問題集トレーニングには195問あります:https://drive.google.com/open?id=1-OVMTVbaQPRwfoTi3n5UV3d1sTWQKCw9