Courseiva
DeploymentmediumMultiple ChoiceObjective-mapped

CV0-004 Deployment Practice Question

A cloud engineer is writing a Terraform configuration to deploy an AWS EC2 instance. The engineer wants to pass the AMI ID and instance type into the configuration at runtime without hardcoding them. Which Terraform feature should be used?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Variables

Variables in Terraform allow you to define parameters that can be supplied at runtime, making configurations reusable and flexible.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Locals

    Why it's wrong here

    Locals are used for local expressions and cannot be overridden at runtime.

  • Outputs

    Why it's wrong here

    Outputs are used to return values from a module or configuration, not to pass input values.

  • Variables

    Why this is correct

    Variables allow you to define inputs that can be provided at runtime via command line, environment variables, or variable files.

  • Data sources

    Why it's wrong here

    Data sources fetch or compute data from providers, but they are not used to pass runtime parameters.

About these practice questions

This CV0-004 question is part of Courseiva's 977-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.