terraform-associate question 254 discussion

View all HashiCorp Certified: Terraform Associate Exam here
back to hashicorp forum

Question 254

Your team uses terraform OSS . You have created a number of resuable modules for important ,
independent network components that you want to share with your team to enhance consistency .
What is the correct option/way to do that?

  • A. Terraform modules cannot be shared in OSS version . Each developer needs to maintain their own modules and leverage them in the main tf file.
  • B. Upload your modules with proper versioning in the terraform public module registry . Terraform OSS is directly integrated with the public module registry , and can reference the modules from the code in the main tf file.
  • C. Terraform module sharing is only available in Enterprise version via terraform private module registry , so no way to enable it in OSS version.
  • D. Store your modules in a NAS/ shared file server , and ask your team members to directly reference the code from there. This is the only viable option in terraform OSS ,which is better than individually maintaining module versions for every developer.
Answer:

B


Explanation:
Software development encourages code reuse through reusable artifacts, such as libraries, packages
and modules. Most programming languages enable developers to package and publish these
reusable components and make them available on a registry or feed. For example, Python has
Python Package Index and PowerShell has PowerShell Gallery.
For Terraform users, the Terraform Registry enables the distribution of Terraform modules, which are
reusable configurations. The Terraform Registry acts as a centralized repository for module sharing,
making modules easier to discover and reuse.
The Registry is available in two variants:
* Public Registry houses official Terraform providers -- which are services that interact with an API to
expose and manage a specific resource -- and community-contributed modules.
* Private Registry is available as part of the Terraform Cloud, and can host modules internally within
an organization.
https://www.terraform.io/docs/registry/index.html

User Votes:
A
50%
B
50%
C
50%
D 1 votes
50%
Discussions
0 / 1000
Aamir_Ahmed
3 weeks, 3 days ago

Option D is correct.
❌ Why Other Options Are Incorrect?
A. "Terraform modules cannot be shared in OSS" → Incorrect
Terraform OSS fully supports modules, and they can be shared via Git, local paths, or shared file systems.
Developers do not need to maintain their own copies if a shared location is used.
B. "Upload to Terraform Public Module Registry" → Incorrect
Public Module Registry is not meant for private, organization-specific modules.
Anyone can access publicly uploaded modules, which may expose sensitive configurations.
Terraform OSS does not directly integrate with the public registry for private use cases.
C. "Module sharing is only available in Enterprise version" → Incorrect
Private Module Registry is an Enterprise-only feature, but module sharing is still possible in OSS using Git, file shares, or other storage methods.
Terraform OSS does NOT restrict you from using modules, it just lacks a built-in registry.