HashiCorp Terraform-Associate-003 HashiCorp Certified: Terraform Associate (003) Exam Practice Test

Page: 1 / 14
Total 146 questions
Question 1

Which of the following are advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.



Answer : B, E

Infrastructure as code (IaC) is a way of managing and provisioning cloud infrastructure using programming techniques instead of manual processes1. IaC has many advantages over using a graphical user interface (GUI) for provisioning infrastructure, such as:

* Versioning: IaC allows you to store your infrastructure configuration in a version control system, such as Git, and track changes over time. This enables you to roll back to previous versions, compare differences, and collaborate with other developers2.

* Reusability: IaC allows you to create reusable modules and templates that can be applied to different environments, such as development, testing, and production. This reduces duplication, improves consistency, and speeds up deployment3.

* Sharing: IaC allows you to share your infrastructure configuration with other developers, teams, or organizations, and leverage existing code from open source repositories or registries. This fosters best practices, innovation, and standardization4.

* Risk reduction: IaC reduces the risk of human error, configuration drift, and security breaches that can occur when provisioning infrastructure manually or using a GUI. IaC also enables you to perform automated testing, validation, and compliance checks on your infrastructure before deploying it5.

Reference =

* 1: What is Infrastructure as Code? Explained for Beginners - freeCodeCamp.org

* 2: The benefits of Infrastructure as Code - Microsoft Community Hub

* 3: Infrastructure as Code : Best Practices, Benefits & Examples - Spacelift

* 4: 5 Benefits of Infrastructure as Code (IaC) for Modern Businesses in the Cloud

* 5: The 7 Biggest Benefits of Infrastructure as Code - DuploCloud


Question 2

Which of the following is not true of Terraform providers?



Answer : F

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. Reference =

* 1: Providers - Configuration Language | Terraform | HashiCorp Developer

* 2: Plugin Development - How Terraform Works With Plugins | Terraform | HashiCorp Developer

* 3: Terraform Registry

* : Terraform Registry


Question 3

The Terraform binary version and provider versions must match each other in a single configuration.



Answer : B

The Terraform binary version and provider versions do not have to match each other in a single configuration. Terraform allows you to specify provider version constraints in the configuration's terraform block, which can be different from the Terraform binary version1. Terraform will use the newest version of the provider that meets the configuration's version constraints2. You can also use the dependency lock file to ensure Terraform is using the correct provider version3. Reference =

* 1: Providers - Configuration Language | Terraform | HashiCorp Developer

* 2: Multiple provider versions with Terraform - Stack Overflow

* 3: Lock and upgrade provider versions | Terraform - HashiCorp Developer


Question 4

Which of these is true about Terraform's plugin-based architecture?



Answer : C

Terraform is built on a plugin-based architecture, enabling developers to extend Terraform by writing new plugins or compiling modified versions of existing plugins1. Terraform plugins are executable binaries written in Go that expose an implementation for a specific service, such as a cloud resource, SaaS platform, or API2. If there is no existing provider for your API, you can create one using the Terraform Plugin SDK3 or the Terraform Plugin Framework4. Reference =

* 1: Plugin Development - How Terraform Works With Plugins | Terraform | HashiCorp Developer

* 2: Lab: Terraform Plug-in Based Architecture - GitHub

* 3: Terraform Plugin SDK - Terraform by HashiCorp

* 4: HashiCorp Terraform Plugin Framework Now Generally Available


Question 5

Which of the following module source paths does not specify a remote module?



Answer : A

The module source path that does not specify a remote module issource = '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.Reference= [Module Sources], [Local Paths], [Terraform Registry], [Generic Git Repository], [GitHub]


Question 6

Terraform configuration can only import modules from the public registry.



Answer : B

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.Reference= [Module Sources]


Question 7

Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?



Answer : C

The concept of infrastructure as code (IaC) is to define and manage infrastructure using code, rather than manual processes or GUI tools. A script that contains a series of public cloud CLI commands is an example of IaC, because it uses code to provision resources into a public cloud. The other options are not examples of IaC, because they involve manual or interactive actions, such as running curl commands, sending REST requests, or entering commands into a console.Reference= [Introduction to Infrastructure as Code with Terraform] and [Infrastructure as Code]


Page:    1 / 14   
Total 146 questions