0
0
Terraformcloud~20 mins

Module registry for organization in Terraform - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Module Registry Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Understanding Module Registry Structure

You want to organize your Terraform modules in a private module registry for your organization. Which naming convention correctly identifies a module source in the registry?

A"org-name/app1/vpc"
B"app1/network/vpc"
C"registry.terraform.io/org-name/app1/vpc"
D"app1/vpc"
Attempts:
2 left
💡 Hint

Think about how Terraform identifies modules by organization, name, and provider.

Configuration
intermediate
2:00remaining
Referencing a Module from Organization Registry

Given a module published in your organization's private registry as org-name/app1/vpc, which Terraform block correctly references this module?

A
module "vpc" {
  source = "org-name/app1/vpc"
  version = "1.0.0"
}
B
module "vpc" {
  source = "terraform.io/org-name/app1/vpc"
  version = "1.0.0"
}
C
module "vpc" {
  source = "app1/vpc"
  version = "1.0.0"
}
D
module "vpc" {
  source = "registry.terraform.io/org-name/app1/vpc"
  version = "1.0.0"
}
Attempts:
2 left
💡 Hint

Check the exact source format for modules in Terraform registries.

security
advanced
2:00remaining
Securing Access to Private Module Registry

Your organization uses a private Terraform module registry. What is the best practice to securely authenticate Terraform CLI to access private modules?

AEmbed the username and password directly in the module source URL.
BStore the registry credentials in plain text in the Terraform configuration file.
CUse environment variables or CLI login commands to authenticate Terraform CLI securely.
DDisable authentication and allow anonymous access to the private registry.
Attempts:
2 left
💡 Hint

Think about secure ways to handle credentials without exposing them in code.

service_behavior
advanced
2:00remaining
Module Versioning Behavior in Registry

If you specify version = ">= 1.0.0, < 2.0.0" in your module block, what version of the module will Terraform select from the registry?

AThe earliest version that matches the range.
BThe latest available version that is at least 1.0.0 but less than 2.0.0.
CThe exact version 1.0.0 only.
DAny version regardless of the specified range.
Attempts:
2 left
💡 Hint

Consider how Terraform handles version constraints and selects module versions.

Best Practice
expert
3:00remaining
Organizing Modules for Reusability and Maintenance

Your organization has many Terraform modules for different projects. Which approach best supports maintainability and reuse in a private module registry?

AUse local paths for modules instead of the registry to simplify access.
BPublish all modules as a single large module to reduce the number of modules to manage.
CDuplicate modules for each project to avoid dependency conflicts.
DCreate small, focused modules with clear responsibilities and version them independently.
Attempts:
2 left
💡 Hint

Think about modular design principles and version control.