[2025年06月] 練習で合格させる問題学習ガイドは Terraform-Associate-003 試験問題集 [Q79-Q100]

Share

[2025年06月] 問題集練習試験問題学習ガイドはTerraform-Associate-003試験合格させます

Terraform-Associate-003問題集には練習試験問題解答

質問 # 79
What is the workflow for deploying new infrastructure with Terraform?

  • A. Write Terraform configuration, run terraform apply to create infrastructure, use terraform validate to confirm Terraform deployed resources correctly
  • B. Write Terraform configuration, run terraform show to view proposed changes, and terraform apply to create new infrastructure
  • C. Write Terraform configuration, run terraform init to initialize the working directory or workspace, and run terraform apply
  • D. Write Terraform configuration, run terraform plan to initialize the working directory or workspace, and terraform apply to create the infrastructure

正解:C

解説:
This is the workflow for deploying new infrastructure with Terraform, as it will create a plan and apply it to the target environment. The other options are either incorrect or incomplete.


質問 # 80
Which of the following is not true of Terraform providers?

  • A. providers
  • B. An individual person can write a Terraform Provider
  • C. HashiCorp maintains some providers
  • D. None of the above
  • E. A community of users can maintain a provider
  • F. Cloud providers and infrastructure vendors can write, maintain, or collaborate on Terraform

正解:D

解説:
All of the statements are true of Terraform providers. Terraform providers are plugins that enable Terraform to interact with various APIs and services1. Anyone can write a Terraform provider, either as an individual or as part of a community2. HashiCorp maintains some providers, such as the AWS, Azure, and Google Cloud providers3. Cloud providers and infrastructure vendors can also write, maintain, or collaborate on Terraform providers, such as the VMware, Oracle, and Alibaba Cloud providers.
References =
* 1: Providers - Configuration Language | Terraform | HashiCorp Developer
* 2: Plugin Development - How Terraform Works With Plugins | Terraform | HashiCorp Developer
* 3: Terraform Registry
* : Terraform Registry


質問 # 81
A terraform apply can not _________ infrastructure.

  • A. change
  • B. provision
  • C. destroy
  • D. import

正解:D

解説:
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. References = [Importing Infrastructure]


質問 # 82
A module can always refer to all variables declared in its parent module.

  • A. True
  • B. False

正解:B

解説:
A module cannot always refer to all variables declared in its parent module, as it needs to explicitly declare input variables and assign values to them from the parent module's arguments. A module cannot access the parent module's variables directly, unless they are passed as input arguments.


質問 # 83
Which of these statements about Terraform Cloud workspaces is false?

  • A. They have role-based access controls
  • B. You must use the CLI to switch between workspaces
  • C. They can securely store cloud credentials
  • D. Plans and applies can be triggered via version control system integrations

正解:B

解説:
The statement that you must use the CLI to switch between workspaces is false. Terraform Cloud workspaces are different from Terraform CLI workspaces. Terraform Cloud workspaces are required and represent all of the collections of infrastructure in an organization. They are also a major component of role-based access in Terraform Cloud. You can grant individual users and user groups permissions for one or more workspaces that dictate whether they can manage variables, perform runs, etc. You can create, view, and switch between Terraform Cloud workspaces using the Terraform Cloud UI, the Workspaces API, or the Terraform Enterprise Provider5. Terraform CLI workspaces are optional and allow you to create multiple distinct instances of a single configuration within one working directory. They are useful for creating disposable environments for testing or experimenting without affecting your main or production environment. You can create, view, and switch between Terraform CLI workspaces using the terraform workspace command6. The other statements about Terraform Cloud workspaces are true. They have role-based access controls that allow you to assign permissions to users and teams based on their roles and responsibilities. You can create and manage roles using the Teams API or the Terraform Enterprise Provider7. Plans and applies can be triggered via version control system integrations that allow you to link your Terraform Cloud workspaces to your VCS repositories. You can configure VCS settings, webhooks, and branch tracking to automate your Terraform Cloud workflow8. They can securely store cloud credentials as sensitive variables that are encrypted at rest and only decrypted when needed. You can manage variables using the Terraform Cloud UI, the Variables API, or the Terraform Enterprise Provider9. Reference = [Workspaces]5, [Terraform CLI Workspaces]6, [Teams and Organizations]7, [VCS Integration]8, [Variables]9


質問 # 84
You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf.

Which command will migrate your current state file to the new S3 remote backend?

  • A. terraform push
  • B. terraform init
  • C. terraform refresh
  • D. terraform state

正解:B

解説:
This command will initialize the new backend and prompt you to migrate the existing state file to the new location3. The other commands are not relevant for this task.


質問 # 85
Using the terraform state rm command against a resource will destroy it.

  • A. True
  • B. False

正解:B

解説:
Comprehensive and Detailed in-Depth Explanation:The terraform state rm commandremovesa resource from Terraform's state file butdoes not destroythe resource in the actual infrastructure. It only removes Terraform's knowledge of the resource, meaning Terraform will no longer manage it.
* If you run terraform state rm on a resource, Terraform will forget that the resource exists.
* However, the resource will still exist in the cloud or infrastructure provider.
* If you later run terraform apply, Terraform may try torecreatethe resource because it is no longer present in its state file.
Official Terraform Documentation Reference:terraform state rm - HashiCorp Documentation


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

  • A. True
  • B. False

正解:B

解説:
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. References = [Provider Configuration]1


質問 # 87
When should you run terraform init?

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

正解:D

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


質問 # 88
What is a key benefit of the Terraform state file?

  • A. A state file can schedule recurring infrastructure tasks
  • B. A state file is the desired state expressed by the Terraform code files
  • C. A state file is a source of truth for resources provisioned with a public cloud console
  • D. A state file is a source of truth for resources provisioned with Terraform

正解:D

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


質問 # 89
Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.

  • A. Plan
  • B. apply
  • C. Import
  • D. Init
  • E. Alidate

正解:B、D

解説:
Explanation
The two steps that are required to provision new infrastructure in the Terraform workflow are init and apply.
The terraform init command initializes a working directory containing Terraform configuration files. It downloads and installs the provider plugins that are needed for the configuration, and prepares the backend for storing the state. The terraform apply command applies the changes required to reach the desired state of the configuration, as described by the resource definitions in the configuration files. It shows a plan of the proposed changes and asks for confirmation before making any changes to the infrastructure. References =
[The Core Terraform Workflow], [Initialize a Terraform working directory with init], [Apply Terraform Configuration with apply]


質問 # 90
Which of the following is not a benefit of adopting infrastructure as code?

  • A. Versioning
  • B. Automation
  • C. A Graphical User Interface
  • D. Reusability of code

正解:C

解説:
Infrastructure as Code (IaC) provides several benefits, including the ability to version control infrastructure, reuse code, and automate infrastructure management. However, IaC is typically associated with declarative configuration files and does not inherently provide a graphical user interface (GUI). A GUI is a feature that may be provided by specific tools or platforms built on top of IaC principles but is not a direct benefit of IaC itself1.
Reference = The benefits of IaC can be verified from the official HashiCorp documentation on "What is Infrastructure as Code with Terraform?" provided by HashiCorp Developer1.


質問 # 91
When should you run terraform init?

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

正解:D

解説:
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. Reference = : Initialize a Terraform Project


質問 # 92
When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.

  • A. True
  • B. False

正解:B

解説:
The "version" attribute is optional when referencing a module from the Terraform Registry. If not specified, the latest version will be used, but it is often recommended to specify a version to ensure consistency across environments.
Reference:
Terraform Module Versioning


質問 # 93
Which of these statements about Terraform Cloud workspaces is false?

  • A. They have role-based access controls
  • B. You must use the CLI to switch between workspaces
  • C. They can securely store cloud credentials
  • D. Plans and applies can be triggered via version control system integrations

正解:B

解説:
The statement that you must use the CLI to switch between workspaces is false. Terraform Cloud workspaces are different from Terraform CLI workspaces. Terraform Cloud workspaces are required and represent all of the collections of infrastructure in an organization. They are also a major component of role-based access in Terraform Cloud. You can grant individual users and user groups permissions for one or more workspaces that dictate whether they can manage variables, perform runs, etc. You can create, view, and switch between Terraform Cloud workspaces using the Terraform Cloud UI, the Workspaces API, or the Terraform Enterprise Provider5. Terraform CLI workspaces are optional and allow you to create multiple distinct instances of a single configuration within one working directory. They are useful for creating disposable environments for testing or experimenting without affecting your main or production environment. You can create, view, and switch between Terraform CLI workspaces using the terraform workspace command6. The other statements about Terraform Cloud workspaces are true. They have role-based access controls that allow you to assign permissions to users and teams based on their roles and responsibilities. You can create and manage roles using the Teams API or the Terraform Enterprise Provider7. Plans and applies can be triggered via version control system integrations that allow you to link your Terraform Cloud workspaces to your VCS repositories. You can configure VCS settings, webhooks, and branch tracking to automate your Terraform Cloud workflow8. They can securely store cloud credentials as sensitive variables that are encrypted at rest and only decrypted when needed. You can manage variables using the Terraform Cloud UI, the Variables API, or the Terraform Enterprise Provider9. References = [Workspaces]5, [Terraform CLI Workspaces]6, [Teams and Organizations]7, [VCS Integration]8, [Variables]9


質問 # 94
Terraform configuration can only import modules from the public registry.

  • A. True
  • B. False

正解:B

解説:
Explanation
Terraform configuration can import modules from various sources, not only from the public registry. Modules can be sourced from local file paths, Git repositories, HTTP URLs, Mercurial repositories, S3 buckets, and GCS buckets. Terraform supports a number of common conventions and syntaxes for specifying module sources, as documented in the [Module Sources] page. References = [Module Sources]


質問 # 95
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.


質問 # 96
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?

  • A. Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)
  • B. Write a shell script to transform Terraform files using tools such as AWK, Python, and sed
  • C. Designate one person in each team to review and format everyone's code
  • D. Run the terraform fmt command during the code linting phase of your CI/CD process Most Voted

正解:D

解説:
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. References = [Command: fmt]2


質問 # 97
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

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


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

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

正解:B

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


質問 # 99
What are some benefits of using Sentinel with Terraform Cloud/Terra form Cloud? Choose three correct answers.

  • A. You can restrict specific resource configurations, such as disallowing the use of CIDR=0.0.0.0/0.
  • B. You can enforce a list of approved AWS AMIs
  • C. Sentinel Policies can be written in HashiCorp Configuration Language (HCL)
  • D. You can check out and check in cloud access keys
  • E. Policy-as-code can enforce security best practices

正解:A、B、E

解説:
These are some of the benefits of using Sentinel with Terraform Cloud/Terraform Enterprise, as they allow you to implement logic-based policies that can access and evaluate the Terraform plan, state, and configuration. The other options are not true, as Sentinel does not manage cloud access keys, and Sentinel policies are written in Sentinel language, not HCL.


質問 # 100
......

無料Terraform Associate Terraform-Associate-003試験問題:https://jp.fast2test.com/Terraform-Associate-003-premium-file.html

Terraform-Associate-003はTerraform Associate実際の無料試験練習テスト:https://drive.google.com/open?id=1icUt031nUZgvW_HC2B_9jQipiUm6bhhT


弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

我々の働いている時間: ( GMT 0:00-15:00 )
月曜日から土曜日まで

サポート: 現在連絡 

English Deutsch 繁体中文 한국어