시험덤프
매달, 우리는 1000명 이상의 사람들이 시험 준비를 잘하고 시험을 잘 통과할 수 있도록 도와줍니다.
  / Terraform Associate 004 덤프  / Terraform Associate 004 문제 연습

HashiCorp Terraform Associate 004 시험

HashiCorp Certified: Terraform Associate (004) 온라인 연습

최종 업데이트 시간: 2026년03월31일

당신은 온라인 연습 문제를 통해 HashiCorp Terraform Associate 004 시험지식에 대해 자신이 어떻게 알고 있는지 파악한 후 시험 참가 신청 여부를 결정할 수 있다.

시험을 100% 합격하고 시험 준비 시간을 35% 절약하기를 바라며 Terraform Associate 004 덤프 (최신 실제 시험 문제)를 사용 선택하여 현재 최신 237개의 시험 문제와 답을 포함하십시오.

 / 20

Question No : 1


One remote backend configuration always maps to a single remote workspace.

정답:
Explanation:
The remote backend can work with either a single remote Terraform Cloud workspace, or with multiple similarly-named remote workspaces (like networking-dev and networking-prod). The workspaces block of the backend configuration determines which mode it uses. To use a single remote Terraform Cloud workspace, set workspaces.name to the remote workspace’s full name (like networking-prod). To use multiple remote workspaces, set workspaces.prefix to a prefix used in all of the desired remote workspace names.
For example, set prefix = “networking-” to use Terraform cloud workspaces with names like networking-dev and networking-prod. This is helpful when mapping multiple Terraform CLI workspaces used in a single Terraform configuration to multiple Terraform Cloud workspaces3. However, one remote backend configuration always maps to a single remote workspace, either by name or by prefix. You cannot use both name and prefix in the same backend configuration, or omit both. Doing so will result in a configuration error3.
Reference = [Backend Type: remote]3

Question No : 2


You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability.
How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?

정답:
Explanation:
The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style. This command applies a subset of the Terraform language style conventions, along with other minor adjustments for readability. Running this command on your configuration files before committing them to source control can help ensure consistency of style between different Terraform codebases, and can also make diffs easier to read. You can also use the -check and -diff options to check if the files are formatted and display the formatting changes respectively2. Running the terraform fmt command during the code linting phase of your CI/CD process can help automate this process and enforce the formatting standards for your team.
Reference = [Command: fmt]2

Question No : 3


A provider configuration block is required in every Terraform configuration.
Example:



정답:
Explanation:
A provider configuration block is not required in every Terraform configuration. A provider configuration block can be omitted if its contents would otherwise be empty. Terraform assumes an empty default configuration for any provider that is not explicitly configured. However, some providers may require some configuration arguments (such as endpoint URLs or cloud regions) before they can be used. A provider’s documentation should list which configuration arguments it expects. For providers distributed on the Terraform Registry, versioned documentation is available on each provider’s page, via the “Documentation” link in the provider’s header1.
Reference = [Provider Configuration]1

Question No : 4


How is terraform import run?

정답:
Explanation:
The terraform import command is not part of any other Terraform workflow. It must be explicitly invoked by the user with the appropriate arguments, such as the resource address and the ID of the existing infrastructure to import.
Reference = [Importing Infrastructure]

Question No : 5


A terraform apply can not _________ infrastructure.

정답:
Explanation:
The terraform import command is used to import existing infrastructure into Terraform’s state. This allows Terraform to manage and destroy the imported infrastructure as part of the configuration. The terraform import command does not modify the configuration, so the imported resources must be manually added to the configuration after the import.
Reference = [Importing Infrastructure]

Question No : 6


If a module declares a variable with a default, that variable must also be defined within the module.

정답:
Explanation:
A module can declare a variable with a default value without requiring the caller to define it. This allows the module to provide a sensible default behavior that can be customized by the caller if needed.
Reference = [Module Variables]

Question No : 7


How would you output returned values from a child module in the Terraform CLI output?

정답:
Explanation:
To output returned values from a child module in the Terraform CLI output, you need to declare the output in both the child module and the root module. The child module output will return the value to the root module, and the root module output will display the value in the CLI.
Reference = [Terraform Outputs]

Question No : 8


You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database.
What is the best way to achieve this using Terraform?

정답:
Explanation:
The terraform taint command marks a resource as tainted, which means it will be destroyed and recreated on the next apply. This way, you can replace the VM instance without affecting the database or other resources.
Reference = [Terraform Taint]

Question No : 9


You have to initialize a Terraform backend before it can be configured.

정답:
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.
Reference = [Terraform Backends]

Question No : 10


What is a key benefit of the Terraform state file?

정답:
Explanation:
This is a key benefit of the Terraform state file, as it stores and tracks the metadata and attributes of the resources that are managed by Terraform, and allows Terraform to compare the current state with the desired state expressed by your configuration files.

Question No : 11


You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a.terraform.lock, hc1 file.
How will Terraform choose which version of the provider to use?

정답:
Explanation:
This is how Terraform chooses which version of the provider to use, when you add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The lock file records the exact version of each provider that was installed in your working directory, and ensures that Terraform will always use the same provider versions until you run terraform init - upgrade to update them.

Question No : 12


When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?

정답:
Explanation:
This is where Terraform saves resource state when using a remote backend or Terraform Cloud integration, as it allows you to store and manage your state file in a remote location, such as a cloud storage service or Terraform Cloud’s servers. This enables collaboration, security, and scalability for your Terraform infrastructure.

Question No : 13


If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resoruces, which of the following scenarios poses a challenge for this team?

정답:
Explanation:
This is the scenario that poses a challenge for this team, if they adopt AWS CloudFormation as their standardized method for provisioning public cloud resources, as CloudFormation only supports AWS services and resources, and cannot be used to provision infrastructure on other cloud platforms such as Azure.

Question No : 14


Which command lets you experiment with terraform expressions?

정답:
Explanation:
This is the command that lets you experiment with Terraform expressions, by providing an interactive console that allows you to evaluate expressions and see their results. You can use this command to test your expressions before using them in your configuration files.

Question No : 15


Select the command that doesn’t cause Terraform to refresh its state.

정답:
Explanation:
This is the command that does not cause Terraform to refresh its state, as it only lists the resources that are currently managed by Terraform in the state file. The other commands will refresh the state file before performing their operations, unless you use the -refresh=false flag.

 / 20
HashiCorp