Online Exam Quiz

questionQuestion  1 to 30

Which backend does Terraform use by default for storing state?

  • S3
  • Local
  • GCS
  • Azure Blob
Mark for review

Which command shows a graph of Terraform resources?

  • terraform graph
  • terraform show
  • terraform display
  • terraform plan
Mark for review

What is a module in Terraform?

  • A block of configuration
  • A reusable configuration package
  • A type of resource
  • A type of provider
Mark for review

Which of the following is a valid way to reference a resource attribute?

  • resource.attribute
  • resource.name.attribute
  • resource["name"].attribute
  • resource.type.name.attribute
Mark for review

What is the purpose of 'terraform graph'?

  • Visualize the configuration
  • Validate the configuration
  • Generate a dependency graph
  • Initialize the configuration
Mark for review

What is Terraform?

  • Configuration management tool
  • Cloud provider
  • Infrastructure as code tool
  • Version control system
Mark for review

How do you handle secrets in Terraform?

  • Store in .tfvars file
  • Use environment variables
  • Use Vault or a secret manager
  • Hardcode in configuration files
Mark for review

What command initializes a Terraform configuration?

  • terraform apply
  • terraform init
  • terraform plan
  • terraform validate
Mark for review

What does the 'terraform get' command do?

  • Downloads and installs modules
  • Downloads provider plugins
  • Initializes the configuration
  • Applies the configuration
Mark for review

How do you specify a list variable in Terraform?

  • variable "list" { type = list }
  • var "list" { type = list }
  • list "variable" { type = list }
  • define "list" { type = list }
Mark for review

What does the Terraform 'plan' command do?

  • Applies the configuration
  • Initializes the configuration
  • Validates the configuration
  • Shows the execution plan
Mark for review

Which command is used to format Terraform configuration files?

  • terraform style
  • terraform format
  • terraform fmt
  • terraform config
Mark for review

What is the purpose of the terraform.tfvars file?

  • Store variable definitions
  • Store provider configurations
  • Store resource definitions
  • Store backend configurations
Mark for review

How do you reference a variable in a Terraform configuration?

  • var.variable_name
  • $(variable_name)
  • ${var.variable_name}
  • ${variable_name}
Mark for review

What does the 'terraform taint' command do?

  • Marks a resource for recreation
  • Deletes a resource
  • Updates a resource
  • Imports a resource
Mark for review

Which syntax is used to define a condition in a resource block?

  • condition
  • if
  • count
  • depends_on
Mark for review

How do you upgrade Terraform providers?

  • terraform update
  • terraform upgrade
  • terraform get -update
  • terraform providers -upgrade
Mark for review

Which language is Terraform written in?

  • Python
  • Go
  • Ruby
  • Java
Mark for review

How do you specify a required provider version in Terraform?

  • version "1.0.0"
  • required_version = "1.0.0"
  • version = "1.0.0"
  • required_version "1.0.0"
Mark for review

How do you output values from a Terraform configuration?

  • output "value"
  • output { value }
  • output = "value"
  • output "value" {}
Mark for review

Which command is used to create an execution plan?

  • terraform apply
  • terraform plan
  • terraform init
  • terraform destroy
Mark for review

What is the default state file name in Terraform?

  • terraform.tf
  • terraform.tfstate
  • terraform.state
  • terraform.conf
Mark for review

Which file format does Terraform primarily use for configuration?

  • YAML
  • JSON
  • HCL
  • XML
Mark for review

How can you upgrade Terraform to a newer version?

  • terraform upgrade
  • terraform update
  • tf update
  • Download the new version manually
Mark for review

How do you define a boolean variable in Terraform?

  • variable "bool" { type = bool }
  • var "bool" { type = boolean }
  • bool "variable" { type = bool }
  • define "bool" { type = bool }
Mark for review

Which command shows the currently installed provider versions?

  • terraform providers
  • terraform show
  • terraform version
  • terraform info
Mark for review

What is the purpose of 'terraform refresh'?

  • Update state file with real-world data
  • Refresh provider plugins
  • Reinitialize configuration
  • Validate the configuration
Mark for review

Which of the following is not a valid Terraform command?

  • terraform plan
  • terraform validate
  • terraform build
  • terraform apply
Mark for review

What does the 'terraform state' command do?

  • Manages the state file
  • Displays the current state
  • Modifies the state file
  • All of the above
Mark for review

What is the purpose of a provider in Terraform?

  • Define infrastructure
  • Provision resources
  • Define modules
  • Store state
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review