HashiCorp Terraform Associate 003 Practice Test - Questions Answers, Page 8
List of questions
Question 71

A module can always refer to all variables declared in its parent module.
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.
Question 72

You much initialize your working directory before running terraform validate.
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.
Question 73

Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
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.
Question 74

The public Terraform Module Registry is free to use.
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.
Question 75

How do you specify a module's version when publishing it to the public terraform Module Registry?
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.
Question 76

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
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.
Question 77

Which are examples of infrastructure as code? Choose two correct answers.
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.
Question 78

Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
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.
Question 79

The_________determines how Terraform creates, updates, or delete resources.
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.
Question 80

How does Terraform determine dependencies between resources?
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.
Question