Latest Terraform-Associate-003 Actual Free Exam Updated 250 Questions
Online Questions - Valid Practice Terraform-Associate-003 Exam Dumps Test Questions
HashiCorp Terraform-Associate-003 Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
NEW QUESTION # 21
Which of the following is not true of Terraform providers?
- A. Cloud providers and infrastructure vendors can write, maintain, or collaborate on Terraform
- B. providers
- C. An individual person can write a Terraform Provider
- D. None of the above
- E. HashiCorp maintains some providers
- F. A community of users can maintain a provider
Answer: D
Explanation:
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
NEW QUESTION # 22
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 share modules publicly with any user of Terraform
- C. The ability to restrict modules to members of Terraform Cloud or Enterprise organizations
- D. The ability to tag modules by version or release
Answer: C
Explanation:
Explanation
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
NEW QUESTION # 23
Outside of the required_providers block, Terraform configurations always refer to providers by their local names.
- A. False
- B. True
Answer: A
Explanation:
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.
NEW QUESTION # 24
Which provider authentication method prevents credentials from being stored in the state file?
- A. Setting credentials as Terraform variables
- B. Specifying the login credentials in the provider block
- C. Using environment variables
- D. None of the above
Answer: D
Explanation:
None of the above methods prevent credentials from being stored in the state file. Terraform stores the provider configuration in the state file, which may include sensitive information such as credentials. This is a potential security risk and should be avoided if possible. To prevent credentials from being stored in the state file, you can use one of the following methods:
Use environment variables to pass credentials to the provider. This way, the credentials are not part of the provider configuration and are not stored in the state file. However, this method may not work for some providers that require credentials to be set in the provider block.
Use dynamic credentials to authenticate with your cloud provider. This way, Terraform Cloud or Enterprise will request temporary credentials from your cloud provider for each run and use them to provision your resources. The credentials are not stored in the state file and are revoked after the run is completed. This method is supported for AWS, Google Cloud Platform, Azure, and Vault. Reference = : [Sensitive Values in State] : Authenticate providers with dynamic credentials
NEW QUESTION # 25
Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Cloud automatically and proactively enforce this security control?
- A. With a Sentinel policy, which runs before every apply
- B. With an S3 module with proper settings for buckets
- C. By adding variables to each Terraform Cloud workspace to ensure these settings are always enabled
- D. Auditing cloud storage buckets with a vulnerability scanning tool
Answer: A
Explanation:
The best way to automatically and proactively enforce the security control that new AWS S3 buckets must be private and encrypted at rest is with a Sentinel policy, which runs before every apply. Sentinel is a policy as code framework that allows you to define and enforce logic-based policies for your infrastructure. Terraform Cloud supports Sentinel policies for all paid tiers, and can run them before any terraform plan or terraform apply operation. You can write a Sentinel policy that checks the configuration of the S3 buckets and ensures that they have the proper settings for privacy and encryption, and then assign the policy to your Terraform Cloud organization or workspace. This way, Terraform Cloud will prevent any changes that violate the policy from being applied. References = [Sentinel Policy Framework], [Manage Policies in Terraform Cloud], [Write and Test Sentinel Policies for Terraform]
NEW QUESTION # 26
You want to use API tokens and other secrets within your team's Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick the 3 correct responses)
- A. In a plaintext document on a shared drive.
- B. In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.
- C. In HashiCorp Vault.
- D. In a terraform.tfvars file, securely managed and shared with your team.
- E. In a terraform.tfvars file, checked into your version control system.
Answer: B,C,D
Explanation:
Sensitive values such as API tokens should be stored in a secure way, either in Terraform Cloud variables marked as sensitive or in HashiCorp Vault. Storing secrets in version control systems or plaintext files is not recommended.
Reference:
Terraform Cloud Environment Variables
NEW QUESTION # 27
How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?
- A. It doesn't show the output of a terraform apply locally
- B. It is only arable lo paying customers
- C. It can execute Terraform runs on dedicated infrastructure in Terraform Cloud
- D. All of the above
Answer: C
Explanation:
Explanation
This is how the Terraform Cloud integration differs from other state backends such as S3, Consul, etc., as it allows you to perform remote operations on Terraform Cloud's servers instead of your local machine. The other options are either incorrect or irrelevant.
NEW QUESTION # 28
What is the provider for this resource?
- A. aws
- B. Vpc
- C. Main
- D. Test
Answer: A
Explanation:
In the given Terraform configuration snippet:
resource "aws_vpc" "main" {
name = "test"
}
The provider for the resource aws_vpc is aws. The provider is specified by the prefix of the resource type. In this case, aws_vpc indicates that the resource type vpc is provided by the aws provider.
References:
Terraform documentation on providers: Terraform Providers
NEW QUESTION # 29
You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? Choose two correct answers.
- A. Run the terraform Import-gcp command
- B. Use the terraform import command for the existing VMs
- C. Write Terraform configuration for the existing VMs
- D. Provision new VMs using Terraform with the same VM names
Answer: B,C
Explanation:
To import existing resources into Terraform, you need to do two things1:
Write a resource configuration block for each resource, matching the type and name used in your state file.
Run terraform import for each resource, specifying its address and ID. There is no such command as terraform Import-gcp, and provisioning new VMs with the same names will not import them into Terraform.
NEW QUESTION # 30
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 check out and check in cloud access keys
- C. Sentinel Policies can be written in HashiCorp Configuration Language (HCL)
- D. You can enforce a list of approved AWS AMIs
- E. Policy-as-code can enforce security best practices
Answer: A,D,E
Explanation:
Explanation
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.
NEW QUESTION # 31
What does this code do?
- A. Requires any version of the AWS provider > = 3.0 and <4.0
- B. Requires any version of the AWS provider > 3.0
- C. Requires any version of the AWS provider > = 3.0 major release. like 4.1
- D. Requires any version of the AWS provider >= 3.0
Answer: A
Explanation:
This is what this code does, by using the pessimistic constraint operator (~>), which specifies an acceptable range of versions for a provider or module.
NEW QUESTION # 32
When do you need to explicitly execute Terraform in refresh-only mode?
- A. Before every terraform apply.
- B. Before every terraform plan.
- C. Before every terraform import.
- D. None of the above.
Answer: C
Explanation:
Purpose of Refresh-Only Mode: Running Terraform in refresh-only mode updates Terraform's state file with the current state of resources in your infrastructure without making changes to the resources themselves.
Context of Terraform Import: When using terraform import, you're adding existing resources to the state file, and running Terraform in refresh-only mode before this operation can ensure that any initial configuration syncs precisely with the actual state.
For more on refresh-only mode in relation to terraform import, refer to Terraform's import documentation.
NEW QUESTION # 33
The_________determines how Terraform creates, updates, or delete resources.
- A. Terraform provisioner
- B. Terraform configuration
- C. Terraform core
- D. Terraform provider
Answer: D
Explanation:
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.
NEW QUESTION # 34
terraform validate reports syntax check errors for which of the following?
- A. Code contains tabs for indentation instead of spaces
- B. None of the above
- C. The state file does not match the current infrastructure
- D. There is a missing value for a variable
Answer: B
Explanation:
The terraform validate command is used to check for syntax errors and internal consistency within Terraform configurations, such as whether all required arguments are specified. It does not check for indentation styles, missing variable values (as variables might not be defined at validation time), or state file consistency with the current infrastructure. Therefore, none of the provided options are correct in the context of what terraform validate reports.
Reference = Terraform's official documentation details the purpose and function of the terraform validate command, specifying that it focuses on syntax and consistency checks within Terraform configurations themselves, not on external factors like the state file or infrastructure state. Direct references from the HashiCorp Terraform Associate (003) study materials to this specific detail were not found in the provided files.
NEW QUESTION # 35
A child module can always access variables declared in its parent module.
- A. False
- B. True
Answer: A
Explanation:
Comprehensive and Detailed in-Depth Explanation:Child modulesdo not automatically inheritvariables from the parent module.
* To pass values from theparent moduleto thechild module, you mustexplicitly define input variables in the child module and pass them in the parent module.
* Example:
hcl
CopyEdit
module "example" {
source = "./child_module"
var1 = "value"
}
Official Terraform Documentation Reference:Passing Variables to Modules
NEW QUESTION # 36
You ate creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to do this?
- A.

- B.

- C.

- D.

Answer: C
Explanation:
Option C is the correct way to configure multiple providers in a Terraform configuration. Each provider block must have a name attribute that specifies which provider it configures2. The other options are either missing the name attribute or using an invalid syntax.
NEW QUESTION # 37
What is a Terraform provider not responsible for?
- A. Provisioning infrastructure in multiple cloud providers.
- B. Understanding API interactions with a hosted service.
- C. Managing resources and data sources based on an API.
- D. Managing actions to take based on resource differences.
Answer: A
Explanation:
Detailed Explanation:
* Rationale for Correct Answer (A):Providers only interact with one specific platform or API.
Terraform itself can work with multiple providers in one configuration, but a single provider is not responsible for provisioning across multiple cloud providers.
* Analysis of Incorrect Options:
* B. Managing actions to take based on resource differences: This is a provider responsibility (through the resource schema).
* C. Managing resources and data sources based on an API: Correct - providers define resources/data sources and map them to API calls.
* D. Understanding API interactions with a hosted service: Correct - providers encapsulate API logic to allow Terraform to manage resources.
* Key Concept:Providers are API adapters. They handle CRUD operations for resources in their own ecosystem but do not span across multiple cloud platforms.
Reference:Terraform Exam Objective - Manage Terraform Resources and Providers.
NEW QUESTION # 38
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?
- A. Terraform will check your state file to determine the provider version to use
- B. Terraform will use the latest version of the provider available at the time you provision your new resource
- C. Terraform will use the version recorded in your lock file
- D. Terraform will use the latest version of the provider for the new resource and the version recorded in the lock file to manage existing resources
Answer: C
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.
NEW QUESTION # 39
......
Terraform-Associate-003 Exam PDF [2026] Tests Free Updated Today with Correct 250 Questions: https://www.actual4dumps.com/Terraform-Associate-003-study-material.html
100% Real Terraform-Associate-003 dumps - Brilliant Terraform-Associate-003 Exam Questions PDF: https://drive.google.com/open?id=1p6EN3GtKQrq4R52W7HmTzfM8XEwAvMCY