ExamGecko
Home / HashiCorp / Terraform Associate 003 / List of questions
Ask Question

HashiCorp Terraform Associate 003 Practice Test - Questions Answers, Page 8

List of questions

Question 71

Report Export Collapse

A module can always refer to all variables declared in its parent module.

True
True
False
False
Suggested answer: B
Explanation:

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.

asked 18/09/2024
rami Awad
39 questions

Question 72

Report Export Collapse

You much initialize your working directory before running terraform validate.

True
True
False
False
Suggested answer: A
Explanation:

You must initialize your working directory before runningterraform validate, as it will ensure that all the required plugins and modules are installed and configured properly. If you skip this step, you may encounter errors or inconsistencies when validating your configuration files.

asked 18/09/2024
Rocco Cristofaro
50 questions

Question 73

Report Export Collapse

Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.

True
True
False
False
Suggested answer: B
Explanation:

Runningterraform fmtwithout any flags in a directory with Terraform configuration files will not check the formatting of those files without changing their contents, but will actually rewrite them to a canonical format and style. If you want to check the formatting without making changes, you need to use the-checkflag.

asked 18/09/2024
Kiswendsida ZONGO
39 questions

Question 74

Report Export Collapse

The public Terraform Module Registry is free to use.

True
True
False
False
Suggested answer: A
Explanation:

The public Terraform Module Registry is free to use, as it is a public service that hosts thousands of self-contained packages called modules that are used to provision infrastructure. You can browse, use, and publish modules to the registry without any cost.

asked 18/09/2024
Patrick Neason
41 questions

Question 75

Report Export Collapse

How do you specify a module's version when publishing it to the public terraform Module Registry?

Configuration it in the module's Terraform code
Configuration it in the module's Terraform code
Mention it on the module's configuration page on the Terraform Module Registry
Mention it on the module's configuration page on the Terraform Module Registry
The Terraform Module Registry does not support versioning modules
The Terraform Module Registry does not support versioning modules
Tag a release in the associated repo
Tag a release in the associated repo
Suggested answer: D
Explanation:

This is how you specify a module's version when publishing it to the public Terraform Module Registry, as it uses the tags from your version control system (such as GitHub or GitLab) to identify module versions. You need to use semantic versioning for your tags, such asv1.0.0.

asked 18/09/2024
C/1094 WOLOGUEDE COTONOU – BENIN NDENDE
39 questions

Question 76

Report Export Collapse

Which method for sharing Terraform configurations fulfills the following criteria:

1. Keeps the configurations confidential within your organization

2. Support Terraform's semantic version constrains

3. Provides a browsable directory

Subfolder within a workspace
Subfolder within a workspace
Generic git repository
Generic git repository
Terraform Cloud private registry
Terraform Cloud private registry
Public Terraform module registry
Public Terraform module registry
Suggested answer: C
Explanation:

This is the method for sharing Terraform configurations that fulfills the following criteria:

Keeps the configurations confidential within your organization

Supports Terraform's semantic version constraints

Provides a browsable directory

The Terraform Cloud private registry is a feature of Terraform Cloud that allows you to host and manage your own modules within your organization, and use them in your Terraform configurations with versioning and access control.

asked 18/09/2024
Russell Bartsch
43 questions

Question 77

Report Export Collapse

Which are examples of infrastructure as code? Choose two correct answers.

Cloned virtual machine images
Cloned virtual machine images
Versioned configuration files
Versioned configuration files
Change management database records
Change management database records
Doctor files
Doctor files
Suggested answer: B
Explanation:

These are examples of infrastructure as code (IaC), which is a practice of managing and provisioning infrastructure through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.

asked 18/09/2024
Ida Aasvistad
38 questions

Question 78

Report Export Collapse

Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?

Terraform state show ' provider_type_name
Terraform state show ' provider_type_name
Terraform state list
Terraform state list
Terraform get provider_type_name
Terraform get provider_type_name
Terraform state list provider_type_name
Terraform state list provider_type_name
Suggested answer: A
Explanation:

This is the command that you would use to access all of the attributes and details of a resource managed by Terraform, by providing the resource address as an argument. For example,terraform state show 'aws_instance.example'will show you all the information about the AWS instance named example.

asked 18/09/2024
Shahir Kazmi
46 questions

Question 79

Report Export Collapse

The_________determines how Terraform creates, updates, or delete resources.

Terraform configuration
Terraform configuration
Terraform provisioner
Terraform provisioner
Terraform provider
Terraform provider
Terraform core
Terraform core
Suggested answer: C
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.

asked 18/09/2024
ANNA RIBALTA
35 questions

Question 80

Report Export Collapse

How does Terraform determine dependencies between resources?

Terraform requires resource dependencies to be defined as modules and sourced in order
Terraform requires resource dependencies to be defined as modules and sourced in order
Terraform automatically builds a resource graph based on resources provisioners, special meta-parameters, and the stale file (if present}
Terraform automatically builds a resource graph based on resources provisioners, special meta-parameters, and the stale file (if present}
Terraform requires resources in a configuration to be listed m the order they will be created to determine dependencies
Terraform requires resources in a configuration to be listed m the order they will be created to determine dependencies
Terraform requires all dependencies between resources to be specified using the depends_on parameter
Terraform requires all dependencies between resources to be specified using the depends_on parameter
Suggested answer: B
Explanation:

This is how Terraform determines dependencies between resources, by using the references between them in the configuration files and other factors that affect the order of operations.

asked 18/09/2024
Corey Workman
39 questions
Total 195 questions
Go to page: of 20