問題集を購入するなら最新の2026年03月19日 Terraform-Associate-003試験問題と解答PDFで一年間無料更新 [Q14-Q36]

Share

問題集を購入するなら最新の2026年03月19日 Terraform-Associate-003試験問題と解答PDFで一年間無料更新

時間限定無料ダウンロード!最新のTerraform-Associate-003問題集で2026年最新のTerraform-Associate-003試験問題


HashiCorp Terraform-Associate-003 認定試験の出題範囲:

トピック出題範囲
トピック 1
  • Create, maintain, and use Terraform modules: In this section of the exam, candidates are tested for creating a module, using a module in configuration, and topics such as refactoring an existing configuration into modules.
トピック 2
  • Configure and use Terraform providers: In this section, topics covered include understanding Terraform's plugin-based architecture and configuring providers. It also covers aliasing, sourcing, and versioning functions.
トピック 3
  • Manage resource lifecycle: The section covers topics such as Initializing a configuration using terraform init and its options and generating an execution plan using terraform plan and its options. It also covers the configuration changes using Terraform Apply and its options.

 

質問 # 14
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?

  • A. data
  • B. local
  • C. provider
  • D. resource

正解:A

解説:
In Terraform, a data block is used to fetch or compute information from external sources for use elsewhere in the Terraform configuration. Unlike resource blocks that manage infrastructure, data blocks gather information without directly managing any resources. This can include querying for data from cloud providers, external APIs, or other Terraform states.
Reference = This definition and usage of data blocks are covered in Terraform's official documentation, highlighting their role in fetching external information to inform Terraform configurations.


質問 # 15
How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

  • A. Data.vsphere_datacenter,dc
  • B. Vsphere_datacenter.dc.id
  • C. Data.vsphere_datacenter.DC.id
  • D. Data,dc,id

正解:C

解説:
The correct way to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration is data.
vsphere_datacenter.dc.id. This follows the syntax for accessing data source attributes, which is data.TYPE.
NAME.ATTRIBUTE. In this case, the data source type is vsphere_datacenter, the data source name is dc, and the attribute we want to access is id. The other options are incorrect becausethey either use the wrong syntax, the wrong punctuation, or the wrong case. References = [Data Source: vsphere_datacenter], [Data Source:
vsphere_folder], [Expressions: Data Source References]


質問 # 16
You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?

  • A. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
  • B. Run terraform output ip_address to view the result
  • C. Run terraform destroy then terraform apply and look for the IP address in stdout
  • D. In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file

正解:A

解説:
This is a quick way to inspect the state file and find the information you need without modifying anything5.
The other options are either incorrect or inefficient.


質問 # 17
What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?

  • A. The ability to share modules with public Terraform users and members of Terraform Cloud Organizations
  • B. The ability to tag modules by version or release
  • C. The ability to restrict modules to members of Terraform Cloud or Enterprise organizations
  • D. The ability to share modules publicly with any user of Terraform

正解:C

解説:
The Terraform Cloud private registry provides the ability to restrict modules to members of Terraform Cloud or Enterprise organizations. This allows you to share modules within your organization without exposing them to the public. The private registry also supports importing modules from your private VCS repositories. The public Terraform Module Registry, on the other hand, publishes modules from public Git repositories and makes them available to any user of Terraform. References = : Private Registry - Terraform Cloud : Terraform Registry - Provider Documentation


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

  • A. True
  • B. False

正解:B

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


質問 # 19
HashiCorp Configuration Language (HCL) supports user-denned functions.

  • A. True
  • B. False

正解:B

解説:
HashiCorp Configuration Language (HCL) does not support user-defined functions. You can only use the built-in functions that are provided by the language. The built-in functions allow you to perform various operations and transformations on values within expressions. The general syntax for function calls is a function name followed by comma-separated arguments in parentheses, such as max(5, 12, 9). You can find the documentation for all of the available built-in functions in the Terraform Registry or the Packer Documentation, depending on which tool you are using. Reference = : Functions - Configuration Language | Terraform : Functions - Configuration Language | Packer


質問 # 20
In Terraform HCL, an object type of object({name=string, age-number}) would match this value.

  • A.
  • B.
  • C.
  • D.

正解:D


質問 # 21
The_________determines how Terraform creates, updates, or delete resources.

  • A. Terraform provisioner
  • B. Terraform provider
  • C. Terraform core
  • D. Terraform configuration

正解:B

解説:
This is what determines how Terraform creates, updates, or deletes resources, as it is responsible for understanding API interactions with some service and exposing resources and data sources based on that API.


質問 # 22
When should you run terraform init?

  • A. Before you start coding a new Terraform project
  • B. Every time you run terraform apply
  • C. After you start coding a new terraform project and before you run terraform plan for the first time.
  • D. After you run terraform plan for the time in a new terraform project and before you run terraform apply

正解:C

解説:
You should run terraform init after you start coding a new Terraform project and before you run terraform plan for the first time. This command will initialize the working directory by downloading the required providers and modules, creating the initial state file, and performing other necessary tasks. References = : Initialize a Terraform Project


質問 # 23
Where does the Terraform local backend store its state?

  • A. In the /tmp directory
  • B. In the terraform,tfstate file
  • C. In the user's terraform,state file
  • D. In the terraform file

正解:B

解説:
Explanation
This is where the Terraform local backend stores its state, by default, unless you specify a different file name or location in your configuration. The local backend is the simplest backend type that stores the state file on your local disk.


質問 # 24
Which of the following is not a valid Terraform variable type?

  • A. list
  • B. string
  • C. nap
  • D. array

正解:D

解説:
Explanation
This is not a valid Terraform variable type. The other options are valid variable types that can store different kinds of values2.


質問 # 25
What information does the public Terraform Module Registry automatically expose about published modules?

  • A. Required input variables
  • B. Optional inputs variables and default values
  • C. All of the above
  • D. Outputs
  • E. None of the above

正解:C

解説:
The public Terraform Module Registry automatically exposes all the information about published modules, including required input variables, optional input variables and default values, and outputs. This helps users to understand how to use and configure the modules.


質問 # 26
You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM. perform terraform apply, and see that your VM was created successfully.
What should you do to delete the newly-created VM with Terraform?

  • A. The Terraform state file only contains the one new VM. Execute terraform destroy.
  • B. Delete the VM using the cloud provider console and terraform apply to apply the changes to the Terraform state file.
  • C. The Terraform state file contains all 16 VMs in the team account. Execute terraform destroy and select the newly-created VM.
  • D. Delete the Terraform state file and execute terraform apply.

正解:A

解説:
Explanation
This is the best way to delete the newly-created VM with Terraform, as it will only affect the resource that was created by your configuration and state file. The other options are either incorrect or inefficient.


質問 # 27
You used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that Terraform will delete.
Which command should you use to show all the resources that will be deleted? (Pick the 2 correct responses)

  • A. Run terraform show -destroy.
  • B. Run terraform destroy. This will output all the resources that will be deleted before prompting for approval.
  • C. Run terraform state rm *.

正解:A、B

解説:
Running terraform destroy will show all resources that will be deleted before prompting for approval. You can also run terraform plan -destroy to simulate the destruction without actually applying it, which is useful for reviewing the planned changes.
Reference:
Terraform Destroy


質問 # 28
A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?

  • A. Build a completely brand new set of infrastructure.
  • B. Tear down the entire workspace's infrastructure and rebuild it.
  • C. Stop and generate an error message about the missing instances.
  • D. Rebuild only the instances that were deleted.

正解:D

解説:
Comprehensive and Detailed in-Depth Explanation:Terraform detects infrastructure drift by comparing the state filewith the actual infrastructure.
* When an instance ismanually deleted, Terraformsees it as missingand marks it for recreation.
* Running terraform apply willonly recreate the missing instanceswhile leaving the rest of the infrastructure unchanged.
Explanation of incorrect answers:
* A (Tear down everything and rebuild)- Incorrect. Terraform does not destroy existing infrastructure unless explicitly told to.
* B (Build a completely new set of infrastructure)- Incorrect. Terraform does not create duplicates unless configuration changes.
* D (Stop and error out)- Incorrect. Terraform does not fail; itrebuilds missing resourcesautomatically.
Official Terraform Documentation Reference:Handling Infrastructure Drift


質問 # 29
What is terraform refresh-only intended to detect?

  • A. Empty state files
  • B. Terraform configuration code changes
  • C. State file drift
  • D. Corrupt state files

正解:C

解説:
The terraform refresh-only command is intended to detect state file drift. This command synchronizes the state file with the actual infrastructure, updating the state to reflect any changes that have occurred outside of Terraform.


質問 # 30
How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

  • A. Data.vsphere_datacenter,dc
  • B. Vsphere_datacenter.dc.id
  • C. Data.vsphere_datacenter.DC.id
  • D. Data,dc,id

正解:C

解説:
The correct way to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration is data.vsphere_datacenter.dc.id. This follows the syntax for accessing data source attributes, which is data.TYPE.NAME.ATTRIBUTE. In this case, the data source type is vsphere_datacenter, the data source name is dc, and the attribute we want to access is id. The other options are incorrect because they either use the wrong syntax, the wrong punctuation, or the wrong case. Reference = [Data Source: vsphere_datacenter], [Data Source: vsphere_folder], [Expressions: Data Source Reference]


質問 # 31
Outside of the required_providers block, Terraform configurations always refer to providers by their local names.

  • A. True
  • B. False

正解:B

解説:
Outside of the required_providers block, Terraform configurations can refer to providers by either their local names or their source addresses. The local name is a short name that can be used throughout the configuration, while the source address is a global identifier for the provider in the format registry.terraform.io/namespace/type. For example, you can use either aws or registry.terraform.io/hashicorp/aws to refer to the AWS provider.


質問 # 32
How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

  • A. Data.vsphere_datacenter,dc
  • B. Vsphere_datacenter.dc.id
  • C. Data.vsphere_datacenter.DC.id
  • D. Data,dc,id

正解:C

解説:
The correct way to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration is data.vsphere_datacenter.dc.id. This follows the syntax for accessing data source attributes, which is data.TYPE.NAME.ATTRIBUTE. In this case, the data source type is vsphere_datacenter, the data source name is dc, and the attribute we want to access is id. The other options are incorrect because they either use the wrong syntax, the wrong punctuation, or the wrong case.
References = [Data Source: vsphere_datacenter], [Data Source: vsphere_folder], [Expressions: Data Source References]


質問 # 33
When should you use the force-unlock command?

  • A. Automatic unlocking failed
  • B. apply failed due to a state lock
  • C. You see a status message that you cannot acquire the lock
  • D. You have a high priority change

正解:A

解説:
Explanation
You should use the force-unlock command when automatic unlocking failed. Terraform will lock your state for all operations that could write state, such as plan, apply, or destroy. This prevents others from acquiring the lock and potentially corrupting your state. State locking happens automatically on all operations that could write state and you won't see any message that it is happening. If state locking fails, Terraform will not continue. You can disable state locking for most commands with the -lock flag but it is not recommended. If acquiring the lock is taking longer than expected, Terraform will output a status message. If Terraform doesn't output a message, state locking is still occurring if your backend supports it. Terraform has a force-unlock command to manually unlock the state if unlocking failed. Be very careful with this command. If you unlock the state when someone else is holding the lock it could cause multiple writers. Force unlock should only be used to unlock your own lock in the situation where automatic unlocking failed. To protect you, the force-unlock command requires a unique lock ID. Terraform will output this lock ID if unlocking fails. This lock ID acts as a nonce, ensuring that locks and unlocks target the correct lock. The other situations are not valid reasons to use the force-unlock command. You should not use the force-unlock command if you have a high priority change, if apply failed due to a state lock, or if you see a status message that you cannot acquire the lock. These situations indicate that someone else is holding the lock and you should wait for them to finish their operation or contact them to resolve the issue. Using the force-unlock command in these cases could result in data loss or inconsistency. References = [State Locking], [Command: force-unlock]


質問 # 34
What command can you run to generateDOT (Graphviz)formatted data to visualize Terraform dependencies?

  • A. terraform show
  • B. terraform output
  • C. terraform graph
  • D. terraform refresh

正解:C

解説:
* terraform graphgeneratesGraphviz DOT formatoutput, which allows visualization ofresource dependenciesin Terraform.
* A (terraform refresh)- Incorrect, as it only updates the state file.
* C (terraform output)- Incorrect, as it only displays Terraform output values.
* D (terraform show)- Incorrect, as it only displays the Terraform state.
Official Terraform Documentation Reference:
terraform graph - HashiCorp Documentation


質問 # 35
In Terraform HCL, an object type of object({name=string, age-number}) would match this value.

  • A. Option B
  • B. Option A
  • C. Option D
  • D. Option C

正解:A

解説:
From the official Terraform Type Constraints Documentation:
The object({ name = string, age = number }) type expects:
name to be aquoted string, e.g. "John"
age to be anumber, e.g. 52
Option Bsatisfies both:
{
name = "John" ##Valid string
age = 52 ##Valid number
}
Let's analyze the incorrect ones:
#Option A: "fifty two" is not a valid number.
#Option C: John is unquoted (invalid string), and "fifty two" is not a number.
#Option D: name = John is not quoted, making it an invalid string in HCL.
Terraform is strict about type and formatting. Stringsmust be quoted, and numbersmust be numeric literals.


質問 # 36
......

検証済みのTerraform-Associate-003問題集と解答で一年間無料最速更新:https://www.goshiken.com/HashiCorp/Terraform-Associate-003-mondaishu.html

最新のHashiCorp Terraform-Associate-003認定の練習テスト問題:https://drive.google.com/open?id=1mwqM9CyamPVFYB9DzX61sxECOsMx-AoY