QuizLander
← جميع الاختبارات العامة

HashiCorp Terraform Associate (003) — Practice

بواسطة Jude · 14/05/2026 · 181 مشاهدة · 0 مشاركة

Practice questions on Terraform workflow, state, providers, modules, and Terraform Cloud. Original wording.
12
الأسئلة
🇬🇧 English
اللغة
متوسط
الصعوبة
ابدأ الاختبار (كضيف أو بحساب)
مشاركة كصورة

أسئلة الاختبار

  1. 1. Which Terraform command shows the execution plan without applying it?
    1. terraform apply
    2. terraform plan
    3. terraform validate
    4. terraform refresh
  2. 2. Where does Terraform store the mapping between configuration and real-world infrastructure by default?
    1. In the .tf files
    2. In a local terraform.tfstate file (or a configured remote backend)
    3. In environment variables
    4. In the cloud provider only
  3. 3. Which feature prevents two engineers from running terraform apply simultaneously against the same state?
    1. Provider authentication
    2. State locking (e.g. DynamoDB lock table for the S3 backend)
    3. Workspaces
    4. Variables
  4. 4. Which block declares a reusable group of Terraform resources?
    1. resource
    2. module
    3. provider
    4. variable
  5. 5. What does terraform init do?
    1. Creates infrastructure
    2. Initializes the working directory: downloads providers, configures the backend, installs modules
    3. Destroys resources
    4. Formats files
  6. 6. Which Terraform function reads the value of an environment variable?
    1. env()
    2. lookup(env, ...)
    3. Reading via the input variable mechanism with TF_VAR_<name> env vars
    4. os.getenv()
  7. 7. Which command forces re-creation of a specific resource on the next apply?
    1. terraform recreate
    2. terraform taint (deprecated) or `terraform apply -replace=`
    3. terraform destroy
    4. terraform refresh
  8. 8. Which file typically pins provider versions for reproducibility?
    1. main.tf
    2. .terraform.lock.hcl
    3. providers.json
    4. terraform.tfstate
  9. 9. What is the recommended way to handle secrets in Terraform configuration?
    1. Hard-code them in .tf files
    2. Pass them via input variables sourced from a secret manager or env vars, and avoid committing them or plain state to source control
    3. Store them in the lock file
    4. Put them in outputs
  10. 10. Which feature lets one configuration manage multiple environments (e.g. dev, staging, prod) with separate state?
    1. Workspaces (or, more commonly in practice, separate root modules per environment)
    2. Providers
    3. Variables alone
    4. Outputs
  11. 11. What does terraform fmt do?
    1. Validates resource configuration
    2. Rewrites configuration files into a canonical format and style
    3. Generates a plan
    4. Removes resources
  12. 12.

    Which output type should be marked `sensitive = true`?

    1. Public IP addresses

    2. Outputs that contain secrets (e.g. passwords, tokens, private keys) so they aren't shown in CLI output

    3. All outputs

    4. Outputs from data sources only

أجب عن الأسئلة واعرف نتيجتك

التعليقات

سجّل الدخول للتعليق.

جارٍ التحميل…