nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #245

If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.

The correct answer is A. True. Variables without defaults are required inputs. If the calling module doesn't supply a value, Terraform will fail with an error at plan time.

Interact with Terraform Modules

Question

If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.

Options

  • ATrue
  • BFalse

How the community answered

(18 responses)
  • A
    72% (13)
  • B
    28% (5)

Explanation

Variables without defaults are required inputs. If the calling module doesn't supply a value, Terraform will fail with an error at plan time.

Topics

#module variables#default values#module block#variable declaration

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice