Fill in the Blanks Question
The fill_in_the_blanks_question resource asks learners to type the missing words in a sentence. Mark each blank with underscores in the question text and list the expected answers, in order, in answer.
HCL Syntax
Section titled “HCL Syntax”Basic Syntax
Section titled “Basic Syntax”resource "fill_in_the_blanks_question" "command" { question = "Use __________ to list files in a directory." answer = ["ls"]}Fields
| Field | Type | Required | Description |
|---|---|---|---|
question | string | ✓ | Use __________ (underscores) to indicate where the blank is |
answer | list(string) | ✓ | List of answers matching each blank in the question, in order ConstraintsAt least one answer is required |
exact | bool | — | Enable for case-sensitive exact matching, disable for case-insensitive matching Default false |
hints | list(string) | — | Optional hints that can be revealed to help learners |
tags | list(string) | — | Optional tags for organizing and filtering questions |
Examples
Section titled “Examples”Case-sensitive matching
Section titled “Case-sensitive matching”resource "fill_in_the_blanks_question" "env" { question = "The __________ variable stores the current user's home directory." answer = ["HOME"] exact = true}