Online Exam Quiz

questionQuestion  1 to 30

How do you upgrade Terraform providers?

  • terraform update
  • terraform upgrade
  • terraform get -update
  • terraform providers -upgrade
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

How do you define a resource in Terraform?

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

Which of the following is a valid Terraform backend?

  • S3
  • GCP
  • Azure
  • DigitalOcean
Mark for review

What is the purpose of the 'terraform workspace' command?

  • Manage multiple configurations
  • Manage different state files
  • Manage environments
  • All of the above
Mark for review

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

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

Which file format does Terraform primarily use for configuration?

  • YAML
  • JSON
  • HCL
  • XML
Mark for review

Which command is used to format Terraform configuration files?

  • terraform style
  • terraform format
  • terraform fmt
  • terraform config
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 does the 'terraform get' command do?

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

Which command is used to create an execution plan?

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

How can you destroy all managed infrastructure in Terraform?

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

What is Terraform?

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

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

What does the 'terraform validate' command do?

  • Validates the syntax
  • Executes the plan
  • Applies the configuration
  • Initializes the configuration
Mark for review

How do you specify a dependency between resources in Terraform?

  • depends_on = [...]
  • dependency = [...]
  • depend_on = [...]
  • depends = [...]
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 output values from a Terraform configuration?

  • output "value"
  • output { value }
  • output = "value"
  • output "value" {}
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

Which command shows a graph of Terraform resources?

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

Which command shows the currently installed provider versions?

  • terraform providers
  • terraform show
  • terraform version
  • terraform info
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 language is Terraform written in?

  • Python
  • Go
  • Ruby
  • Java
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 define a variable in Terraform?

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

How can you import existing infrastructure into Terraform?

  • terraform import
  • terraform include
  • terraform add
  • terraform link
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