Online Exam Quiz

questionQuestion  1 to 30

What is the default state file name in Terraform?

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

How do you define a resource in Terraform?

  • resource "type"
  • resource "name" "type"
  • resource "type" "name"
  • resource { "type" "name" }
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

What does 'terraform output' command do?

  • Displays the output values
  • Validates the configuration
  • Applies the configuration
  • Initializes the configuration
Mark for review

How do you specify a default value for a variable in Terraform?

  • default = "value"
  • default "value"
  • value = "default"
  • def = "value"
Mark for review

How do you remove a resource from Terraform state without deleting the resource?

  • terraform delete
  • terraform remove
  • terraform untrack
  • terraform state rm
Mark for review

How do you output values from a Terraform configuration?

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

Which language is Terraform written in?

  • Python
  • Go
  • Ruby
  • Java
Mark for review

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

  • condition
  • if
  • count
  • depends_on
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

How do you define a map variable in Terraform?

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

What does 'terraform fmt' command do?

  • Formats the configuration files
  • Validates the configuration
  • Applies the configuration
  • Initializes the configuration
Mark for review

How do you define an output value in Terraform?

  • output "name" { value = ... }
  • output { "name" = ... }
  • output (name) { value = ... }
  • output { name = ... }
Mark for review

Which command is used to create an execution plan?

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

Which of the following is a valid resource definition?

  • resource "aws_instance" "example" { ... }
  • resource "example" "aws_instance" { ... }
  • resource "aws_instance" { "example" ... }
  • resource { "aws_instance" "example" ... }
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

What does the 'terraform get' command do?

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

What is Terraform?

  • Configuration management tool
  • Cloud provider
  • Infrastructure as code tool
  • Version control system
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

How do you define a variable in Terraform?

  • variable "name"
  • var "name"
  • define "name"
  • var_name "name"
Mark for review

How can you destroy all managed infrastructure in Terraform?

  • terraform remove
  • terraform delete
  • terraform destroy
  • terraform clean
Mark for review

What command initializes a Terraform configuration?

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

What does the 'terraform refresh' command do?

  • Refreshes state data
  • Updates configuration files
  • Downloads provider plugins
  • Resets the environment
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

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 reference a variable in a Terraform configuration?

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

Which of the following is not a valid Terraform command?

  • terraform plan
  • terraform validate
  • terraform build
  • terraform apply
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

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

How do you specify a dependency between resources in Terraform?

  • depends_on = [...]
  • dependency = [...]
  • depend_on = [...]
  • depends = [...]
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