Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Terraform Associate topic 1 question 192 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 192
Topic #: 1
[All Terraform Associate Questions]

When using a module from the public Terraform Module Registry, the following parameters are required attributes in the module block. (Choose two.)

  • A. Each of the module’s required inputs
  • B. The module’s source address
  • C. Terraform Module Registry account token
  • D. Each of the module’s dependencies (example: submodules)
  • E. The version of the module
Show Suggested Answer Hide Answer
Suggested Answer: BE 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
kareem_ashraf
5 months, 1 week ago
Selected Answer: BE
Modules on the public Terraform Registry can be referenced using a registry source address of the form <NAMESPACE>/<NAME>/<PROVIDER>, with each module's information page on the registry site including the exact address to use. module "consul" { source = "hashicorp/consul/aws" version = "0.1.0" }
upvoted 1 times
kareem_ashraf
5 months, 1 week ago
I think iam wrong version is not needed I would go for A,B
upvoted 3 times
...
...
petersoliman
5 months, 1 week ago
Selected Answer: AB
A and B
upvoted 2 times
...
Jas14
7 months, 1 week ago
The version argument is not required, but we highly recommend you include it when using a Terraform module. For supported sources, this argument specifies the module version Terraform will load. Without the version argument, Terraform will load the latest version of the module. Modules can contain both required and optional arguments. You must specify all required arguments to use the module. from Hashicorp's official site.
upvoted 1 times
...
seifskl
9 months, 2 weeks ago
Selected Answer: AB
A. Each of the module’s required inputs B. The module’s source address These two parameters are required when using a module from the Terraform Module Registry. The module's source address tells Terraform where to find the module. The required inputs for the module must be specified so that Terraform can configure the module correctly. The Terraform Module Registry does not require an account token for use, and dependencies should be managed inside the module itself. The version of the module is not strictly required; if not provided, Terraform will use the latest version available. You can refer to this link https://developer.hashicorp.com/terraform/language/modules/syntax it is mentionned that : - "The source argument is mandatory for all modules." - "All modules require a source argument" - "The version argument is recommended for modules from a registry." which means that it is not required
upvoted 4 times
...
wh1t4k3r
9 months, 3 weeks ago
Selected Answer: AB
Version is not required https://developer.hashicorp.com/terraform/language/expressions/version-constraints
upvoted 3 times
...
Talamak
9 months, 3 weeks ago
A little bit of confusion here, so I've just tested it and called a module from public registry, specifying the source and required variables only and it worked. Therefore, I suggest the correct answer is A, B.
upvoted 1 times
...
raf123123
10 months, 1 week ago
Selected Answer: BE
Answer BE
upvoted 1 times
vibzr2023
1 month ago
E Version is not required
upvoted 1 times
...
...
[Removed]
10 months, 2 weeks ago
Selected Answer: BE
Look under the Provision Instructions. Only source and version are required. https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws/latest
upvoted 2 times
...
Ni33
12 months ago
Selected Answer: BE
B and E are correct answers. A is not correct option because input variables can be defaulted to.
upvoted 3 times
...
Stanislav4907
1 year ago
Selected Answer: BE
B. The module’s source address and E. The version of the module are required attributes in the module block when using a module from the public Terraform Module Registry. The source parameter specifies the source location of the module, which can be a Git URL, local file path, or a Terraform Registry module identifier. This is necessary to locate the module to be used. The version parameter specifies the version constraint of the module, which can be a specific version number or a version constraint. This is necessary to ensure that a consistent version of the module is used across different Terraform runs. The other options listed are not required attributes in the module block. Each of the module’s required inputs are defined separately in the module and can be specified in the module block as needed. The Terraform Module Registry account token is not required to use a public module. The module’s dependencies (example: submodules) are not required in the module block but can be defined in the module as necessary.
upvoted 2 times
...
camps
1 year, 1 month ago
Selected Answer: AB
When using a module from the public Terraform Module Registry, you need to include certain attributes in the module block to properly reference and configure the module. A) Each of the module's required inputs: Modules can have input variables that allow users to customize the behavior of the module. In the module block, you must provide values for all required input variables. If a module has optional input variables, you can also provide values for those, but they will have default values if not specified. B) The module's source address: The source address tells Terraform where to find the module's source code. For modules hosted on the Terraform Module Registry, the source address is usually in the format <NAMESPACE>/<NAME>/<PROVIDER>. The version of the module is an optional attribute. If not specified, Terraform will use the most recent version of the module that is compatible with your Terraform version. However, it is a good practice to specify a version to ensure consistent behavior across different environments and Terraform runs.
upvoted 3 times
...
mamoon_malta2022
1 year, 2 months ago
Answer is A & B version is not a required attribute, if you do not specify version it will get the latest version by default
upvoted 2 times
...
Zeppoonstream
1 year, 3 months ago
A. Each of the module’s required inputs: When using a Terraform module, you need to specify the input variables the module requires. This ensures the module has all the necessary information to run correctly. You need to provide values for each of the module’s required inputs in the module block. B. The module’s source address: The source address specifies where Terraform should find the module in the Terraform Module Registry. This includes the registry name and the module name, along with the version of the module you want to use. The source address is a required attribute in the module block and it helps Terraform download and install the module from the registry.
upvoted 1 times
...
Only5
1 year, 3 months ago
I go with B and E w.r.t The source argument is mandatory for all modules. The version argument is recommended for modules from a registry. https://developer.hashicorp.com/terraform/language/modules/syntax
upvoted 1 times
Nzudin
1 year, 2 months ago
if there is no version set it will take the lates one so it is not required.
upvoted 1 times
...
...
yair319732
1 year, 3 months ago
Selected Answer: AB
The answer is A,B .. version isnt mendatory: " " " Registry modules support versioning. You can provide a specific version as shown in the above examples, or use flexible version constraints. " " "
upvoted 1 times
...
Zeppoonstream
1 year, 3 months ago
Selected Answer: BE
B. The module’s source address E. The version of the module When using a module from the public Terraform Module Registry, the following parameters are required attributes in the module block: B. The module’s source address: The source argument in the module block is required and it contains the address of the module in the public Terraform Module Registry. E. The version of the module: The version of the module is also required and it is used to specify which version of the module should be used. A. Each of the module’s required inputs: The required inputs are defined by the module provider and should be passed as variables to the module block. C. Terraform Module Registry account token: Account token is not required, it could be used for authentication but it's not required for using a module from the public Terraform Module Registry. D. Each of the module’s dependencies (example: submodules): Dependencies are not required, but if the module has any submodules, it should be added as a source of the submodule in the root module.
upvoted 2 times
...
gekkehenk
1 year, 3 months ago
Selected Answer: AB
Version is not mandatory. Only mandatory is "source" and the input vars that are mandatory for the module to operate.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...