Online Exam Quiz

questionQuestion  1 to 30

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 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 is the extension of Terraform variable files?

  • .tf
  • .tfstate
  • .tfvars
  • .tfv
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

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 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 is the purpose of the 'terraform console' command?

  • Opens an interactive console
  • Displays the current configuration
  • Initializes the configuration
  • Applies the configuration
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 graph'?

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

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

  • condition
  • if
  • count
  • depends_on
Mark for review

Which command shows the currently installed provider versions?

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

How do you specify a dependency between resources in Terraform?

  • depends_on = [...]
  • dependency = [...]
  • depend_on = [...]
  • depends = [...]
Mark for review

What is the purpose of a provider in Terraform?

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

Which file format does Terraform primarily use for configuration?

  • YAML
  • JSON
  • HCL
  • XML
Mark for review

What is a data source in Terraform?

  • A block of configuration
  • A type of resource
  • A read-only view into a resource
  • A type of module
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 can you destroy all managed infrastructure in Terraform?

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

Which of the following is a valid Terraform backend?

  • S3
  • GCP
  • Azure
  • DigitalOcean
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 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 the 'terraform state' command do?

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

Which backend does Terraform use by default for storing state?

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

How can you import existing infrastructure into Terraform?

  • terraform import
  • terraform include
  • terraform add
  • terraform link
Mark for review

What is Terraform?

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

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

Which language is Terraform written in?

  • Python
  • Go
  • Ruby
  • Java
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 workspace' command?

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

Which command shows a graph of Terraform resources?

  • terraform graph
  • terraform show
  • terraform display
  • terraform plan
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