Challenge - 5 Problems
Terraform Module Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Identify the correct module source type
Which module source declaration correctly uses a local path in Terraform?
Attempts:
2 left
💡 Hint
Local module sources use relative or absolute file paths.
✗ Incorrect
Local module sources are specified by file paths starting with ./ or /, unlike registry or git sources.
❓ Configuration
intermediate2:00remaining
Correct Git module source syntax
Which option correctly declares a Terraform module source from a Git repository with a subdirectory path?
Attempts:
2 left
💡 Hint
Git sources require the 'git::' prefix and double slashes before subdirectory.
✗ Incorrect
Terraform Git module sources must start with 'git::' and use double slashes to specify subdirectory inside the repo.
❓ Architecture
advanced2:00remaining
Choosing module source for reusable infrastructure
You want to share a Terraform module across multiple projects and teams with version control and easy updates. Which module source type is best?
Attempts:
2 left
💡 Hint
Consider version control and team collaboration.
✗ Incorrect
Git repositories with version tags allow controlled sharing, updates, and collaboration across teams.
❓ security
advanced2:00remaining
Security risk in module source declaration
Which module source declaration poses a security risk by allowing untrusted code execution?
Attempts:
2 left
💡 Hint
Consider trustworthiness of the source repository.
✗ Incorrect
Using a module from an untrusted Git repository risks running malicious code during Terraform runs.
❓ service_behavior
expert2:00remaining
Terraform behavior with missing module source
What happens when Terraform init runs with a module source pointing to a non-existent Git repository URL?
Attempts:
2 left
💡 Hint
Terraform requires module sources to be accessible during init.
✗ Incorrect
Terraform init fails if it cannot access the module source, preventing incomplete or broken infrastructure setups.