Practice Terraform module vocabulary: module registry publishing, version pinning, input variables, module outputs, and root module composition patterns.
0 / 10 completed
1 / 10
'We published the VPC module to the internal registry.' What is a Terraform module registry?
A Terraform module registry is a service for hosting and versioning reusable modules. The public Terraform Registry (registry.terraform.io) hosts community modules. Organisations often run private registries (via Terraform Cloud/Enterprise, GitLab, or custom tools) to share internal modules. Publishing a module makes it available to all teams via a standard source reference.
2 / 10
'Module version pinning.' Why is it important to pin module versions?
Version pinning (e.g., version = '2.3.1') ensures your Terraform configuration always uses the same module version regardless of when or where it runs. Without pinning, a new module version could introduce breaking changes silently. Best practice: pin to a specific version in all environments, and explicitly update the pin after reviewing the changelog.
3 / 10
'The module exposes these input variables.' What are Terraform module input variables?
Input variables are a module's public interface. They define what the consumer can or must configure. Required variables (no default) must be provided; optional variables have defaults. Well-designed modules expose only the inputs needed for customisation and hide internal implementation details. Input variables are defined in variables.tf and referenced as var.name within the module.
4 / 10
'The module outputs the VPC ID and subnet IDs.' What are module outputs used for?
Module outputs are the module's way of sharing data with its caller. If a VPC module creates a VPC and subnets, it outputs their IDs so the calling code can reference them (e.g., module.vpc.vpc_id). Without outputs, the calling code would have no way to use resources created inside the module. Outputs are defined in outputs.tf within the module.
5 / 10
'The root module calls the VPC and EKS modules.' What is the root module in Terraform?
The root module is the top-level Terraform configuration — the .tf files in the directory where you run terraform plan and apply. It's the orchestration layer that calls child modules (like VPC, EKS, RDS modules) and wires them together. The root module may also define resources directly. Every Terraform project has exactly one root module; all other modules are child modules called from it.
6 / 10
Alice: 'I'm getting an error saying 'module 'my-vpc' requires a 'subnet_cidr' input, but I didn't provide one in my root module. Is there something I missed?'
This message highlights the concept of *required inputs*. Terraform modules can define required variables that *must* be provided. The error indicates that 'subnet_cidr' was not defined at any level in the configuration, leading to the error. It's crucial to understand that while some inputs are optional, others are essential for a module to function correctly.
7 / 10
During a code review, Ben comments on a PR: 'I noticed you're using version 1.2.3 of the `aws-vpc` module. Wouldn't it be better to pin this to a specific version for stability?' What does Ben mean by 'pinning' a module version?
'Pinning' a module version means specifying an exact version number (e.g., 1.2.3) in your Terraform configuration. This prevents Terraform from automatically updating to newer versions of the module, which can introduce breaking changes or unexpected compatibility issues. It's a key practice for ensuring stability and reproducibility.
8 / 10
You are reviewing the configuration of a module that creates an S3 bucket. The module's documentation lists several input variables: `bucket_name`, `region`, and `version`. Which of the following best describes what Terraform module *input variables* are?
Terraform module input variables are configuration parameters that are passed into a module from its parent module. These variables allow you to control and customize the behavior of the module without modifying the module's core logic. They're essential for making modules reusable and adaptable across different environments.
9 / 10
Charlie: 'The module outputs the VPC ID and subnet IDs. How can I use this information in my root module to connect to other resources?'
Module *outputs* are values that a module generates or calculates during its execution. These outputs expose data that the module creates and can be referenced by parent modules to connect to other resources. Think of them as the module's way of sharing information with its surroundings – they're not meant for direct manipulation within the module itself.
10 / 10
In a Slack channel discussing infrastructure changes, David writes: 'We've updated the Terraform configuration to use the new `eks-cluster` module. It now outputs the Kubernetes cluster name and version.' What is the *primary* purpose of module outputs in this context?
The *primary* purpose of module outputs is to enable other parts of your Terraform configuration (typically the root module) to consume the results or data generated by a child module. This allows you to integrate modules seamlessly and automate infrastructure deployments based on their outputs. It's about sharing information for downstream usage.
What does this Terraform Operations exercise cover?
This exercise, "Terraform Module Vocabulary", tests your understanding of terraform operations vocabulary and phrasing through 10 multiple-choice questions drawn from real workplace scenarios.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 10 questions. Each one presents a realistic sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Who is this Terraform Operations exercise for?
It's designed for IT professionals and learners who want to sound natural discussing terraform operations topics in English — useful for meetings, documentation, interviews, and day-to-day communication with English-speaking teams.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more Terraform Operations exercises?
Browse the full Terraform Operations exercises hub for more practice, or explore other exercise categories covering vocabulary, grammar, interviews, and workplace communication.